mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 19:33:18 +00:00
4d239d923a
This introduces a new medule ContentTask, which includes a spawn method. This new method can be used to spawn a task in the content process of a browser. When called, a promise will be returned which resolves to the value returned by the task. This allows you to quickly write test code which can touch the content and return information without having to write custom framescripts all the time (The content code can be written inline as a simple generator definition). ContentTask is automatically included in the scope of mochitests. An example use follows: yield ContentTask.spawn(browser, {}, function* gen_replaceState() { content.window.history.replaceState({}, "", 'test-entry/'); return "Value that the promise will resolve with"; }); --HG-- extra : rebase_source : 9b6ae71407da582cdaa8087b5e367c72fa08a337
42 lines
2.6 KiB
Plaintext
42 lines
2.6 KiB
Plaintext
mochikit.jar:
|
|
% content mochikit %content/
|
|
content/browser-harness.xul (browser-harness.xul)
|
|
content/browser-test.js (browser-test.js)
|
|
content/browser-test-overlay.xul (browser-test-overlay.xul)
|
|
content/jetpack-package-harness.js (jetpack-package-harness.js)
|
|
content/jetpack-package-overlay.xul (jetpack-package-overlay.xul)
|
|
content/jetpack-addon-harness.js (jetpack-addon-harness.js)
|
|
content/jetpack-addon-overlay.xul (jetpack-addon-overlay.xul)
|
|
content/cc-analyzer.js (cc-analyzer.js)
|
|
content/chrome-harness.js (chrome-harness.js)
|
|
content/mochitest-e10s-utils.js (mochitest-e10s-utils.js)
|
|
content/harness.xul (harness.xul)
|
|
content/redirect.html (redirect.html)
|
|
content/server.js (server.js)
|
|
content/chunkifyTests.js (chunkifyTests.js)
|
|
content/manifestLibrary.js (manifestLibrary.js)
|
|
content/nested_setup.js (nested_setup.js)
|
|
content/dynamic/getMyDirectory.sjs (dynamic/getMyDirectory.sjs)
|
|
content/static/harness.css (static/harness.css)
|
|
content/tests/SimpleTest/ChromePowers.js (tests/SimpleTest/ChromePowers.js)
|
|
content/tests/SimpleTest/EventUtils.js (tests/SimpleTest/EventUtils.js)
|
|
content/tests/SimpleTest/ChromeUtils.js (tests/SimpleTest/ChromeUtils.js)
|
|
content/tests/SimpleTest/LogController.js (tests/SimpleTest/LogController.js)
|
|
content/tests/SimpleTest/MemoryStats.js (tests/SimpleTest/MemoryStats.js)
|
|
content/tests/SimpleTest/MozillaLogger.js (../specialpowers/content/MozillaLogger.js)
|
|
content/tests/SimpleTest/specialpowers.js (../specialpowers/content/specialpowers.js)
|
|
content/tests/SimpleTest/SpecialPowersObserverAPI.js (../specialpowers/content/SpecialPowersObserverAPI.js)
|
|
* content/tests/SimpleTest/specialpowersAPI.js (../specialpowers/content/specialpowersAPI.js)
|
|
content/tests/SimpleTest/setup.js (tests/SimpleTest/setup.js)
|
|
content/tests/SimpleTest/SimpleTest.js (tests/SimpleTest/SimpleTest.js)
|
|
content/tests/SimpleTest/test.css (tests/SimpleTest/test.css)
|
|
content/tests/SimpleTest/TestRunner.js (tests/SimpleTest/TestRunner.js)
|
|
content/tests/SimpleTest/iframe-between-tests.html (tests/SimpleTest/iframe-between-tests.html)
|
|
content/tests/SimpleTest/WindowSnapshot.js (tests/SimpleTest/WindowSnapshot.js)
|
|
content/tests/SimpleTest/MockObjects.js (tests/SimpleTest/MockObjects.js)
|
|
content/tests/SimpleTest/NativeKeyCodes.js (tests/SimpleTest/NativeKeyCodes.js)
|
|
content/tests/SimpleTest/paint_listener.js (tests/SimpleTest/paint_listener.js)
|
|
content/tests/SimpleTest/docshell_helpers.js (../../docshell/test/chrome/docshell_helpers.js)
|
|
content/tests/BrowserTestUtils/content-task.js (BrowserTestUtils/content/content-task.js)
|
|
|