зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1103588 - Part 2: Replace deprecated String#contains with String#includes in devtools tests. r=jryans
This commit is contained in:
Родитель
053a2f3273
Коммит
5cf84aa32d
|
@ -1,6 +1,8 @@
|
|||
// Check to make sure that a worker can be attached to a toolbox
|
||||
// directly, and that the toolbox has expected properties.
|
||||
|
||||
"use strict";
|
||||
|
||||
// Whitelisting this test.
|
||||
// As part of bug 1077403, the leaking uncaught rejections should be fixed.
|
||||
thisTestLeaksUncaughtRejectionsAndShouldBeFixed("[object Object]");
|
||||
|
@ -33,7 +35,7 @@ add_task(function* () {
|
|||
Toolbox.HostType.WINDOW);
|
||||
|
||||
is(toolbox._host.type, "window", "correct host");
|
||||
ok(toolbox._host._window.document.title.contains(WORKER_URL),
|
||||
ok(toolbox._host._window.document.title.includes(WORKER_URL),
|
||||
"worker URL in host title");
|
||||
|
||||
let toolTabs = toolbox.doc.querySelectorAll(".devtools-tab");
|
||||
|
|
|
@ -16,7 +16,7 @@ add_task(function*() {
|
|||
let client = yield startTestDebuggerServer("promises-actor-test");
|
||||
let chromeActors = yield getChromeActors(client);
|
||||
|
||||
ok(Promise.toString().contains("native code"), "Expect native DOM Promise");
|
||||
ok(Promise.toString().includes("native code"), "Expect native DOM Promise");
|
||||
|
||||
// We have to attach the chrome TabActor before playing with the PromiseActor
|
||||
yield attachTab(client, chromeActors);
|
||||
|
|
|
@ -18,7 +18,7 @@ add_task(function*() {
|
|||
let client = yield startTestDebuggerServer("promises-actor-test");
|
||||
let chromeActors = yield getChromeActors(client);
|
||||
|
||||
ok(Promise.toString().contains("native code"), "Expect native DOM Promise");
|
||||
ok(Promise.toString().includes("native code"), "Expect native DOM Promise");
|
||||
|
||||
// We have to attach the chrome TabActor before playing with the PromiseActor
|
||||
yield attachTab(client, chromeActors);
|
||||
|
|
|
@ -15,7 +15,7 @@ add_task(function*() {
|
|||
let client = yield startTestDebuggerServer("promises-object-test");
|
||||
let chromeActors = yield getChromeActors(client);
|
||||
|
||||
ok(Promise.toString().contains("native code"), "Expect native DOM Promise.");
|
||||
ok(Promise.toString().includes("native code"), "Expect native DOM Promise.");
|
||||
|
||||
// We have to attach the chrome TabActor before playing with the PromiseActor
|
||||
yield attachTab(client, chromeActors);
|
||||
|
|
|
@ -16,7 +16,7 @@ add_task(function*() {
|
|||
let client = yield startTestDebuggerServer("test-promises-timetosettle");
|
||||
let chromeActors = yield getChromeActors(client);
|
||||
|
||||
ok(Promise.toString().contains("native code"), "Expect native DOM Promise.");
|
||||
ok(Promise.toString().includes("native code"), "Expect native DOM Promise.");
|
||||
|
||||
// We have to attach the chrome TabActor before playing with the PromiseActor
|
||||
yield attachTab(client, chromeActors);
|
||||
|
|
|
@ -17,7 +17,7 @@ add_task(function*() {
|
|||
let chromeActors = yield getChromeActors(client);
|
||||
yield attachTab(client, chromeActors);
|
||||
|
||||
ok(Promise.toString().contains("native code"), "Expect native DOM Promise.");
|
||||
ok(Promise.toString().includes("native code"), "Expect native DOM Promise.");
|
||||
|
||||
// We have to attach the chrome TabActor before playing with the PromiseActor
|
||||
yield attachTab(client, chromeActors);
|
||||
|
|
|
@ -664,12 +664,12 @@ function makeFilterPredicate(filterString) {
|
|||
}
|
||||
|
||||
if (isSavedFrame(node.name)) {
|
||||
return node.name.source.contains(filterString)
|
||||
|| (node.name.functionDisplayName || "").contains(filterString)
|
||||
|| (node.name.asyncCause || "").contains(filterString);
|
||||
return node.name.source.includes(filterString)
|
||||
|| (node.name.functionDisplayName || "").includes(filterString)
|
||||
|| (node.name.asyncCause || "").includes(filterString);
|
||||
}
|
||||
|
||||
return String(node.name).contains(filterString);
|
||||
return String(node.name).includes(filterString);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ do_register_cleanup(() => {
|
|||
|
||||
add_task(function* test_normal() {
|
||||
yield DevToolsUtils.fetch(NORMAL_URL).then(({content}) => {
|
||||
ok(content.contains("The content looks correct."),
|
||||
ok(content.includes("The content looks correct."),
|
||||
"The content looks correct.");
|
||||
});
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче