Crash test case:

1. Open page with javascript
2. Add breakpoint
3. Stop on breakpoint
4. Use live edit and save script
The test worked for Chromium revision until May 30.

Review URL: https://codereview.chromium.org/329533002

git-svn-id: svn://svn.chromium.org/blink/trunk@176101 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 3f9d5168
......@@ -35,3 +35,7 @@ Script execution resumed.
Running: testBreakpointsUpdated
Running: testNoCrashWhenLiveEditOnBreakpoint
Script execution paused.
Script execution resumed.
......@@ -119,6 +119,38 @@ function test()
InspectorTest.assertEquals("5", lineNumber);
next();
}
},
function testNoCrashWhenLiveEditOnBreakpoint(next)
{
InspectorTest.showScriptSource("edit-me.js", didShowScriptSource);
function didShowScriptSource(sourceFrame)
{
InspectorTest.addSniffer(sourceFrame, "_addBreakpointDecoration", breakpointAdded);
InspectorTest.setBreakpoint(sourceFrame, 3, "", true);
}
function breakpointAdded()
{
InspectorTest.waitUntilPaused(pausedInF);
InspectorTest.evaluateInPageWithTimeout("f()");
}
function pausedInF(callFrames)
{
replaceInSource(panel.visibleView, "function f()", "function f()\n", didEditScriptSource);
}
function didEditScriptSource()
{
InspectorTest.resumeExecution(resumed);
}
function resumed()
{
next();
}
}
]);
......@@ -127,7 +159,6 @@ function test()
InspectorTest.addSniffer(WebInspector.debuggerModel, "_didEditScriptSource", callback);
InspectorTest.replaceInSource(sourceFrame, string, replacement);
InspectorTest.commitSource(sourceFrame);
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment