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

Side by Side Diff: LayoutTests/inspector/timeline/timeline-network-received-data.html

Issue 461323003: DevTools: Make Timeline tests use only model records (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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/timeline-test.js"></script> 4 <script src="../../http/tests/inspector/timeline-test.js"></script>
5 <script> 5 <script>
6 6
7 function performActions(callback) 7 function performActions(callback)
8 { 8 {
9 function onImageLoad() 9 function onImageLoad()
10 { 10 {
(...skipping 19 matching lines...) Expand all
30 window.timelineNetworkResourceEvaluated = scriptEvaluated; 30 window.timelineNetworkResourceEvaluated = scriptEvaluated;
31 } 31 }
32 32
33 function test() 33 function test()
34 { 34 {
35 InspectorTest.invokeAsyncWithTimeline("performActions", done); 35 InspectorTest.invokeAsyncWithTimeline("performActions", done);
36 36
37 function done() 37 function done()
38 { 38 {
39 InspectorTest.addResult("Script evaluated."); 39 InspectorTest.addResult("Script evaluated.");
40 var filteredRecords = InspectorTest.filterTimelineRecords("ResourceRecei vedData"); 40 var record = InspectorTest.findFirstTimelineRecord("ResourceReceivedData ");
41 if (filteredRecords.length) { 41 if (record) {
42 var record = filteredRecords[0]; 42 if (record.data() && typeof record.data().encodedDataLength === "num ber")
43 if (record.data && record.data && typeof record.data.encodedDataLeng th === "number")
44 InspectorTest.addResult("Resource received data has length, test passed."); 43 InspectorTest.addResult("Resource received data has length, test passed.");
45 } 44 }
46 InspectorTest.completeTest(); 45 InspectorTest.completeTest();
47 } 46 }
48 } 47 }
49 48
50 </script> 49 </script>
51 </head> 50 </head>
52 51
53 <body onload="runTest()"> 52 <body onload="runTest()">
54 <p> 53 <p>
55 Tests the Timeline API instrumentation of a network resource received data 54 Tests the Timeline API instrumentation of a network resource received data
56 </p> 55 </p>
57 </body> 56 </body>
58 </html> 57 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698