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
[browser_webconsole_reopen_closed_tab.js]
[browser_webconsole_repeat_different_objects.js]
skip-if = true # Bug 1401953
[browser_webconsole_repeated_messages_accuracy.js]
skip-if = true # Bug 1403450
[browser_webconsole_sandbox_update_after_navigation.js]

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

@ -9,55 +9,25 @@
"use strict";
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* () {
yield loadTab(TEST_URI);
let hud = yield openConsole();
add_task(async function () {
let hud = await openNewTabAndConsole(TEST_URI);
hud.jsterm.clearOutput();
info("waiting for 3 console.log objects");
hud.jsterm.clearOutput(true);
hud.jsterm.execute("window.testConsoleObjects()");
let [result] = yield waitForMessages({
webconsole: hud,
messages: [{
name: "3 console.log messages",
text: "abba",
category: CATEGORY_WEBDEV,
severity: SEVERITY_LOG,
count: 3,
repeats: 1,
objects: true,
}],
let onMessages = waitForMessages({
hud,
messages: [
{ text: "abba" },
{ text: "abba" },
{ text: "abba" },
],
});
let msgs = [...result.matched];
is(msgs.length, 3, "3 message elements");
hud.jsterm.execute("window.testConsoleObjects()");
for (let i = 0; i < msgs.length; i++) {
info("test message element #" + i);
info("waiting for 3 console.log objects, with the exact same text content");
let messages = await onMessages;
let msg = msgs[i];
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 });
}
is(messages.length, 3, "3 message elements");
});

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

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