| Index: LayoutTests/inspector/console/console-format-array-prototype.html
|
| diff --git a/LayoutTests/inspector/console/console-format-array-prototype.html b/LayoutTests/inspector/console/console-format-array-prototype.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a3aa7275666dfc6ca206386264158f20fc63b1d9
|
| --- /dev/null
|
| +++ b/LayoutTests/inspector/console/console-format-array-prototype.html
|
| @@ -0,0 +1,70 @@
|
| +<html>
|
| +<head>
|
| +<script src="../../http/tests/inspector/inspector-test.js"></script>
|
| +<script src="../../http/tests/inspector/console-test.js"></script>
|
| +<script>
|
| +
|
| +Array.prototype[0] = "proto0";
|
| +Array.prototype[10] = "proto10";
|
| +
|
| +function tearDown()
|
| +{
|
| + delete Array.prototype[0];
|
| + delete Array.prototype[10];
|
| +}
|
| +
|
| +var a0 = [];
|
| +var a1 = []; a1.length = 1;
|
| +var a2 = [,2,3];
|
| +var a3 = []; a3.length = 15;
|
| +var a4 = []; a4.length = 15; a4[8] = 8;
|
| +var a5 = []; a5.length = 15; a5[0] = 0; a5[10] = 10;
|
| +
|
| +var a6 = [,,,4]; a6.length = 15;
|
| +for (var i = 0; i < 6; ++i)
|
| + a6["index" + i] = i;
|
| +
|
| +function test()
|
| +{
|
| + loopOverGlobals(0, 7);
|
| +
|
| + function loopOverGlobals(current, total)
|
| + {
|
| + function advance()
|
| + {
|
| + var next = current + 1;
|
| + if (next === total) {
|
| + InspectorTest.evaluateInPage("tearDown()");
|
| + InspectorTest.expandConsoleMessages();
|
| + InspectorTest.runAfterPendingDispatches(finish);
|
| + } else {
|
| + loopOverGlobals(next, total);
|
| + }
|
| + }
|
| +
|
| + function finish()
|
| + {
|
| + var text = InspectorTest.textContentWithLineBreaks(WebInspector.consoleView.topGroup.element);
|
| + text = text.replace(/\bVM\d+/g, "VM");
|
| + InspectorTest.addResult(text);
|
| + InspectorTest.completeTest();
|
| + }
|
| +
|
| + InspectorTest.evaluateInConsole("a" + current);
|
| + InspectorTest.runAfterPendingDispatches(evalInConsole);
|
| + function evalInConsole()
|
| + {
|
| + InspectorTest.evaluateInPage("console.log(a" + current + ")");
|
| + InspectorTest.runAfterPendingDispatches(advance);
|
| + }
|
| + }
|
| +}
|
| +</script>
|
| +</head>
|
| +
|
| +<body onload="runTest()">
|
| +<p>
|
| +Tests that console logging dumps array values defined on Array.prototype[].
|
| +</p>
|
| +</body>
|
| +</html>
|
|
|