| 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>
|
|
|