Bug 1401953 - enable browser_webconsole_repeat_different_objects.js;r=nchevobbe

MozReview-Commit-ID: AVWJGeKrcCe

--HG--
extra : rebase_source : d0c3c1f44fbdb6b216eb84e075bb2c56541e622d
This commit is contained in:
Julian Descottes 2018-01-08 21:06:25 +01:00
Родитель 7f790cf77a
Коммит 8a5629f928
3 изменённых файлов: 16 добавлений и 47 удалений

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

@ -366,7 +366,6 @@ skip-if = true # Bug 1404832
skip-if = true # Bug 1406022 skip-if = true # Bug 1406022
[browser_webconsole_reopen_closed_tab.js] [browser_webconsole_reopen_closed_tab.js]
[browser_webconsole_repeat_different_objects.js] [browser_webconsole_repeat_different_objects.js]
skip-if = true # Bug 1401953
[browser_webconsole_repeated_messages_accuracy.js] [browser_webconsole_repeated_messages_accuracy.js]
skip-if = true # Bug 1403450 skip-if = true # Bug 1403450
[browser_webconsole_sandbox_update_after_navigation.js] [browser_webconsole_sandbox_update_after_navigation.js]

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

@ -9,55 +9,25 @@
"use strict"; "use strict";
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" + const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"test/test-repeated-messages.html"; "new-console-output/test/mochitest/test-repeated-messages.html";
add_task(function* () { add_task(async function () {
yield loadTab(TEST_URI); let hud = await openNewTabAndConsole(TEST_URI);
let hud = yield openConsole(); hud.jsterm.clearOutput();
info("waiting for 3 console.log objects"); let onMessages = waitForMessages({
hud,
hud.jsterm.clearOutput(true); messages: [
hud.jsterm.execute("window.testConsoleObjects()"); { text: "abba" },
{ text: "abba" },
let [result] = yield waitForMessages({ { text: "abba" },
webconsole: hud, ],
messages: [{
name: "3 console.log messages",
text: "abba",
category: CATEGORY_WEBDEV,
severity: SEVERITY_LOG,
count: 3,
repeats: 1,
objects: true,
}],
}); });
let msgs = [...result.matched]; hud.jsterm.execute("window.testConsoleObjects()");
is(msgs.length, 3, "3 message elements");
for (let i = 0; i < msgs.length; i++) { info("waiting for 3 console.log objects, with the exact same text content");
info("test message element #" + i); let messages = await onMessages;
let msg = msgs[i]; is(messages.length, 3, "3 message elements");
let clickable = msg.querySelector(".message-body a");
ok(clickable, "clickable object #" + i);
msg.scrollIntoView(false);
yield clickObject(clickable, i);
}
function* clickObject(obj, i) {
executeSoon(() => {
EventUtils.synthesizeMouse(obj, 2, 2, {}, hud.iframeWindow);
});
let varView = yield hud.jsterm.once("variablesview-fetched");
ok(varView, "variables view fetched #" + i);
yield findVariableViewProperties(varView, [
{ name: "id", value: "abba" + i },
], { webconsole: hud });
}
}); });

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

@ -14,7 +14,7 @@
} }
function testConsoleObjects() { function testConsoleObjects() {
for (var i = 0; i < 3; i++) { for (var i = 0; i < 3; i++) {
var o = { id: "abba" + i }; var o = { id: "abba" };
console.log("abba", o); console.log("abba", o);
} }
} }