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

Side by Side Diff: LayoutTests/inspector/sources/debugger/debugger-eval-while-paused-throws.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/console-test.js"></script>
5 <script src="../../../http/tests/inspector/debugger-test.js"></script>
6 <script>
7
8 var globalObj = {
9 func: function()
10 {
11 throw new Error("globalObj.func");
12 }
13 };
14
15 function testFunction()
16 {
17 var localObj = {
18 func: function()
19 {
20 throw new Error("localObj.func");
21 }
22 };
23 debugger;
24 }
25
26 var test = function()
27 {
28 InspectorTest.startDebuggerTest(step1, true);
29
30 function injectedFunction()
31 {
32 var injectedObj = {
33 func: function()
34 {
35 throw new Error("injectedObj.func");
36 }
37 };
38 return injectedObj.func();
39 }
40
41 function step1()
42 {
43 InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
44 }
45
46 function step2()
47 {
48 InspectorTest.evaluateInPage(String(injectedFunction), step3);
49 }
50
51 function step3()
52 {
53 InspectorTest.evaluateInConsole("injectedFunction()", step4);
54 }
55
56 function step4()
57 {
58 InspectorTest.evaluateInConsole("localObj.func()", step5);
59 }
60
61 function step5()
62 {
63 InspectorTest.evaluateInConsole("globalObj.func()", dumpConsoleMessages) ;
64 }
65
66 function dumpConsoleMessages()
67 {
68 InspectorTest.addResult("Dumping console messages:\n");
69 InspectorTest.dumpConsoleMessages(false, false, formatter);
70 InspectorTest.completeDebuggerTest();
71 }
72
73 function formatter(element, message) {
74 return message.messageText;
75 }
76 }
77
78 </script>
79 </head>
80
81 <body onload="runTest()">
82 <p>
83 Tests that evaluation in console that throws works fine when script is paused.
84 </p>
85 </body>
86 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698