3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../http/tests/inspector/console-test.js"></script>
5 <script src=
"../../http/tests/inspector/sources-test.js"></script>
10 for (var i
= 3; i
< 8; ++i
)
11 window
["temp" + i
] = "Reserved";
25 "[1, 2, NaN, -0, null, undefined]",
27 "(function(){ return arguments; })(1,2,3,4)",
28 "(function func() {})",
32 InspectorTest
.addResult("Number of expressions: " + expressions
.length
);
33 InspectorTest
.addResult("Names [temp3..temp7] are reserved\n");
35 function evaluateNext()
37 var expression
= expressions
.shift();
39 InspectorTest
.waitForRemoteObjectsConsoleMessages(dumpConsoleMessages
);
43 function didEvaluate(result
, wasThrown
)
45 InspectorTest
.assertTrue(!wasThrown
, "FAIL: was thrown. Expression: " + expression
);
46 WebInspector
.panels
.sources
._saveToTempVariable(result
);
47 InspectorTest
.waitUntilNthMessageReceived(2, evaluateNext
);
50 WebInspector
.context
.flavor(WebInspector
.ExecutionContext
).evaluate(expression
, "console", true, undefined, undefined, undefined, didEvaluate
);
53 function dumpConsoleMessages()
55 InspectorTest
.dumpConsoleMessagesIgnoreErrorStackFrames();
56 InspectorTest
.completeTest();
65 <body onload=
"onload()">
67 Tests saving objects to temporary variables.