зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1588835 - fix browser_bug633691.js to pass with fission enabled, r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D49313 --HG-- rename : browser/base/content/test/general/browser_bug633691.js => browser/base/content/test/about/browser_bug633691.js extra : moz-landing-system : lando
This commit is contained in:
Родитель
ac77a58192
Коммит
00077cbcd6
|
@ -27,3 +27,4 @@ skip-if = os == "mac" || (os == "linux" && (!debug || bits == 64)) || (os == 'wi
|
|||
[browser_aboutSupport_newtab_security_state.js]
|
||||
[browser_bug435325.js]
|
||||
skip-if = fission || (verify && !debug && os == 'mac')
|
||||
[browser_bug633691.js]
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
add_task(async function test() {
|
||||
const URL = "data:text/html,<iframe width='700' height='700'></iframe>";
|
||||
await BrowserTestUtils.withNewTab({ gBrowser, url: URL }, async function(
|
||||
browser
|
||||
) {
|
||||
let context = await ContentTask.spawn(browser, null, function() {
|
||||
let iframe = content.document.querySelector("iframe");
|
||||
iframe.src = "https://expired.example.com/";
|
||||
return BrowsingContext.getFromWindow(iframe.contentWindow);
|
||||
});
|
||||
await TestUtils.waitForCondition(() => {
|
||||
let frame = context.currentWindowGlobal;
|
||||
info(frame.documentURI.spec);
|
||||
return frame && frame.documentURI.spec.startsWith("about:certerror");
|
||||
});
|
||||
await SpecialPowers.spawn(context, [], async function() {
|
||||
await ContentTaskUtils.waitForCondition(
|
||||
() => content.document.readyState == "interactive"
|
||||
);
|
||||
let aP = content.document.getElementById("badCertAdvancedPanel");
|
||||
Assert.ok(aP, "Advanced content should exist");
|
||||
Assert.ok(
|
||||
ContentTaskUtils.is_hidden(aP),
|
||||
"Advanced content should not be visible by default"
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
|
@ -192,9 +192,6 @@ skip-if = (verify && debug && (os == 'linux'))
|
|||
# DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
|
||||
[browser_bug624734.js]
|
||||
# DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
|
||||
[browser_bug633691.js]
|
||||
# DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
|
||||
skip-if = fission
|
||||
[browser_bug647886.js]
|
||||
# DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
|
||||
[browser_bug664672.js]
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
add_task(async function test() {
|
||||
const URL = "data:text/html,<iframe width='700' height='700'></iframe>";
|
||||
await BrowserTestUtils.withNewTab({ gBrowser, url: URL }, async function(
|
||||
browser
|
||||
) {
|
||||
await ContentTask.spawn(
|
||||
browser,
|
||||
{
|
||||
is_element_hidden_: is_element_hidden.toSource(),
|
||||
is_hidden_: is_hidden.toSource(),
|
||||
},
|
||||
async function({ is_element_hidden_, is_hidden_ }) {
|
||||
let loadError = ContentTaskUtils.waitForEvent(
|
||||
this,
|
||||
"AboutNetErrorLoad",
|
||||
false,
|
||||
null,
|
||||
true
|
||||
);
|
||||
let iframe = content.document.querySelector("iframe");
|
||||
iframe.src = "https://expired.example.com/";
|
||||
|
||||
await loadError;
|
||||
|
||||
/* eslint-disable no-eval */
|
||||
let is_hidden = eval(`(() => ${is_hidden_})()`);
|
||||
let is_element_hidden = eval(`(() => ${is_element_hidden_})()`);
|
||||
/* eslint-enable no-eval */
|
||||
let doc = content.document.getElementsByTagName("iframe")[0]
|
||||
.contentDocument;
|
||||
let aP = doc.getElementById("badCertAdvancedPanel");
|
||||
ok(aP, "Advanced content should exist");
|
||||
void is_hidden; // Quiet eslint warnings (actual use under is_element_hidden)
|
||||
is_element_hidden(
|
||||
aP,
|
||||
"Advanced content should not be visible by default"
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
Загрузка…
Ссылка в новой задаче