| Index: LayoutTests/dart/inspector/debugger-eval-on-call-frame.html
|
| diff --git a/LayoutTests/dart/inspector/debugger-eval-on-call-frame.html b/LayoutTests/dart/inspector/debugger-eval-on-call-frame.html
|
| index fe7c1b66efd649979327e3174c726bef8c4eca33..feeef363f572e2d87b7756cd5df703cdffdf30d1 100644
|
| --- a/LayoutTests/dart/inspector/debugger-eval-on-call-frame.html
|
| +++ b/LayoutTests/dart/inspector/debugger-eval-on-call-frame.html
|
| @@ -1,6 +1,7 @@
|
| <html>
|
| <script src="../../http/tests/inspector/inspector-test.js"></script>
|
| <script src="../../http/tests/inspector/debugger-test.js"></script>
|
| +<script src="../../http/tests/inspector/console-test.js"></script>
|
|
|
| <script type="application/dart" src="debugger-eval-on-call-frame.DART"></script>
|
|
|
| @@ -17,6 +18,20 @@ function testFunction() {
|
|
|
| function test()
|
| {
|
| + // Inject name mangling for Dart more deeply in the existing JS test
|
| + // framework to reduce the amount of code that we need to duplicate from
|
| + // the JS side.
|
| + realAddResult = InspectorTest.addResult;
|
| + InspectorTest.addResult = function(text) {
|
| + text = text.replace(/(file:\/\/\/\w):/g, "$1");
|
| + text = text.replace(/file:\/\/\/?[^: )]*([.]dart|[$]script|[$]trampoline)/g, "(SOURCE_LOCATION)");
|
| + text = text.replace(/\(file:\/\/\/?[^)]*\)/g, "(SOURCE_LOCATION)");
|
| + text = text.replace(/@\d+/g, "(VM_PRIVATE_MANGLING)");
|
| + text = text.replace(/\$main\-[0-9]*/g, "(DEFAULT_ISOLATE_NAME_SUFFIX)");
|
| + text = text.replace(/:\d\d\d+/g, ":xxxx");
|
| + return realAddResult.call(this, text);
|
| + };
|
| +
|
| var panel = WebInspector.inspectorView.showPanel("sources");
|
| InspectorTest.runDebuggerTestSuite([
|
| function testScopeChain(next)
|
| @@ -29,8 +44,9 @@ function test()
|
| function didShowScriptSource(sourceFrame)
|
| {
|
| // Break within the body of the closure method.
|
| - setBreakpointAndWaitUntilPaused('debugger-eval-on-call-frame.[dD][aA][rR][tT]', 36, didPauseInDart);
|
| - InspectorTest.runTestFunction();
|
| + setBreakpointAndWaitUntilPaused('debugger-eval-on-call-frame.DART', 36, didPauseInDart);
|
| +
|
| + //setBreakpointAndWaitUntilPaused('debugger-eval-on-call-frame.[dD][aA][rR][tT]', 36, didPauseInDart);
|
| }
|
|
|
| function didPauseInDart(callFrames)
|
| @@ -72,11 +88,12 @@ function test()
|
| 'inspect(document.documentElement).tagName',
|
| 'inspect(document.body).tagName',
|
| 'inspect(document.body.children.first).tagName',
|
| + '$4', // should fail as $4 is not defined yet
|
| '$0.toString()',
|
| '$1.toString()',
|
| '$2.toString()',
|
| - '$1 == document.body',
|
| - '$1 == document.body',
|
| + '$0 == document.body.children.first',
|
| + '$1 != document.body',
|
| '$2 == document.documentElement',
|
| // FIXME(jacobr): we had to remove this as it logs a
|
| // message to the console with a line number in the
|
| @@ -90,27 +107,17 @@ function test()
|
|
|
| function setBreakpointAndWaitUntilPaused(urlRegex, lineNumber, pausedCallback)
|
| {
|
| - var expectedBreakpointId;
|
| - WebInspector.debuggerModel._agent.setBreakpointByUrl(lineNumber, undefined, urlRegex, 0, "", undefined, "dart", didSetBreakpointInDebugger);
|
| -
|
| - function didSetBreakpointInDebugger(callback, breakpointId)
|
| - {
|
| - expectedBreakpointId = breakpointId;
|
| - InspectorTest.waitUntilPaused(didPause);
|
| - }
|
| + InspectorTest.DebuggerAgent.invoke_setBreakpointByUrl({urlRegex: urlRegex, lineNumber:lineNumber}, step2);
|
|
|
| - function didPause(callFrames, reason, breakpointIds)
|
| + function step2(result)
|
| {
|
| - InspectorTest.assertEquals(breakpointIds.length, 1);
|
| - InspectorTest.assertEquals(breakpointIds[0], expectedBreakpointId);
|
| - InspectorTest.assertEquals(reason, "other");
|
| -
|
| - pausedCallback(callFrames);
|
| + InspectorTest.runTestFunctionAndWaitUntilPaused(pausedCallback);
|
| }
|
| }
|
| };
|
| </script>
|
|
|
| <body onload="runTest()">
|
| + <div></div>
|
| </body>
|
| </html>
|
|
|