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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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 <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 display() 7 function display()
8 { 8 {
9 document.body.style.backgroundColor = "blue"; 9 document.body.style.backgroundColor = "blue";
10 return waitForFrame(); 10 return waitForFrame();
11 } 11 }
12 12
13 function updateSubframeAndDisplay() 13 function updateSubframeAndDisplay()
14 { 14 {
15 frames[0].document.body.children[0].style.backgroundColor = "green"; 15 frames[0].document.body.children[0].style.backgroundColor = "green";
16 return waitForFrame(); 16 return waitForFrame();
17 } 17 }
18 18
19 function test() 19 function test()
20 { 20 {
21 InspectorTest.invokeAsyncWithTimeline("display", step1); 21 InspectorTest.invokeAsyncWithTimeline("display", step1);
22 22
23 function step1(records) 23 function step1(records)
24 { 24 {
25 var record = InspectorTest.findFirstTimelineRecord(WebInspector.Timeline Model.RecordType.Paint); 25 var record = InspectorTest.findFirstTimelineRecord(TimelineModel.Timelin eModel.RecordType.Paint);
26 if (record) 26 if (record)
27 InspectorTest.printTimelineRecordProperties(record); 27 InspectorTest.printTimelineRecordProperties(record);
28 else 28 else
29 InspectorTest.addResult("FAIL: no paint record found"); 29 InspectorTest.addResult("FAIL: no paint record found");
30 InspectorTest.invokeAsyncWithTimeline("updateSubframeAndDisplay", step3) ; 30 InspectorTest.invokeAsyncWithTimeline("updateSubframeAndDisplay", step3) ;
31 } 31 }
32 32
33 function step3(records) 33 function step3(records)
34 { 34 {
35 var paintRecord = InspectorTest.findFirstTimelineRecord(WebInspector.Tim elineModel.RecordType.Paint); 35 var paintRecord = InspectorTest.findFirstTimelineRecord(TimelineModel.Ti melineModel.RecordType.Paint);
36 InspectorTest.assertTrue(paintRecord, "Paint record with subframe paint not found"); 36 InspectorTest.assertTrue(paintRecord, "Paint record with subframe paint not found");
37 var topQuad = paintRecord.traceEvent().args["data"].clip; 37 var topQuad = paintRecord.traceEvent().args["data"].clip;
38 var subframePaint = paintRecord.children()[0]; 38 var subframePaint = paintRecord.children()[0];
39 var subframeQuad = subframePaint.traceEvent().args["data"].clip; 39 var subframeQuad = subframePaint.traceEvent().args["data"].clip;
40 InspectorTest.assertEquals(8, topQuad.length); 40 InspectorTest.assertEquals(8, topQuad.length);
41 InspectorTest.assertEquals(8, subframeQuad.length); 41 InspectorTest.assertEquals(8, subframeQuad.length);
42 InspectorTest.assertGreaterOrEqual(subframeQuad[0], topQuad[0]); 42 InspectorTest.assertGreaterOrEqual(subframeQuad[0], topQuad[0]);
43 InspectorTest.assertGreaterOrEqual(subframeQuad[1], topQuad[1]); 43 InspectorTest.assertGreaterOrEqual(subframeQuad[1], topQuad[1]);
44 InspectorTest.assertGreaterOrEqual(topQuad[2], subframeQuad[2]); 44 InspectorTest.assertGreaterOrEqual(topQuad[2], subframeQuad[2]);
45 InspectorTest.assertGreaterOrEqual(subframeQuad[3], topQuad[3]); 45 InspectorTest.assertGreaterOrEqual(subframeQuad[3], topQuad[3]);
46 InspectorTest.assertGreaterOrEqual(topQuad[4], subframeQuad[4]); 46 InspectorTest.assertGreaterOrEqual(topQuad[4], subframeQuad[4]);
47 InspectorTest.assertGreaterOrEqual(topQuad[5], subframeQuad[5]); 47 InspectorTest.assertGreaterOrEqual(topQuad[5], subframeQuad[5]);
48 InspectorTest.assertGreaterOrEqual(subframeQuad[6], topQuad[6]); 48 InspectorTest.assertGreaterOrEqual(subframeQuad[6], topQuad[6]);
49 InspectorTest.assertGreaterOrEqual(topQuad[7], subframeQuad[7]); 49 InspectorTest.assertGreaterOrEqual(topQuad[7], subframeQuad[7]);
50 50
51 InspectorTest.completeTest(); 51 InspectorTest.completeTest();
52 } 52 }
53 } 53 }
54 54
55 </script> 55 </script>
56 </head> 56 </head>
57 57
58 <body onload="runTest()"> 58 <body onload="runTest()">
59 <p> 59 <p>
60 Tests the Timeline API instrumentation of a paint event 60 Tests the Timeline API instrumentation of a paint event
61 </p> 61 </p>
62 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute; left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe> 62 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute; left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe>
63 </body> 63 </body>
64 </html> 64 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698