Automatically load AddTask.js in mochitest-chrome and mochitest-plain through SimpleTest.js
Categories
(Testing :: Mochitest, task)
Tracking
(firefox68 fixed)
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: bgrins, Assigned: bgrins)
References
Details
Attachments
(5 files)
Right now to use add_task you have to explicitly include this file (https://searchfox.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/AddTask.js) with:
- mochitest-chrome: <script src="chrome://mochikit/content/tests/SimpleTest/AddTask.js"></script>
- mochitest-plain: <script src="/tests/SimpleTest/AddTask.js"></script>
I think we should be including this anywhere that loads SimpleTest.js because:
- add_task is a nicer way to work with tests (it automatically calls SimpleTest.waitForExplicitFinish, waits for load, is async by default)
- the script doesn't have any side effects unless called
- it's available by default in other suites (mochitest-browser, xpcshell)
My proposal is to move the contents of AddTask.js into SimpleTest.js and then remove the separate file and any references to it.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
Script for removing <script> tags referencing AddTask.js
Assignee | ||
Comment 2•6 years ago
|
||
Haven't heard any feedback in https://groups.google.com/d/msg/mozilla.dev.platform/PqL0OC2C-90/15_zAj7_CgAJ, so I'm going to push up some patches to make this change.
Assignee | ||
Comment 3•6 years ago
|
||
Assignee | ||
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
This was generated with the script at https://bug1544051.bmoattachments.org/attachment.cgi?id=9058672
Assignee | ||
Comment 6•6 years ago
|
||
Assignee | ||
Comment 7•6 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #2)
Haven't heard any feedback in https://groups.google.com/d/msg/mozilla.dev.platform/PqL0OC2C-90/15_zAj7_CgAJ, so I'm going to push up some patches to make this change.
Joel, are you a good reviewer for this change, or could you recommend someone if not? I see you initially reviewed SpawnTask.js before it was renamed to AddTask.js: https://hg.mozilla.org/mozilla-central/log/22acceec0478/testing/mochitest/tests/SimpleTest/SpawnTask.js.
Assignee | ||
Updated•6 years ago
|
Comment 10•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/77269915d66a
https://hg.mozilla.org/mozilla-central/rev/480e15689b61
https://hg.mozilla.org/mozilla-central/rev/c83490ca7185
https://hg.mozilla.org/mozilla-central/rev/dfe0b0d0827e
Description
•