Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* vim:set ts=2 sw=2 sts=2 et: */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 // Tests that the page's resources are displayed in the console as they're
7 // loaded
9 const TEST_NETWORK_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-network.html" + "?_date=" + Date.now();
11 function test() {
12 addTab("data:text/html;charset=utf-8,Web Console basic network logging test");
13 browser.addEventListener("load", onLoad, true);
15 function onLoad() {
16 browser.removeEventListener("load", onLoad, true);
17 openConsole(null, function(hud) {
18 content.location = TEST_NETWORK_URI;
19 waitForMessages({
20 webconsole: hud,
21 messages: [{
22 text: "running network console",
23 category: CATEGORY_WEBDEV,
24 severity: SEVERITY_LOG,
25 },
26 {
27 text: "test-network.html",
28 category: CATEGORY_NETWORK,
29 severity: SEVERITY_LOG,
30 },
31 {
32 text: "testscript.js",
33 category: CATEGORY_NETWORK,
34 severity: SEVERITY_LOG,
35 },
36 {
37 text: "test-image.png",
38 category: CATEGORY_NETWORK,
39 severity: SEVERITY_LOG,
40 }],
41 }).then(finishTest);
42 });
43 }
44 }