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

Side by Side Diff: LayoutTests/inspector/sources/debugger/callstack-placards-discarded.html

Issue 1153923005: DevTools: shard inspector/debugger tests for faster execution. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script>
6
7 function testFunction()
8 {
9 debugger;
10 }
11
12 var test = function()
13 {
14 InspectorTest.runDebuggerTestSuite([
15 function testCallStackPlacardsDiscarded(next)
16 {
17 InspectorTest.debuggerModel.addEventListener(WebInspector.DebuggerMo del.Events.DebuggerPaused, didPause, this);
18 var previousCount = undefined;
19 function didPause(event)
20 {
21 InspectorTest.addResult("Received DebuggerPaused event.");
22 var callFrame = event.data.callFrames[0];
23 InspectorTest.addResult("Function name: " + callFrame.functionNa me);
24 var count = liveLocationsCount();
25 if (previousCount !== undefined && count !== previousCount)
26 InspectorTest.addResult("FAILED: Live locations count has ch anged!");
27 previousCount = count;
28 }
29
30 InspectorTest.showScriptSource("callstack-placards-discarded.html", didShowScriptSource);
31 function didShowScriptSource(sourceFrame)
32 {
33 InspectorTest.addResult("Script source was shown.");
34 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause1);
35 }
36 function didPause1()
37 {
38 InspectorTest.resumeExecution(didResume1)
39 }
40 function didResume1()
41 {
42 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause2);
43 }
44 function didPause2()
45 {
46 InspectorTest.resumeExecution(didResume2)
47 }
48 function didResume2()
49 {
50 next();
51 }
52 },
53 ]);
54
55 function liveLocationsCount()
56 {
57 var count = 0;
58 var infos = WebInspector.debuggerWorkspaceBinding._targetToData.get(Insp ectorTest.debuggerModel.target()).scriptDataMap.valuesArray();
59 infos.forEach(function(info) {
60 count += info._locations.size;
61 });
62 return count;
63 }
64 }
65
66 </script>
67 </head>
68
69 <body onload="runTest()">
70 <p>
71 Tests that RawSourceCode listeners count won't grow on each script pause. <a hre f="https://bugs.webkit.org/show_bug.cgi?id=70996">Bug 70996</a>
72 </p>
73
74 </body>
75 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698