Closed Bug 1762366 Opened 2 years ago Closed 2 years ago

Add an `injectImmediately` option in `scripting.executeScript()`

Categories

(WebExtensions :: General, enhancement, P3)

enhancement

Tracking

(firefox101 fixed)

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: willdurand, Assigned: willdurand)

References

(Blocks 1 open bug)

Details

(Whiteboard: [addons-jira])

Attachments

(1 file)

See: https://bugs.chromium.org/p/chromium/issues/detail?id=1217895#c15 (that hasn't landed yet AFAICT)

This is about adding a new injectImmediately param to the ScriptInjection type, which will control the run_at used when executing a script.

Assignee: nobody → wdurand
Attachment #9272260 - Attachment description: WIP: Bug 1762366 - Add an `injectImmediately` option in `scripting.executeScript()`. r?robwu! → Bug 1762366 - Add an `injectImmediately` option in `scripting.executeScript()`. r?robwu!
Pushed by wdurand@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/64a0fc3e1e44
Add an `injectImmediately` option in `scripting.executeScript()`. r=robwu

Backed out for causing failures on test_ext_scripting_executeScript_injectImmediately.html

[task 2022-04-26T11:37:13.662Z] 11:37:13     INFO -  TEST-START | toolkit/components/extensions/test/mochitest/test_ext_scripting_executeScript_injectImmediately.html
[task 2022-04-26T11:42:27.141Z] 11:42:27     INFO -  Buffered messages logged at 11:37:11
[task 2022-04-26T11:42:27.141Z] 11:42:27     INFO -  add_task | Entering test setup
[task 2022-04-26T11:42:27.141Z] 11:42:27     INFO -  add_task | Leaving test setup
[task 2022-04-26T11:42:27.141Z] 11:42:27     INFO -  add_task | Entering test test_executeScript_injectImmediately
[task 2022-04-26T11:42:27.141Z] 11:42:27     INFO -  Extension loaded
[task 2022-04-26T11:42:27.141Z] 11:42:27     INFO -  Buffered messages finished
[task 2022-04-26T11:42:27.142Z] 11:42:27  WARNING -  TEST-UNEXPECTED-FAIL | toolkit/components/extensions/test/mochitest/test_ext_scripting_executeScript_injectImmediately.html | Test timed out. -
[task 2022-04-26T11:42:27.142Z] 11:42:27  WARNING -  TEST-UNEXPECTED-FAIL | toolkit/components/extensions/test/mochitest/test_ext_scripting_executeScript_injectImmediately.html | [SimpleTest.finish()] No checks actually run. (You need to call ok(), is(), or similar functions at least once.  Make sure you use SimpleTest.waitForExplicitFinish() if you need it.)
[task 2022-04-26T11:42:27.142Z] 11:42:27     INFO -      SimpleTest.ok@SimpleTest/SimpleTest.js:417:16
[task 2022-04-26T11:42:27.142Z] 11:42:27     INFO -      afterCleanup@SimpleTest/SimpleTest.js:1416:18
[task 2022-04-26T11:42:27.142Z] 11:42:27     INFO -      executeCleanupFunction@SimpleTest/SimpleTest.js:1481:7
[task 2022-04-26T11:42:27.143Z] 11:42:27     INFO -      Async*@toolkit/components/extensions/test/mochitest/head.js:27:18
[task 2022-04-26T11:42:27.143Z] 11:42:27     INFO -      async*executeCleanupFunction@SimpleTest/SimpleTest.js:1487:13
[task 2022-04-26T11:42:27.143Z] 11:42:27     INFO -      executeCleanupFunction@SimpleTest/SimpleTest.js:1497:7
[task 2022-04-26T11:42:27.143Z] 11:42:27     INFO -      setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:229:17
[task 2022-04-26T11:42:27.143Z] 11:42:27     INFO -      setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:242:15
[task 2022-04-26T11:42:27.143Z] 11:42:27     INFO -      setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:242:15
[task 2022-04-26T11:42:27.143Z] 11:42:27     INFO -      setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:242:15
[task 2022-04-26T11:42:27.143Z] 11:42:27     INFO -      setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:242:15
[task 2022-04-26T11:42:27.143Z] 11:42:27     INFO -      setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:242:15
[task 2022-04-26T11:42:27.144Z] 11:42:27     INFO -      setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:242:15
[task 2022-04-26T11:42:27.144Z] 11:42:27     INFO -      setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:242:15
[task 2022-04-26T11:42:27.144Z] 11:42:27     INFO -      setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:242:15
[task 2022-04-26T11:42:27.144Z] 11:42:27     INFO -      setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:242:15
[task 2022-04-26T11:42:27.144Z] 11:42:27     INFO -      setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:242:15
[task 2022-04-26T11:42:27.144Z] 11:42:27     INFO -      setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:242:15
[task 2022-04-26T11:42:27.144Z] 11:42:27     INFO -      setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:242:15
[task 2022-04-26T11:42:27.144Z] 11:42:27     INFO -      TestRunner.runTests/<@SimpleTest/TestRunner.js:521:16
[task 2022-04-26T11:42:27.144Z] 11:42:27     INFO -      Async*TestRunner.runTests@SimpleTest/TestRunner.js:508:48
[task 2022-04-26T11:42:27.144Z] 11:42:27     INFO -      RunSet.runtests@SimpleTest/setup.js:232:14
[task 2022-04-26T11:42:27.145Z] 11:42:27     INFO -      RunSet.runall@SimpleTest/setup.js:211:12
[task 2022-04-26T11:42:27.145Z] 11:42:27     INFO -      hookupTests@SimpleTest/setup.js:308:12
[task 2022-04-26T11:42:27.145Z] 11:42:27     INFO -  parseTestManifest@http://mochi.test:8888/manifestLibrary.js:51:13
[task 2022-04-26T11:42:27.145Z] 11:42:27     INFO -  getTestManifest/req.onload@http://mochi.test:8888/manifestLibrary.js:64:28
[task 2022-04-26T11:42:27.145Z] 11:42:27     INFO -  EventHandlerNonNull*getTestManifest@http://mochi.test:8888/manifestLibrary.js:60:3
[task 2022-04-26T11:42:27.145Z] 11:42:27     INFO -      hookup@SimpleTest/setup.js:284:20
[task 2022-04-26T11:42:27.145Z] 11:42:27     INFO -  EventHandlerNonNull*@http://mochi.test:8888/tests?autorun=1&closeWhenDone=1&logFile=%2Fdata%2Flocal%2Ftmp%2Ftest_root%2Flogs%2Fmochitest.log&fileLevel=INFO&consoleLevel=INFO&hideResultsTable=1&manifestFile=tests.json&dumpOutputDirectory=%2Fdata%2Flocal%2Ftmp%2Ftest_root:11:1
[task 2022-04-26T11:42:27.146Z] 11:42:27     INFO -  TEST-OK | toolkit/components/extensions/test/mochitest/test_ext_scripting_executeScript_injectImmediately.html | took 311673ms
Flags: needinfo?(wdurand)
Pushed by wdurand@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/87f3d25ab99b
Add an `injectImmediately` option in `scripting.executeScript()`. r=robwu
Flags: needinfo?(wdurand)
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: