| Index: LayoutTests/inspector/sources/debugger/live-edit.html
|
| diff --git a/LayoutTests/inspector/sources/debugger/live-edit.html b/LayoutTests/inspector/sources/debugger/live-edit.html
|
| index 6e864fed2f34f93ee12a8e0943e8a03d55a65d18..a4e34db346f49f994c22ef7a2c1a921b718cff86 100644
|
| --- a/LayoutTests/inspector/sources/debugger/live-edit.html
|
| +++ b/LayoutTests/inspector/sources/debugger/live-edit.html
|
| @@ -119,6 +119,45 @@ function test()
|
| InspectorTest.assertEquals("5", lineNumber);
|
| 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()
|
| InspectorTest.addSniffer(WebInspector.debuggerModel, "_didEditScriptSource", callback);
|
| InspectorTest.replaceInSource(sourceFrame, string, replacement);
|
| InspectorTest.commitSource(sourceFrame);
|
| -
|
| }
|
| };
|
|
|
|
|