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

Unified Diff: LayoutTests/dart/inspector/debugger.html

Issue 1532413002: Added Dartium changes onto 45.0.2454.104 (Closed) Base URL: http://src.chromium.org/blink/branches/chromium/2454
Patch Set: Created 5 years 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 | « LayoutTests/dart/inspector/debugger.dart ('k') | LayoutTests/dart/inspector/debugger-code-in-html.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/dart/inspector/debugger.html
diff --git a/LayoutTests/dart/inspector/debugger.html b/LayoutTests/dart/inspector/debugger.html
new file mode 100644
index 0000000000000000000000000000000000000000..8eb1f6941f7515c82402d79e871d20d2b575fc43
--- /dev/null
+++ b/LayoutTests/dart/inspector/debugger.html
@@ -0,0 +1,102 @@
+<html>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/debugger-test.js"></script>
+
+<script type="application/dart" src="debugger.dart"></script>
+
+<script>
+
+function testFunction() {
+ window.postMessage('fromJS', '*');
+}
+
+function handleReplyFromDart(event)
+{
+ if (event.data == 'fromDart')
+ debugger;
+}
+
+window.addEventListener('load', function()
+{
+ window.addEventListener('message', handleReplyFromDart);
+});
+
+function test()
+{
+ var panel = WebInspector.inspectorView.showPanel("sources");
+ InspectorTest.runDebuggerTestSuite([
+ function testSetBreakpoint(next)
+ {
+ InspectorTest.showScriptSource('debugger.dart', didShowScriptSource);
+
+ function didShowScriptSource(sourceFrame)
+ {
+ setBreakpointAndWaitUntilPaused(sourceFrame, 13, didPauseInDart);
+ InspectorTest.runTestFunction();
+ }
+
+ function didPauseInDart(callFrames)
+ {
+ InspectorTest.captureStackTrace(callFrames, false, true);
+ InspectorTest.resumeExecution(resumedDart);
+ }
+
+ function resumedDart()
+ {
+ InspectorTest.waitUntilPaused(didPauseInJS);
+ }
+
+ function didPauseInJS(callFrames)
+ {
+ InspectorTest.captureStackTrace(callFrames, false, true);
+ InspectorTest.resumeExecution(next);
+ }
+ },
+
+ function testRemoveBreakpoint(next)
+ {
+ InspectorTest.showScriptSource('debugger.dart', didShowScriptSource);
+
+ function didShowScriptSource(sourceFrame)
+ {
+ InspectorTest.removeBreakpoint(sourceFrame, 13);
+ InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
+ }
+
+ function didPause(callFrames)
+ {
+ // Should pause in JS.
+ InspectorTest.captureStackTrace(callFrames, false, true);
+ InspectorTest.resumeExecution(next);
+ }
+ }
+ ]);
+
+ function setBreakpointAndWaitUntilPaused(sourceFrame, lineNumber, pausedCallback)
+ {
+ var expectedBreakpointId;
+ InspectorTest.addSniffer(WebInspector.BreakpointManager.TargetBreakpoint.prototype, "_didSetBreakpointInDebugger", didSetBreakpointInDebugger);
+ InspectorTest.setBreakpoint(sourceFrame, lineNumber, "", true);
+
+ function didSetBreakpointInDebugger(callback, breakpointId)
+ {
+ expectedBreakpointId = breakpointId;
+ InspectorTest.waitUntilPaused(didPause);
+ }
+
+ function didPause(callFrames, reason, breakpointIds)
+ {
+ InspectorTest.assertEquals(breakpointIds.length, 1);
+ InspectorTest.assertEquals(breakpointIds[0], expectedBreakpointId);
+ InspectorTest.assertEquals(reason, "other");
+
+ pausedCallback(callFrames);
+ }
+ }
+};
+
+</script>
+
+<body onload="runTest()">
+</body>
+</html>
« no previous file with comments | « LayoutTests/dart/inspector/debugger.dart ('k') | LayoutTests/dart/inspector/debugger-code-in-html.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698