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/debugger-test.js"></script>
14 function testFunction()
16 var localObject1
= { a
: 310 };
17 var localObject2
= 42;
23 InspectorTest
.startDebuggerTest(step1
, true);
25 function evalLocalVariables(callback
)
27 InspectorTest
.evaluateInConsoleAndDump("localObject1.a", next
);
30 InspectorTest
.evaluateInConsoleAndDump("localObject2", callback
);
34 function localScopeObject()
36 var pane
= WebInspector
.panels
.sources
.sidebarPanes
.scopechain
;
37 var localsSection
= pane
._sections
[0];
38 return localsSection
._object
;
43 InspectorTest
.runTestFunctionAndWaitUntilPaused(step2
);
46 function step2(callFrames
)
48 var pane
= WebInspector
.panels
.sources
.sidebarPanes
.callstack
;
49 pane
._callFrameSelected(pane
.callFrames
[1]);
50 InspectorTest
.runAfterPendingDispatches(step3
);
55 InspectorTest
.addResult("\nEvaluated before modification:");
56 evalLocalVariables(step4
);
61 localScopeObject().setPropertyValue("localObject1", "({ a: -290})", step5
);
66 localScopeObject().setPropertyValue({ value
: "localObject2" }, "123", step6
);
71 InspectorTest
.addResult("\nEvaluated after modification:");
72 evalLocalVariables(step7
);
77 InspectorTest
.completeDebuggerTest();
84 <body onload=
"runTest()">
86 Tests that modifying local variables works fine.