зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1843790 - Part 8: Rewrite toolkit/modules/PrivateBrowsingUtils.sys.mjs consumers in html/xhtml to use ChromeUtils.importESModule. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D183667
This commit is contained in:
Родитель
e08b2de358
Коммит
7493bd3c30
|
@ -97,7 +97,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1123480
|
|||
|
||||
// Repeat procedure of plain text selection with private browsing
|
||||
// disabled and enabled
|
||||
const {PrivateBrowsingUtils} = ChromeUtils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
|
||||
const {PrivateBrowsingUtils} = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PrivateBrowsingUtils.sys.mjs"
|
||||
);
|
||||
for (let private of [false, true]) {
|
||||
var win = window.browsingContext.topChromeWindow.open("about:blank", "_blank", "chrome, width=500, height=200" + (private ? ", private" : ""));
|
||||
ok(win, private ? "should open private window" : "should open non-private window");
|
||||
|
|
|
@ -80,7 +80,9 @@
|
|||
}
|
||||
|
||||
function RunTest() {
|
||||
const {PrivateBrowsingUtils} = ChromeUtils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
|
||||
const {PrivateBrowsingUtils} = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PrivateBrowsingUtils.sys.mjs"
|
||||
);
|
||||
|
||||
var win = window.browsingContext.topChromeWindow.open("about:blank", "_blank", "chrome, width=500, height=200");
|
||||
ok(win, "should open window");
|
||||
|
|
Загрузка…
Ссылка в новой задаче