3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/console-test.js"></script>
12 console.log(globals[current]);
13 console.log([globals[current]]);
18 var foo = { foo: "foo"};
19 var bar = { bar: "bar" };
21 var array = ["test", "test2"]; array.length = 10;
25 var svg = document.getElementById("svg-node");
27 console.log("%o", array);
28 console.log("%O", array);
29 console.log("Test for zero \"%f\" in formatter", 0);
31 var regex1 = /^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i;
32 var regex2 = new RegExp("foo\\\\bar\\sbaz", "i");
34 var str2 = "test named \"test\"";
35 var error = new Error;
36 var errorWithMessage = new Error("my error message");
37 var node = document.getElementById("p");
38 var func = function() { return 1; };
39 var multilinefunc = function() {
43 var linkify = "http://webkit.org/";
44 var valuelessAttribute = document.createAttribute("attr");
45 var valuedAttribute = document.createAttribute("attr");
46 valuedAttribute.value = "value";
47 var existingAttribute = document.getElementById("x").attributes[0];
48 var throwingLengthGetter = {get length() { throw "Length called"; }};
49 var objectWithNonEnumerables = Object.create({ foo: 1 }, {
50 getFoo: { value: function() { return this.foo; } },
51 bar: { get: function() { return this.bar; }, set: function(x) { this.bar = x; } }
53 var negZero = 1 / Number.NEGATIVE_INFINITY;
56 regex1, regex2, str, str2, error, errorWithMessage, node, func, multilinefunc, num, linkify,
57 null, undefined, valuelessAttribute, valuedAttribute, existingAttribute, throwingLengthGetter,
58 NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, array, {}, [function() {}], bar, svg,
59 objectWithNonEnumerables, negZero, Object.create(null), Object, Object.prototype
67 InspectorTest.evaluateInPage("globals.length", loopOverGlobals.bind(this, 0));
69 function loopOverGlobals(current, total)
73 var next = current + 1;
74 if (next == total.description) {
75 InspectorTest.expandConsoleMessages();
76 InspectorTest.runAfterPendingDispatches(finish);
78 loopOverGlobals(next, total);
84 InspectorTest.dumpConsoleMessages();
85 InspectorTest.completeTest();
88 InspectorTest.evaluateInPage("log(" + current + ")");
89 InspectorTest.runAfterPendingDispatches(evalInConsole);
90 function evalInConsole()
92 InspectorTest.evaluateInConsole("globals[" + current + "]");
93 InspectorTest.runAfterPendingDispatches(advance);
100 <body onload="onload()">
102 <p id="p">Tests that console logging dumps proper messages.</p>
104 <svg id="svg-node"></svg>