Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* vim:set ts=2 sw=2 sts=2 et: */
2 /*
3 * Any copyright is dedicated to the Public Domain.
4 * http://creativecommons.org/publicdomain/zero/1.0/
5 *
6 * Contributor(s):
7 * Mihai Sucan <mihai.sucan@gmail.com>
8 */
10 const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-621644-jsterm-dollar.html";
12 function test$(HUD) {
13 HUD.jsterm.clearOutput();
15 HUD.jsterm.execute("$(document.body)", (msg) => {
16 ok(msg.textContent.indexOf("<p>") > -1,
17 "jsterm output is correct for $()");
19 test$$(HUD);
20 });
21 }
23 function test$$(HUD) {
24 HUD.jsterm.clearOutput();
26 HUD.jsterm.setInputValue();
27 HUD.jsterm.execute("$$(document)", (msg) => {
28 ok(msg.textContent.indexOf("621644") > -1,
29 "jsterm output is correct for $$()");
30 finishTest();
31 });
32 }
34 function test() {
35 addTab(TEST_URI);
36 browser.addEventListener("load", function onLoad() {
37 browser.removeEventListener("load", onLoad, true);
38 openConsole(null, test$);
39 }, true);
40 }