Closed
Bug 1375710
Opened 7 years ago
Closed 7 years ago
Remove more CPOWs from tests
Categories
(Firefox :: General, enhancement)
Tracking
()
RESOLVED
FIXED
Firefox 56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: mrbkap, Assigned: mrbkap)
References
Details
Attachments
(10 files)
59 bytes,
text/x-review-board-request
|
Details | |
59 bytes,
text/x-review-board-request
|
Gijs
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
Details | |
59 bytes,
text/x-review-board-request
|
Details | |
59 bytes,
text/x-review-board-request
|
Details | |
59 bytes,
text/x-review-board-request
|
Details | |
59 bytes,
text/x-review-board-request
|
Gijs
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
Details | |
59 bytes,
text/x-review-board-request
|
Details | |
59 bytes,
text/x-review-board-request
|
Details |
I removed more CPOWs from some tests.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 11•7 years ago
|
||
mozreview-review |
Comment on attachment 8880646 [details]
Bug 1375710 - Remove CPOWs from browser_tabfocus.js.
https://reviewboard.mozilla.org/r/151982/#review157096
Attachment #8880646 -
Flags: review+
Updated•7 years ago
|
Attachment #8880646 -
Flags: review?(felipc)
Updated•7 years ago
|
Attachment #8880647 -
Flags: review?(felipc) → review?(gijskruitbosch+bugs)
Comment 12•7 years ago
|
||
mozreview-review |
Comment on attachment 8880647 [details]
Bug 1375710 - Remove CPOWs from browser_500328.js.
https://reviewboard.mozilla.org/r/151984/#review157100
I feel bad because this is a really nice refactoring, but I think using the browser.goBack()/goForward() APIs is actually part of the 'point' of this test, so switching those to content-process-side DOM API calls is not OK.
::: browser/components/sessionstore/test/browser_500328.js:19
(Diff revision 1)
> -
> + content.testState = "foo";
> - let popStateCount = 0;
>
> - browser.addEventListener("popstate", function(aEvent) {
> - if (popStateCount == 0) {
> - popStateCount++;
> + // Now go back. This should trigger the popstate event handler.
> + let popstatePromise = ContentTaskUtils.waitForEvent(this, "popstate", true);
> + content.history.back();
Both here and in the forward() case, I think we should ensure that we continue to call browser.goForward / browser.goBack() . Bug 500328 landed a separate mochitest to check the DOM history APIs, and we should ensure that browser UI copes correctly with the push/popstate stuff as well. It enters docshell via a very different route, so it seems worth keeping the separate coverage.
Attachment #8880647 -
Flags: review?(gijskruitbosch+bugs) → review-
Updated•7 years ago
|
Attachment #8880648 -
Flags: review?(felipc) → review?(gijskruitbosch+bugs)
Updated•7 years ago
|
Attachment #8880649 -
Flags: review?(felipc) → review?(gijskruitbosch+bugs)
Updated•7 years ago
|
Attachment #8880650 -
Flags: review?(felipc) → review?(gijskruitbosch+bugs)
Comment 13•7 years ago
|
||
mozreview-review |
Comment on attachment 8880648 [details]
Bug 1375710 - Remove CPOWs from browser_iframe_gone_mid_download.js.
https://reviewboard.mozilla.org/r/151986/#review157102
yay, net code removal!
Attachment #8880648 -
Flags: review?(gijskruitbosch+bugs) → review+
Comment 14•7 years ago
|
||
mozreview-review |
Comment on attachment 8880650 [details]
Bug 1375710 - Remove a CPOW from browser_bug734076.js.
https://reviewboard.mozilla.org/r/151990/#review157104
Attachment #8880650 -
Flags: review?(gijskruitbosch+bugs) → review+
Updated•7 years ago
|
Attachment #8880651 -
Flags: review?(felipc) → review?(gijskruitbosch+bugs)
Comment 15•7 years ago
|
||
mozreview-review |
Comment on attachment 8880649 [details]
Bug 1375710 - Remove CPOWs from browser_bug575561.js.
https://reviewboard.mozilla.org/r/151988/#review157106
The advantage of the progress listener approach was that we'd catch the load no matter which tab it happened in, and now we won't and the test will just time out if we expected the wrong thing. I checked bugzilla and all the current intermittent issues with the test come in the form of timeouts *anyway*, so still r+, though if it's not strictly necessary to abandon the progress listener approach (can't tell really quickly - are the nsIChannel/nsIRequests CPOWs, or something?) then perhaps you want to keep them? Up to you.
::: browser/base/content/test/general/browser_bug575561.js:61
(Diff revision 1)
> - if (testSubFrame)
> + await BrowserTestUtils.browserLoaded(browser);
> - browser = browser.contentDocument.querySelector("iframe");
>
> - let link;
> - if (typeof aLinkIndexOrFunction == "function") {
> - link = aLinkIndexOrFunction(browser.contentDocument);
> + let promise;
> + if (expectNewTab) {
> + promise = BrowserTestUtils.waitForNewTab(gBrowser).then((tab) => {
Nit: don't need () around a single-argument of an arrow function.
::: browser/base/content/test/general/browser_bug575561.js:87
(Diff revision 1)
> + link.click();
> + return link.href;
> + });
> + }
>
> - gBrowser.removeTab(appTab);
> + let loaded = await promise;
Please add an info() before this line saying something like 'waiting on load of <href>' so that if/when tests do fail with a timeout, it's more obvious what failed.
Attachment #8880649 -
Flags: review?(gijskruitbosch+bugs) → review+
Comment 16•7 years ago
|
||
mozreview-review |
Comment on attachment 8880651 [details]
Bug 1375710 - Remove CPOWs from browser_bug592338.js.
https://reviewboard.mozilla.org/r/151992/#review157110
Attachment #8880651 -
Flags: review?(gijskruitbosch+bugs) → review+
Updated•7 years ago
|
Attachment #8880652 -
Flags: review?(felipc) → review?(gijskruitbosch+bugs)
Attachment #8880653 -
Flags: review?(felipc) → review?(gijskruitbosch+bugs)
Attachment #8880654 -
Flags: review?(felipc) → review?(gijskruitbosch+bugs)
Attachment #8880655 -
Flags: review?(felipc) → review?(gijskruitbosch+bugs)
Comment 17•7 years ago
|
||
mozreview-review |
Comment on attachment 8880652 [details]
Bug 1375710 - Remove CPOWs from browser_domFullscreen_fullscreenMode.js.
https://reviewboard.mozilla.org/r/151994/#review157112
::: commit-message-09fc5:3
(Diff revision 1)
> +In these changes, note that the cleanup function was duplicating a check done
> +at the end of the loop so didn't need to be duplicated.
Well, the cleanup function is guaranteed to run, even if the test breaks halfway through...
::: browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js
(Diff revision 1)
> - registerCleanupFunction(() => {
> - if (browser.contentWindow.fullScreen) {
> - BrowserFullScreen();
> - }
> - gBrowser.removeTab(tab);
> - });
How about just putting the cleanup from the end of the test in here:
```js
registerCleanupFunction(async function() {
if (window.fullScreen) {
executeSoon(() => BrowserFullScreen());
await waitForFullscreenChanges(FS_CHANGE_SIZE);
}
});
```
That is, assuming that doesn't race with the tab being closed triggering a full screen change as well...
Attachment #8880652 -
Flags: review?(gijskruitbosch+bugs)
Comment 18•7 years ago
|
||
mozreview-review |
Comment on attachment 8880653 [details]
Bug 1375710 - Remove CPOWs from browser_e10s_chrome_process.
https://reviewboard.mozilla.org/r/151996/#review157118
Attachment #8880653 -
Flags: review?(gijskruitbosch+bugs) → review+
Comment 19•7 years ago
|
||
mozreview-review |
Comment on attachment 8880654 [details]
Bug 1375710 - Remove CPOWs from browser_visibleFindSelection.js.
https://reviewboard.mozilla.org/r/151998/#review157120
Attachment #8880654 -
Flags: review?(gijskruitbosch+bugs) → review+
Comment 20•7 years ago
|
||
mozreview-review |
Comment on attachment 8880655 [details]
Bug 1375710 - Remove CPOWs from browser_plainTextLinks.js.
https://reviewboard.mozilla.org/r/152000/#review157122
Attachment #8880655 -
Flags: review?(gijskruitbosch+bugs) → review+
Comment 21•7 years ago
|
||
For future reference, for test-only changes like this, if you use --artifact in the try syntax (on the assumption your changes are otherwise against a usual m-i or m-c changeset, not on top of a bunch of other patches) try can use artifact builds and the try push will complete a lot faster. :-)
Assignee | ||
Comment 22•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8880649 [details]
Bug 1375710 - Remove CPOWs from browser_bug575561.js.
https://reviewboard.mozilla.org/r/151988/#review157106
> Please add an info() before this line saying something like 'waiting on load of <href>' so that if/when tests do fail with a timeout, it's more obvious what failed.
If this turns out to be a problem, we can switch this to `BrowserTestUtils.firstBrowserLoaded` which waits for any foreground load. In practice, I'm not too worried, though.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8880646 -
Flags: review?(felipc)
Attachment #8880648 -
Flags: review?(felipc)
Attachment #8880649 -
Flags: review?(felipc)
Attachment #8880650 -
Flags: review?(felipc)
Attachment #8880651 -
Flags: review?(felipc)
Attachment #8880653 -
Flags: review?(felipc)
Attachment #8880654 -
Flags: review?(felipc)
Attachment #8880655 -
Flags: review?(felipc)
Assignee | ||
Updated•7 years ago
|
Attachment #8880647 -
Flags: review?(gijskruitbosch+bugs)
Assignee | ||
Updated•7 years ago
|
Attachment #8880652 -
Flags: review?(gijskruitbosch+bugs)
Comment 33•7 years ago
|
||
mozreview-review |
Comment on attachment 8880647 [details]
Bug 1375710 - Remove CPOWs from browser_500328.js.
https://reviewboard.mozilla.org/r/151984/#review158098
Thanks!
Attachment #8880647 -
Flags: review?(gijskruitbosch+bugs) → review+
Updated•7 years ago
|
Attachment #8880647 -
Flags: review?(felipc)
Comment 34•7 years ago
|
||
mozreview-review |
Comment on attachment 8880652 [details]
Bug 1375710 - Remove CPOWs from browser_domFullscreen_fullscreenMode.js.
https://reviewboard.mozilla.org/r/151994/#review158102
::: commit-message-09fc5:3
(Diff revision 2)
> +In these changes, note that the cleanup function was duplicating a check done
> +at the end of the loop so didn't need to be duplicated.
Nit: please remove this comment from the commit message, as it's outdated now. :-)
Attachment #8880652 -
Flags: review?(gijskruitbosch+bugs) → review+
Updated•7 years ago
|
Attachment #8880652 -
Flags: review?(felipc)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 45•7 years ago
|
||
Gijs, I added a hack to make things race less in non-e10s, I hope that's OK.
Assignee | ||
Comment 46•7 years ago
|
||
In browser_500328.js.
Comment 47•7 years ago
|
||
Pushed by mrbkap@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/34bd0360c470
Remove CPOWs from browser_tabfocus.js. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/b97f735867fe
Remove CPOWs from browser_500328.js. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/8860147eb439
Remove CPOWs from browser_iframe_gone_mid_download.js. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/a15327f2942f
Remove CPOWs from browser_bug575561.js. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/27bd2b13d517
Remove a CPOW from browser_bug734076.js. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/99e98edd0f98
Remove CPOWs from browser_bug592338.js. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/a55f83bca4e4
Remove CPOWs from browser_domFullscreen_fullscreenMode.js. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/30444454a15d
Remove CPOWs from browser_e10s_chrome_process. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/988f116dc33b
Remove CPOWs from browser_visibleFindSelection.js. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/5e2d242ba522
Remove CPOWs from browser_plainTextLinks.js. r=Gijs
Comment 48•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/34bd0360c470
https://hg.mozilla.org/mozilla-central/rev/b97f735867fe
https://hg.mozilla.org/mozilla-central/rev/8860147eb439
https://hg.mozilla.org/mozilla-central/rev/a15327f2942f
https://hg.mozilla.org/mozilla-central/rev/27bd2b13d517
https://hg.mozilla.org/mozilla-central/rev/99e98edd0f98
https://hg.mozilla.org/mozilla-central/rev/a55f83bca4e4
https://hg.mozilla.org/mozilla-central/rev/30444454a15d
https://hg.mozilla.org/mozilla-central/rev/988f116dc33b
https://hg.mozilla.org/mozilla-central/rev/5e2d242ba522
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56
You need to log in
before you can comment on or make changes to this bug.
Description
•