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

Side by Side Diff: LayoutTests/inspector/sources/debugger/async-operation-events.html

Issue 943963002: DevTools: Refactor nits in DebuggerModel event dispatching. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 5 years, 10 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
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script> 4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script> 5 <script>
6 6
7 function testFunction() 7 function testFunction()
8 { 8 {
9 debugger; 9 debugger;
10 setTimeout(callback1, 0); 10 setTimeout(callback1, 0);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 function step4() 74 function step4()
75 { 75 {
76 InspectorTest.completeDebuggerTest(); 76 InspectorTest.completeDebuggerTest();
77 } 77 }
78 78
79 var asyncOperations = {}; 79 var asyncOperations = {};
80 80
81 function onAsyncOperationStarted(event) 81 function onAsyncOperationStarted(event)
82 { 82 {
83 var operation = event.data.operation; 83 var operation = event.data;
84 var description = asyncOperationDescription(operation); 84 var description = asyncOperationDescription(operation);
85 asyncOperations[operation.id] = description; 85 asyncOperations[operation.id] = description;
86 InspectorTest.addResult("==> AsyncOperationStarted: " + description); 86 InspectorTest.addResult("==> AsyncOperationStarted: " + description);
87 } 87 }
88 88
89 function onAsyncOperationCompleted(event) 89 function onAsyncOperationCompleted(event)
90 { 90 {
91 var operationId = event.data.operationId; 91 var operationId = event.data;
92 InspectorTest.addResult("==> AsyncOperationCompleted: " + asyncOperation s[operationId]); 92 InspectorTest.addResult("==> AsyncOperationCompleted: " + asyncOperation s[operationId]);
93 delete asyncOperations[operationId]; 93 delete asyncOperations[operationId];
94 } 94 }
95 95
96 function asyncOperationDescription(operation) 96 function asyncOperationDescription(operation)
97 { 97 {
98 var link = ""; 98 var link = "";
99 var callFrame = operation.stackTrace && operation.stackTrace[0]; 99 var callFrame = operation.stackTrace && operation.stackTrace[0];
100 if (callFrame) { 100 if (callFrame) {
101 var url = WebInspector.displayNameForURL(callFrame.url); 101 var url = WebInspector.displayNameForURL(callFrame.url);
102 link = " " + callFrame.functionName + " @ " + url + ":" + callFrame. lineNumber; 102 link = " " + callFrame.functionName + " @ " + url + ":" + callFrame. lineNumber;
103 } 103 }
104 return ("[" + operation.description + "]" + link); 104 return ("[" + operation.description + "]" + link);
105 } 105 }
106 } 106 }
107 107
108 </script> 108 </script>
109 </head> 109 </head>
110 110
111 <body onload="runTest()"> 111 <body onload="runTest()">
112 <p> 112 <p>
113 Tests debugger AsyncOperation events while in a debugger stepping session. 113 Tests debugger AsyncOperation events while in a debugger stepping session.
114 </p> 114 </p>
115 </body> 115 </body>
116 </html> 116 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698