webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | List of all members
com.netscape.javascript.qa.drivers.NavEnv Class Reference
Inheritance diagram for com.netscape.javascript.qa.drivers.NavEnv:
com.netscape.javascript.qa.drivers.TestEnvironment com.netscape.javascript.qa.drivers.LiveNavEnv

Public Member Functions

 NavEnv (TestFile f, TestSuite s, NavDrv d)
 
synchronized void runTest ()
 
Object createContext ()
 
Object executeTestFile ()
 
boolean waitForCompletion ()
 
synchronized boolean parseResult ()
 
void close ()
 
String getRandomWindowName ()
 

Detailed Description

TestEnvironment for running JavaScript tests in Navigator. NavDrv uses LiveConnect to create Navigator windows in which JavaScript tests are opened and evaluated.

See also
com.netscape.javascript.qa.drivers.NavDrv
Author
chris.nosp@m.tine.nosp@m.@nets.nosp@m.cape.nosp@m..com

Constructor & Destructor Documentation

◆ NavEnv()

com.netscape.javascript.qa.drivers.NavEnv.NavEnv ( TestFile  f,
TestSuite  s,
NavDrv  d 
)
inline

Constructor a new NavEnv.

Member Function Documentation

◆ close()

void com.netscape.javascript.qa.drivers.NavEnv.close ( )
inline

◆ createContext()

Object com.netscape.javascript.qa.drivers.NavEnv.createContext ( )
inline

Creates a new JavaScript context, in this case a Navigator window, and returns the JSObject associated with that window.

Implements com.netscape.javascript.qa.drivers.TestEnvironment.

◆ executeTestFile()

Object com.netscape.javascript.qa.drivers.NavEnv.executeTestFile ( )
inline

Open the current TestFile in the window by using LiveConnect to set the window's location.href property to a URL where the TestFile can be found.

Implements com.netscape.javascript.qa.drivers.TestEnvironment.

◆ getRandomWindowName()

String com.netscape.javascript.qa.drivers.NavEnv.getRandomWindowName ( )
inline

Generate a random window name, so that each test is associated with a unique window.

◆ parseResult()

synchronized boolean com.netscape.javascript.qa.drivers.NavEnv.parseResult ( )
inline

Use LiveConnect to get the Navigator window's testcases property, which is defined in all tests. Parse the testcases array, and create a new TestCase object for each TestCase object it finds.

Implements com.netscape.javascript.qa.drivers.TestEnvironment.

◆ runTest()

synchronized void com.netscape.javascript.qa.drivers.NavEnv.runTest ( )
inline

Called by NavDrv to run the current TestFile.

Implements com.netscape.javascript.qa.drivers.TestEnvironment.

◆ waitForCompletion()

boolean com.netscape.javascript.qa.drivers.NavEnv.waitForCompletion ( )
inline

Checks the value of the variable "completed", which is set by the stopTest() function in each test.

If the stopTest() function is not called in 20 seconds, the test fails.

Negative tests will still succeed, since the onerror handler should call the stopTest() function.


The documentation for this class was generated from the following file: