testcase.js
No description.

File Location

/goog/testing/testcase.js

Classes

goog.testing.TestCase
A class representing a JsUnit test case. A TestCase is made up of a number of test functions which can be run. Individual test cases can override the following functions to set up their test environment: - runTests - completely override the test's runner - setUpPage - called before any of the test functions are run - tearDownPage - called after all tests are finished - setUp - called before each of the test functions - tearDown - called after each of the test functions - shouldRunTests - called before a test run, all tests are skipped if it returns false. Can be used to disable tests on browsers where they aren't expected to pass. Use #autoDiscoverLifecycle and #autoDiscoverTests
goog.testing.TestCase.Error
A class representing an error thrown by the test
goog.testing.TestCase.Result
A class for representing test results. A bag of public properties.
goog.testing.TestCase.Test
A class representing a single test function.

Public Protected Private

Enumerations

Global Functions

goog.testing.TestCase.getGlobals(opt_prefix) Object
Gets the object with all globals.
Arguments:
opt_prefix : string=
An optional prefix. If specified, only get things under this prefix. Note that the prefix is only honored in IE, since it supports the RuntimeObject: http://msdn.microsoft.com/en-us/library/ff521039%28VS.85%29.aspx TODO: Fix this method to honor the prefix in all browsers.
Returns: Object  An object with all globals starting with the prefix.
code »
goog.testing.TestCase.initializeTestRunner(testCase)
Initializes the given test case with the global test runner 'G_testRunner'.
Arguments:
testCase : goog.testing.TestCase
The test case to install.
code »
goog.testing.TestCase.protectedClearTimeout_()
Save a reference to window.clearTimeout, so any code that overrides the default behavior (e.g. MockClock) doesn't affect our runner.
code »
goog.testing.TestCase.protectedSetTimeout_()
Save a reference to window.setTimeout, so any code that overrides the default behavior (the MockClock, for example) doesn't affect our runner.
code »

Directory testing

File Reference