Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / debugger-pause / pause-in-inline-script.html
bloba890f6e81b6b8bd06788b35e1fcaffdfb503f3ac
1 <html>
2 <head>
3 <script>function foo() { };
4 </script>
5 <script>
6 function bar() { };
7 </script><script>function f1() { debugger; }</script>
8 <script>
9 function f2() { return f1(); }
10 </script>
12 <script>
13 function f3()
15 return f2();
17 f3();
18 </script>
20 <script src="../../../http/tests/inspector/inspector-test.js"></script>
21 <script src="../../../http/tests/inspector/debugger-test.js"></script>
23 <script>
25 var test = function()
27 var testName = InspectorTest.resourceTreeModel.inspectedPageURL();
28 testName = testName.substring(testName.lastIndexOf('/') + 1);
30 InspectorTest.startDebuggerTest(step1);
32 function step1()
34 InspectorTest.addResult("Did load front-end");
35 InspectorTest.addResult("Paused: " + !!InspectorTest.debuggerModel.debuggerPausedDetails());
36 InspectorTest.reloadPage(didReload.bind(this));
37 InspectorTest.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.DebuggerPaused, didPauseAfterReload, this);
40 function didReload()
42 InspectorTest.addResult("didReload");
43 InspectorTest.completeDebuggerTest();
46 function didPauseAfterReload(details)
48 InspectorTest.addResult("didPauseAfterReload");
49 InspectorTest.addResult("Source strings corresponding to the call stack:");
50 dumpNextCallFrame(didDump);
53 var callFrameIndex = 0;
54 function dumpNextCallFrame(next)
56 var callFrames = InspectorTest.debuggerModel.callFrames;
57 if (callFrameIndex === callFrames.length) {
58 next();
59 return;
61 var frame = callFrames[callFrameIndex];
62 var uiLocation = WebInspector.debuggerWorkspaceBinding.rawLocationToUILocation(frame.location());
63 InspectorTest.showUISourceCode(uiLocation.uiSourceCode, dumpCallFrameLine);
65 function dumpCallFrameLine(sourceFrame)
67 var resourceText = sourceFrame._textEditor.text();
68 var lines = resourceText.split("\n");
69 var lineNumber = uiLocation.lineNumber;
70 InspectorTest.addResult("Frame " + callFrameIndex + ") line " + lineNumber + ", content: " + lines[lineNumber] + " (must be part of function '" + frame.functionName + "')");
71 callFrameIndex++
72 dumpNextCallFrame(next);
76 function didDump()
78 InspectorTest.resumeExecution(didResume);
81 function didResume()
83 InspectorTest.addResult("didResume");
86 </script>
88 </head>
90 <body onload="runTest()">
91 <p>
92 Tests that main resource script text is correct when paused in inline script on reload.
93 <a href="https://bugs.webkit.org/show_bug.cgi?id=77548">Bug 77548.</a>
94 </p>
96 </body>
97 </html>