blob: 157d5825ef520fc438feb0ab81b2993f4f213383 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
// Test to see if retrieving cached messages in a page with a cross-domain iframe does
// not crash the console.
"use strict";
const TEST_URI =
"http://example.com/browser/devtools/client/webconsole/" +
"test/browser/test-iframe-parent.html";
add_task(async function () {
// test-iframe-parent has an iframe pointing to http://mochi.test:8888/browser/devtools/client/webconsole/test/browser/test-iframe-child.html
info("Open the tab first");
await addTab(TEST_URI);
info("Evaluate an expression that will throw, so we'll have cached messages");
await SpecialPowers.spawn(gBrowser.selectedBrowser, [], function () {
content.wrappedJSObject.document.querySelector("button").click();
});
info("Then open the console, to retrieve cached messages");
await openConsole();
// TODO: Make the test fail without the fix.
ok(true, "Everything is okay");
});
|