OLD | NEW |
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 <style> | 5 <style> |
6 .relayout-boundary { | 6 .relayout-boundary { |
7 overflow: hidden; | 7 overflow: hidden; |
8 width: 100px; | 8 width: 100px; |
9 height: 100px; | 9 height: 100px; |
10 } | 10 } |
(...skipping 27 matching lines...) Expand all Loading... |
38 if (rows[i].firstChild.textContent.indexOf(row) !== -1) { | 38 if (rows[i].firstChild.textContent.indexOf(row) !== -1) { |
39 rows[i].lastChild.firstChild.click(); | 39 rows[i].lastChild.firstChild.click(); |
40 return; | 40 return; |
41 } | 41 } |
42 } | 42 } |
43 } | 43 } |
44 } | 44 } |
45 | 45 |
46 function onTimelineRecorded(records) | 46 function onTimelineRecorded(records) |
47 { | 47 { |
48 var layoutRecord = InspectorTest.findPresentationRecord("Layout"); | 48 var layoutRecord = InspectorTest.findFirstTimelineRecord("Layout"); |
49 WebInspector.notifications.addEventListener(WebInspector.NotificationSer
vice.Events.SelectedNodeChanged, onSelectedNodeChanged); | 49 WebInspector.notifications.addEventListener(WebInspector.NotificationSer
vice.Events.SelectedNodeChanged, onSelectedNodeChanged); |
50 clickValueLink(layoutRecord, "Layout root"); | 50 clickValueLink(layoutRecord, "Layout root"); |
51 } | 51 } |
52 | 52 |
53 function onSelectedNodeChanged() | 53 function onSelectedNodeChanged() |
54 { | 54 { |
55 // avoid using WebInspector.inspectorView.panel("elements"), as we get f
irst event from constructor, | 55 // avoid using WebInspector.inspectorView.panel("elements"), as we get f
irst event from constructor, |
56 // and this call would cause another instance to get constructed. | 56 // and this call would cause another instance to get constructed. |
57 var node = WebInspector.panels.elements.selectedDOMNode(); | 57 var node = WebInspector.panels.elements.selectedDOMNode(); |
58 // We may first get an old selected node while switching to the Elements
panel. | 58 // We may first get an old selected node while switching to the Elements
panel. |
(...skipping 13 matching lines...) Expand all Loading... |
72 Tests the Timeline API instrumentation of a Layout event | 72 Tests the Timeline API instrumentation of a Layout event |
73 </p> | 73 </p> |
74 <div id="boundary" class="relayout-boundary"> | 74 <div id="boundary" class="relayout-boundary"> |
75 <div> | 75 <div> |
76 <div id="invalidate1"><div>text</div></div> | 76 <div id="invalidate1"><div>text</div></div> |
77 </div> | 77 </div> |
78 </div> | 78 </div> |
79 | 79 |
80 </body> | 80 </body> |
81 </html> | 81 </html> |
OLD | NEW |