Bug 1599618 - Fix browser_stop_pending.js in Fission mode. r=adw

The origin switch causes a process switch that makes us load about:blank first.
For the scope of the test we can just check we don't revert to the original url
and we finally set the expected one.

Differential Revision: https://phabricator.services.mozilla.com/D55524

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Marco Bonardo 2019-12-03 01:23:25 +00:00
Родитель 4b9e5194b2
Коммит a331739d6c
2 изменённых файлов: 13 добавлений и 6 удалений

Просмотреть файл

@ -96,7 +96,6 @@ support-files =
searchSuggestionEngineSlow.xml
searchSuggestionEngine.sjs
[browser_stop_pending.js]
fail-if = fission
support-files =
slow-page.sjs
[browser_switchTab_closesUrlbarPopup.js]

Просмотреть файл

@ -30,15 +30,23 @@ add_task(async function() {
true
);
let initialValue = gURLBar.untrimmedValue;
let expectedURLBarChange = SLOW_PAGE;
let sawChange = false;
let handler = e => {
sawChange = true;
is(
let handler = () => {
isnot(
gURLBar.untrimmedValue,
expectedURLBarChange,
"Should not change URL bar value!"
initialValue,
"Should not revert URL bar value!"
);
if (gURLBar.getAttribute("pageproxystate") == "valid") {
sawChange = true;
is(
gURLBar.untrimmedValue,
expectedURLBarChange,
"Should set expected URL bar value!"
);
}
};
let obs = new MutationObserver(handler);