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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-misc/timeline-grouped-invalidations.html

Issue 2297903005: DevTools: (anonymous function) ==> (anonymous) (Closed)
Patch Set: tests Created 4 years, 3 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 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../http/tests/inspector/inspector-test.js"></script> 4 <script src="../../../http/tests/inspector/inspector-test.js"></script>
5 <script src="../../../http/tests/inspector/timeline-test.js"></script> 5 <script src="../../../http/tests/inspector/timeline-test.js"></script>
6 <script> 6 <script>
7 function display() 7 function display()
8 { 8 {
9 var callback; 9 var callback;
10 var promise = new Promise((fulfill) => callback = fulfill); 10 var promise = new Promise((fulfill) => callback = fulfill);
(...skipping 19 matching lines...) Expand all
30 var record = InspectorTest.findFirstTimelineRecord(WebInspector.Timeline Model.RecordType.Paint); 30 var record = InspectorTest.findFirstTimelineRecord(WebInspector.Timeline Model.RecordType.Paint);
31 InspectorTest.addArray(record._event.invalidationTrackingEvents, Inspect orTest.InvalidationFormatters, "", "paint invalidations"); 31 InspectorTest.addArray(record._event.invalidationTrackingEvents, Inspect orTest.InvalidationFormatters, "", "paint invalidations");
32 32
33 var linkifier = new WebInspector.Linkifier(); 33 var linkifier = new WebInspector.Linkifier();
34 var event = record.traceEvent(); 34 var event = record.traceEvent();
35 var target = InspectorTest.timelineModel().targetByEvent(event); 35 var target = InspectorTest.timelineModel().targetByEvent(event);
36 var contentHelper = new WebInspector.TimelineDetailsContentHelper(target , linkifier, true); 36 var contentHelper = new WebInspector.TimelineDetailsContentHelper(target , linkifier, true);
37 WebInspector.TimelineUIUtils._generateCauses(event, target, null, conten tHelper); 37 WebInspector.TimelineUIUtils._generateCauses(event, target, null, conten tHelper);
38 var invalidationsTree = contentHelper.element.getElementsByClassName("in validations-tree")[0]; 38 var invalidationsTree = contentHelper.element.getElementsByClassName("in validations-tree")[0];
39 var invalidations = invalidationsTree.shadowRoot.textContent; 39 var invalidations = invalidationsTree.shadowRoot.textContent;
40 checkStringContains(invalidations, "Inline CSS style declaration was mut ated for [ DIV class='testElement' ], [ DIV class='testElement' ], and 2 others. (anonymous function) @ timeline-grouped-invalidations.html:14"); 40 checkStringContains(invalidations, "Inline CSS style declaration was mut ated for [ DIV class='testElement' ], [ DIV class='testElement' ], and 2 others. (anonymous) @ timeline-grouped-invalidations.html:14");
41 checkStringContains(invalidations, "Inline CSS style declaration was mut ated for [ DIV class='testElement' ], [ DIV class='testElement' ], and 2 others. (anonymous function) @ timeline-grouped-invalidations.html:15"); 41 checkStringContains(invalidations, "Inline CSS style declaration was mut ated for [ DIV class='testElement' ], [ DIV class='testElement' ], and 2 others. (anonymous) @ timeline-grouped-invalidations.html:15");
42 InspectorTest.completeTest(); 42 InspectorTest.completeTest();
43 }); 43 });
44 44
45 function checkStringContains(string, contains) 45 function checkStringContains(string, contains)
46 { 46 {
47 var doesContain = string.indexOf(contains) >= 0; 47 var doesContain = string.indexOf(contains) >= 0;
48 InspectorTest.check(doesContain, contains + " should be present in " + s tring); 48 InspectorTest.check(doesContain, contains + " should be present in " + s tring);
49 InspectorTest.addResult("PASS - record contained " + contains); 49 InspectorTest.addResult("PASS - record contained " + contains);
50 } 50 }
51 } 51 }
52 </script> 52 </script>
53 </head> 53 </head>
54 <body onload="runTest()"> 54 <body onload="runTest()">
55 <p>Tests grouped invalidations on the timeline.</p> 55 <p>Tests grouped invalidations on the timeline.</p>
56 <div class="testElement">P</div><div class="testElement">A</div> 56 <div class="testElement">P</div><div class="testElement">A</div>
57 <div class="testElement">S</div><div class="testElement">S</div> 57 <div class="testElement">S</div><div class="testElement">S</div>
58 </body> 58 </body>
59 </html> 59 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698