зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1843789 - Part 3: Rewrite testing/mochitest/BrowserTestUtils/BrowserTestUtils.sys.mjs consumers in html/xhtml to use ChromeUtils.importESModule. r=ahal,fxview-reviewers,sfoster
Differential Revision: https://phabricator.services.mozilla.com/D183659
This commit is contained in:
Родитель
36a17402b1
Коммит
d8c21fafdb
|
@ -15,8 +15,8 @@
|
|||
|
||||
<script type="application/javascript">
|
||||
<![CDATA[
|
||||
const { BrowserTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/BrowserTestUtils.jsm");
|
||||
const { BrowserTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs");
|
||||
const ABOUT_MOZILLA_URL = "about:mozilla";
|
||||
const ABOUT_LICENSE_URL = "about:license";
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
src="../promisified-events.js"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
const { BrowserTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/BrowserTestUtils.jsm");
|
||||
const { BrowserTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs");
|
||||
const { Downloads } = ChromeUtils.import(
|
||||
"resource://gre/modules/Downloads.jsm");
|
||||
|
||||
|
|
|
@ -62,8 +62,8 @@ fxview-category-button[name="category-five"]::part(icon) {
|
|||
"chrome://browser/content/utilityOverlay.js",
|
||||
this
|
||||
);
|
||||
const { BrowserTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/BrowserTestUtils.jsm"
|
||||
const { BrowserTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const fxviewCategoryNav = document.querySelector("fxview-category-navigation");
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
this
|
||||
);
|
||||
|
||||
const { BrowserTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/BrowserTestUtils.jsm"
|
||||
const { BrowserTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
const { PlacesQuery } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PlacesQuery.sys.mjs"
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
</div>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="application/javascript">
|
||||
const { BrowserTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/BrowserTestUtils.jsm"
|
||||
const { BrowserTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
const { TestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/TestUtils.sys.mjs"
|
||||
|
|
|
@ -212,7 +212,7 @@ async function waitForPreloaded(browser) {
|
|||
|
||||
/**
|
||||
* Helper function to navigate and wait for page to load
|
||||
* https://searchfox.org/mozilla-central/rev/b2716c233e9b4398fc5923cbe150e7f83c7c6c5b/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm#383
|
||||
* https://searchfox.org/mozilla-central/rev/314b4297e899feaf260e7a7d1a9566a218216e7a/testing/mochitest/BrowserTestUtils/BrowserTestUtils.sys.mjs#404
|
||||
*/
|
||||
async function waitForUrlLoad(url) {
|
||||
let browser = gBrowser.selectedBrowser;
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
title="215405 test">
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
Services.prefs.setBoolPref("browser.navigation.requireUserInteraction", false);
|
||||
|
||||
/* globals SimpleTest, is, isnot, ok */
|
||||
|
|
|
@ -20,7 +20,9 @@ windows.
|
|||
<!-- test code goes here -->
|
||||
<script type="application/javascript"><![CDATA[
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const BROWSER_DOC = "window_chromeOuterWindowID.xhtml";
|
||||
const TEST_PAGE = "http://example.com";
|
||||
|
|
|
@ -16,7 +16,9 @@
|
|||
// We are going to open new tabs with target=_blank and rel=noopener
|
||||
// Listen a new tab is opened then close the new tab, otherwise we will lose
|
||||
// focus for the next tests
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
const gBrowser = Services.wm.getMostRecentWindow("navigator:browser").gBrowser;
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "childLoadReady") {
|
||||
|
|
|
@ -18,7 +18,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=415498
|
|||
|
||||
<pre id="test">
|
||||
<script class="testbody" type="application/javascript"><![CDATA[
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
/** Test for Bug 415498 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
|
|
@ -16,7 +16,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=617528
|
|||
</body>
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
var _window;
|
||||
var browser;
|
||||
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
|
||||
<browser id="thebrowser" type="content" remote="true" />
|
||||
<script type="application/javascript"><![CDATA[
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const ok = window.arguments[0].ok;
|
||||
const is = window.arguments[0].is;
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
|
||||
<script type="application/javascript">
|
||||
"use strict";
|
||||
const { BrowserTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/BrowserTestUtils.jsm"
|
||||
const { BrowserTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
<body>
|
||||
|
||||
<script type="application/javascript">
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
var mainWindow;
|
||||
|
||||
|
|
|
@ -21,7 +21,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=936340
|
|||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv({'set': [["beacon.enabled", true]]}, beginTest);
|
||||
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
var baseURL = "http://mochi.test:8888/chrome/dom/tests/mochitest/beacon/";
|
||||
|
||||
|
|
|
@ -20,7 +20,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1557386
|
|||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv({'set': [["beacon.enabled", true]]}, beginTest);
|
||||
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
const { clearInterval, setInterval } = ChromeUtils.import(
|
||||
"resource://gre/modules/Timer.jsm"
|
||||
);
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
<body>
|
||||
|
||||
<script type="application/javascript">
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
var mainWindow;
|
||||
|
||||
var contentPage = "http://mochi.test:8888/chrome/dom/workers/test/empty.html";
|
||||
|
|
|
@ -35,7 +35,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1272623
|
|||
// Perform the spelling correction
|
||||
let mm = SpecialPowers.loadChromeScript(function() {
|
||||
/* eslint-env mozilla/chrome-script */
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
// Chrome scripts are run with synchronous messages, so make sure we're completely
|
||||
// decoupled from the content process before doing this work.
|
||||
|
|
|
@ -224,8 +224,8 @@ add_task(async function test_protocolHandler() {
|
|||
/* eslint-env mozilla/chrome-script */
|
||||
const CONTENT_HANDLING_URL =
|
||||
"chrome://mozapps/content/handling/appChooser.xhtml";
|
||||
const { BrowserTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/BrowserTestUtils.jsm"
|
||||
const { BrowserTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
let windowOpen = BrowserTestUtils.domWindowOpenedAndLoaded();
|
||||
|
|
|
@ -22,8 +22,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1486258
|
|||
<script type="text/javascript">
|
||||
/* global SpecialPowers */
|
||||
|
||||
const { BrowserTestUtils } = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
;
|
||||
const { BrowserTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const gOrigAvailableLocales = Services.locale.availableLocales;
|
||||
const gOrigRequestedLocales = Services.locale.requestedLocales;
|
||||
|
|
|
@ -19,7 +19,9 @@
|
|||
const {TestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/TestUtils.sys.mjs"
|
||||
);
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
var mainWindow = window.browsingContext.topChromeWindow;
|
||||
|
||||
|
|
|
@ -16,7 +16,9 @@
|
|||
<pre id="test">
|
||||
|
||||
<script class="testbody" type="text/javascript">
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
;
|
||||
const {TestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/TestUtils.sys.mjs"
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
|
||||
<script src="head.js"></script>
|
||||
<script class="testbody" type="text/javascript">
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
var mainWindow = window.browsingContext.topChromeWindow;
|
||||
|
||||
|
|
|
@ -23,7 +23,9 @@ var mainWindow = window.browsingContext.topChromeWindow;
|
|||
var contentPage = "http://www.itisatrap.org/chrome/toolkit/components/url-classifier/tests/mochitest/trackingRequest.html";
|
||||
|
||||
const {UrlClassifierTestUtils} = ChromeUtils.import("resource://testing-common/UrlClassifierTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
const {TestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/TestUtils.sys.mjs"
|
||||
);
|
||||
|
|
|
@ -20,7 +20,9 @@
|
|||
var mainWindow = window.window.browsingContext.topChromeWindow;
|
||||
var contentPage1 = "http://www.example.com/chrome/toolkit/components/url-classifier/tests/mochitest/bug_1580416.html";
|
||||
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
const {TestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/TestUtils.sys.mjs"
|
||||
);
|
||||
|
|
|
@ -21,7 +21,9 @@ var contentPage1 = "http://www.itisatrap.org/tests/toolkit/components/url-classi
|
|||
var contentPage2 = "http://example.com/tests/toolkit/components/url-classifier/tests/mochitest/whitelistFrame.html";
|
||||
|
||||
const {UrlClassifierTestUtils} = ChromeUtils.import("resource://testing-common/UrlClassifierTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
const {TestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/TestUtils.sys.mjs"
|
||||
);
|
||||
|
|
|
@ -12,7 +12,9 @@ Tests the alwaysOnTop window feature for the Windows OS.
|
|||
|
||||
<script type="application/javascript">
|
||||
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
const {ctypes} = ChromeUtils.import("resource://gre/modules/ctypes.jsm");
|
||||
|
||||
function assertAlwaysOnTop(win, expected) {
|
||||
|
|
|
@ -13,7 +13,9 @@ that is opened reports itself as being modal.
|
|||
|
||||
<script type="application/javascript">
|
||||
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
add_task(async function() {
|
||||
BrowserTestUtils.domWindowOpened().then((win) => {
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
var gFindBar = null;
|
||||
var gBrowser;
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
find-menu appears in editor element which has had makeEditable() called but designMode not set">
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
const {ContentTask} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/ContentTask.sys.mjs"
|
||||
);
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
title="331215 test">
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
var gFindBar = null;
|
||||
var gBrowser;
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
title="360437 test">
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
const {ContentTask} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/ContentTask.sys.mjs"
|
||||
);
|
||||
|
|
|
@ -15,7 +15,9 @@
|
|||
<script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
var gFindBar = null;
|
||||
var gBrowser;
|
||||
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
title="429723 test">
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
var gFindBar = null;
|
||||
var gBrowser;
|
||||
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
title="451540 test">
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
const SEARCH_TEXT = "minefield";
|
||||
|
||||
let gFindBar = null;
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
<script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
var gFindBar = null;
|
||||
var gBrowser;
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
title="findbar events test">
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
var gFindBar = null;
|
||||
var gBrowser;
|
||||
|
|
|
@ -20,7 +20,9 @@
|
|||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const SAMPLE_URL = "http://www.mozilla.org/";
|
||||
const SAMPLE_TEXT = "Some text in a text field.";
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
<script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
|
||||
<link rel="stylesheet" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
|
||||
<script>
|
||||
const { BrowserTestUtils } = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const { BrowserTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
const DEFAULT_SECTION_NAMES = ["one", "two", "three"];
|
||||
|
||||
function makeButton({ name, deckId }) {
|
||||
|
|
|
@ -21,7 +21,9 @@ var fm = Services.focus;
|
|||
var is = function(l, r, v) { window.arguments[0].SimpleTest.is(l, r, v); }
|
||||
var isnot = function(l, r, v) { window.arguments[0].SimpleTest.isnot(l, r, v); }
|
||||
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
async function runTest()
|
||||
{
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<script>
|
||||
ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function onLoad()
|
||||
{
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
|
||||
<pre id="test">
|
||||
<script class="testbody" type="application/javascript">
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
let video, controlBar, playButton;
|
||||
|
||||
|
|
|
@ -23,7 +23,9 @@
|
|||
</tabbox>
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
const {BrowserTestUtils} = ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
const {BrowserTestUtils} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BrowserTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче