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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/timeline/fetch-as-stream.html

Issue 2161583004: Tracing: re-use JSONTraceDataSink in DevTools' tracing handler... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 years, 5 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <style> 3 <style>
4 div#test { 4 div#test {
5 display: none; 5 display: none;
6 background-color: blue; 6 background-color: blue;
7 width: 100px; 7 width: 100px;
8 height: 100px; 8 height: 100px;
9 } 9 }
10 </style> 10 </style>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 InspectorTest.sendCommand("IO.read", { handle: streamHandle }, onRea dAfterClose); 55 InspectorTest.sendCommand("IO.read", { handle: streamHandle }, onRea dAfterClose);
56 } 56 }
57 function onReadAfterClose(response) 57 function onReadAfterClose(response)
58 { 58 {
59 InspectorTest.log("Error after illegal read: " + JSON.stringify(resp onse.error)); 59 InspectorTest.log("Error after illegal read: " + JSON.stringify(resp onse.error));
60 InspectorTest.sendCommand("IO.close", { handle: streamHandle }, onCl oseAfterClose); 60 InspectorTest.sendCommand("IO.close", { handle: streamHandle }, onCl oseAfterClose);
61 } 61 }
62 function onCloseAfterClose(response) 62 function onCloseAfterClose(response)
63 { 63 {
64 InspectorTest.log("Error after illegal close: " + JSON.stringify(res ponse.error)); 64 InspectorTest.log("Error after illegal close: " + JSON.stringify(res ponse.error));
65 performEventsSanityCheck(JSON.parse(data1)); 65 var trace = JSON.parse(data1);
66 performEventsSanityCheck(trace["traceEvents"]);
67 InspectorTest.log("Metadata: " + typeof trace["metadata"] + (trace["metadata"] ? ", not null" : ""));
68 InspectorTest.completeTest();
66 } 69 }
67 } 70 }
68 71
69 function assertGreaterOrEqual(a, b, message) 72 function assertGreaterOrEqual(a, b, message)
70 { 73 {
71 if (a >= b) 74 if (a >= b)
72 return; 75 return;
73 InspectorTest.log(message + " (" + a + " < " + b + ")"); 76 InspectorTest.log(message + " (" + a + " < " + b + ")");
74 InspectorTest.completeTest(); 77 InspectorTest.completeTest();
75 } 78 }
(...skipping 13 matching lines...) Expand all
89 var event = events[i]; 92 var event = events[i];
90 if (event.phase === "X") 93 if (event.phase === "X")
91 ++phaseComplete; 94 ++phaseComplete;
92 if (event.name in knownEvents) 95 if (event.name in knownEvents)
93 ++knownEvents[event.name]; 96 ++knownEvents[event.name];
94 } 97 }
95 assertGreaterOrEqual(events.length, 10, "Too few trace events recorded") ; 98 assertGreaterOrEqual(events.length, 10, "Too few trace events recorded") ;
96 assertGreaterOrEqual(knownEvents["UpdateLayoutTree"], 1, "Too few Update LayoutTree events"); 99 assertGreaterOrEqual(knownEvents["UpdateLayoutTree"], 1, "Too few Update LayoutTree events");
97 assertGreaterOrEqual(knownEvents["Layout"], 1, "Too few Layout events"); 100 assertGreaterOrEqual(knownEvents["Layout"], 1, "Too few Layout events");
98 InspectorTest.log("Event sanity test done"); 101 InspectorTest.log("Event sanity test done");
99 InspectorTest.completeTest();
100 } 102 }
101 } 103 }
102 </script> 104 </script>
103 </head> 105 </head>
104 <body onload="runTest()"> 106 <body onload="runTest()">
105 <div id="test"> 107 <div id="test">
106 </div> 108 </div>
107 </body> 109 </body>
108 </html> 110 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698