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.

Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176101

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176226 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent cb9c513a
...@@ -35,3 +35,7 @@ Script execution resumed. ...@@ -35,3 +35,7 @@ Script execution resumed.
Running: testBreakpointsUpdated Running: testBreakpointsUpdated
Running: testNoCrashWhenLiveEditOnBreakpoint
Script execution paused.
Script execution resumed.
...@@ -119,6 +119,45 @@ function test() ...@@ -119,6 +119,45 @@ function test()
InspectorTest.assertEquals("5", lineNumber); InspectorTest.assertEquals("5", lineNumber);
next(); next();
} }
},
function testNoCrashWhenLiveEditOnBreakpoint(next)
{
InspectorTest.showScriptSource("edit-me.js", didShowScriptSource);
var testSourceFrame;
function didShowScriptSource(sourceFrame)
{
testSourceFrame = sourceFrame;
InspectorTest.addSniffer(sourceFrame, "_addBreakpointDecoration", uiBreakpointAdded);
InspectorTest.setBreakpoint(sourceFrame, 3, "", true);
}
function uiBreakpointAdded() {
InspectorTest.addSniffer(testSourceFrame, "_addBreakpointDecoration", breakpointAdded);
}
function breakpointAdded()
{
InspectorTest.waitUntilPaused(pausedInF);
InspectorTest.evaluateInPage("setTimeout(f, 0)");
}
function pausedInF(callFrames)
{
replaceInSource(panel.visibleView, "function f()", "function f()\n", didEditScriptSource);
}
function didEditScriptSource()
{
InspectorTest.resumeExecution(resumed);
}
function resumed()
{
next();
}
} }
]); ]);
...@@ -127,7 +166,6 @@ function test() ...@@ -127,7 +166,6 @@ function test()
InspectorTest.addSniffer(WebInspector.debuggerModel, "_didEditScriptSource", callback); InspectorTest.addSniffer(WebInspector.debuggerModel, "_didEditScriptSource", callback);
InspectorTest.replaceInSource(sourceFrame, string, replacement); InspectorTest.replaceInSource(sourceFrame, string, replacement);
InspectorTest.commitSource(sourceFrame); 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