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

Unified Diff: LayoutTests/dart/inspector/debugger-code-in-html.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
Index: LayoutTests/dart/inspector/debugger-code-in-html.html
diff --git a/LayoutTests/dart/inspector/debugger-code-in-html.html b/LayoutTests/dart/inspector/debugger-code-in-html.html
new file mode 100644
index 0000000000000000000000000000000000000000..628efe872f7b8f19bdbf4464cde8acfd1452643b
--- /dev/null
+++ b/LayoutTests/dart/inspector/debugger-code-in-html.html
@@ -0,0 +1,100 @@
+<html>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/debugger-test.js"></script>
+
+<script type="application/dart">
+
+import 'dart:html';
+
+main() {
+ window.onMessage.listen(handleMessage);
+}
+
+handleMessage(event) {
+ if (event.data == 'fromJS') {
+ handleMessage2(event);
+ }
+}
+
+handleMessage2(event) {
+ window.postMessage('fromDart', '*');
+}
+
+</script>
+
+<script>
+function postMessageToDart()
+{
+ window.postMessage('fromJS', '*');
+}
+
+function testFunction() {
+ postMessageToDart();
+}
+
+function handleReplyFromDart(event)
+{
+ if (event.data == 'fromDart')
+ debugger;
+}
+
+window.addEventListener('load', function()
+{
+ window.addEventListener('message', handleReplyFromDart);
+});
+
+function test()
+{
+ InspectorTest.runDebuggerTestSuite([
+ function testSetBreakpoint(next)
+ {
+ InspectorTest.showScriptSource('debugger-code-in-html.html', didShowScriptSource);
+
+ function didShowScriptSource(sourceFrame)
+ {
+ InspectorTest.setBreakpoint(sourceFrame, 19, '', true);
+ InspectorTest.runTestFunctionAndWaitUntilPaused(didPauseInDart);
+ }
+
+ 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-code-in-html.html', didShowScriptSource);
+
+ function didShowScriptSource(sourceFrame)
+ {
+ InspectorTest.removeBreakpoint(sourceFrame, 19);
+ InspectorTest.runTestFunctionAndWaitUntilPaused(didPauseInDart);
+ }
+
+ function didPause(callFrames)
+ {
+ // Should pause in JS.
+ InspectorTest.captureStackTrace(callFrames, false, true);
+ InspectorTest.resumeExecution(next);
+ }
+ }
+ ]);
+};
+
+</script>
+
+<body onload="runTest()">
+</body>
+</html>
« no previous file with comments | « LayoutTests/dart/inspector/debugger.html ('k') | LayoutTests/dart/inspector/debugger-code-in-html-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698