Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Unified Diff: LayoutTests/inspector/sources/debugger/live-edit.html

Issue 329533002: DevTools: Added test that LiveEdit doesn't crash on breakpoint (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master2
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger/live-edit-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
-
}
};
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger/live-edit-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698