WebExtension API to 'warm up' a tab
Categories
(WebExtensions :: Frontend, enhancement, P5)
Tracking
(firefox57 wontfix, firefox79 fixed)
People
(Reporter: bugzilla, Assigned: aria)
Details
(Keywords: dev-doc-complete, Whiteboard: [design-decision-approved])
Attachments
(1 file)
Updated•7 years ago
|
Reporter | ||
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
Comment 4•7 years ago
|
||
Updated•6 years ago
|
Hi, I wrote a patch but I’d like guidance on what type of test I can write and how to check that the tab has been effectively warmed up, since we can’t know that with the WebExtensions API.
Updated•5 years ago
|
Comment 8•5 years ago
|
||
I'm a touch tight on time this week, lets see if someone familiar with tab warmup has a quick answer on how to test for it.
Comment 9•5 years ago
|
||
I can't really comment on where the test should live and whatnot - I'm not familiar with general policies on web extension API testing. But you can tell if a tab is warm or being warmed or not by checking the renderLayers
property on the browser object. For example, in the browser toolbox: gBrowser.tabs[0].linkedBrowser.renderLayers
will tell you if your first tab is warming up / warmed up / displayed.
However, looking at your patch, I don't think that should work...? It should be gBrowser.warmupTab
, not gBrowser.warmUp
.
Comment 10•5 years ago
|
||
Comment 11•5 years ago
•
|
||
Backed out for perma failures.
Failure logs:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=302649386&repo=autoland&lineNumber=14032
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=302649363&repo=autoland&lineNumber=1362
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=302650153&repo=autoland&lineNumber=1568
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=302651140&repo=autoland&lineNumber=8780
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=302651484&repo=autoland&lineNumber=30200
Backout: https://hg.mozilla.org/integration/autoland/rev/1e2b59d2306afe37d3bce4b129b8479aa1635fdb
Updated•5 years ago
|
Comment 12•4 years ago
|
||
Comment 13•4 years ago
|
||
Backed out for failures on test_ext_all_apis.html
backout: https://hg.mozilla.org/integration/autoland/rev/98fd4fe746ea5f38a26de5bc5b15cd467b6e883f
failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=303720052&repo=autoland&lineNumber=1604
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - TEST-PASS | browser/components/extensions/test/mochitest/test_ext_all_apis.html | content script APIs
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - Buffered messages logged at 03:18:36
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - add_task | Leaving test test_enumerate_content_script_apis
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - add_task | Entering test test_enumerate_background_script_apis
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - Extension loaded
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - Buffered messages finished
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - TEST-UNEXPECTED-FAIL | browser/components/extensions/test/mochitest/test_ext_all_apis.html | background script APIs - Structures begin differing at:
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - got[99] = "browser.tabs.warmup"
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - expected[99] = "browser.test.assertEq"
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO -
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - SimpleTest.isDeeply@SimpleTest/SimpleTest.js:1879:16
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - test_enumerate_background_script_apis@browser/components/extensions/test/mochitest/test_ext_all_apis.js:178:11
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - asyncnextTick/<@SimpleTest/SimpleTest.js:2080:34
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - asyncnextTick@SimpleTest/SimpleTest.js:2105:11
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - setTimeout handler*SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:788:41
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - add_task@SimpleTest/SimpleTest.js:2035:17
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - @browser/components/extensions/test/mochitest/test_ext_all_apis.js:143:9
[task 2020-05-26T03:18:37.236Z] 03:18:37 INFO - add_task | Leaving test test_enumerate_background_script_apis
[task 2020-05-26T03:18:37.236Z] 03:18:37 INFO - GECKO(1258) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
[task 2020-05-26T03:18:37.236Z] 03:18:37 INFO - GECKO(1258) | MEMORY STAT heapAllocated not supported in this build configuration.
[task 2020-05-26T03:18:37.236Z] 03:18:37 INFO - GECKO(1258) | MEMORY STAT | vsize 130550484MB | residentFast 398MB
There are also other browser-chrome failures such as:
- toolkit/components/extensions/test/browser/browser_ext_themes_dynamic_getCurrent.js | Test timed out -
- browser/components/extensions/test/browser/browser_ext_tabs_cookieStoreId_private.js | Test timed out -
- browser/extensions/report-site-issue/test/browser/browser_report_site_issue.js | Test timed out -
and many others.
Comment 14•4 years ago
|
||
Comment 15•4 years ago
|
||
bugherder |
Comment 16•4 years ago
|
||
I've added a page for this API: https://wiki.developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/warmup .
Compat data is merged but not deployed until tomorrow.
Please let me know if this covers it.
Comment 17•4 years ago
|
||
Thanks Will, I replaced the use of "discard" on that page, to avoid confusion with the unrelated tabs.discard
method, and added a clarifying sentence about this not being required, just a performance optimization. Please check if my edit fits the article and MDN.
Updated•4 years ago
|
Description
•