DescriptionJavaScript unit test framework - Part II
This change enables running the JavaScript unit test on try bots and build bots using the browser test infrastructure.
To run a QUnit test suite as a browser test.
1. include third_party/qunit/src/browser_test_harness.js in your qunit test suite.
2. Derive your browser test from QUnitBrowserTestRunner, and call RunTest with the URL of the test suite.
3. modify chrome_tests.gypi to add the c++ source of your browser test and add your test suite as a run time dependency of the browser_tests executable
Summary of changes:
1. QUnit_browser_test_runner.h serves as a base class for a QUnit browser test. It navigates the browser to the QUnit test suite, calls browserTestHarness.run() and listens for the test results.
2. browser_test_harness.js serves as a test took on the QUnit test suite. Using the window.domAutomationController, browser_test_harness.js detects whether it is running under the browser test infrastructure to auto-enable itself and report results back to the browser test.
3. Updates browser_tests.isolate so that the test can run in an isolated test environment. See http://www.chromium.org/developers/testing/isolated-testing.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281872
Patch Set 1 #
Messages
Total messages: 6 (0 generated)
|