| 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/elements-test.js"></script> | 4 <script src="../../../http/tests/inspector/elements-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function test() | 7 function test() |
| 8 { | 8 { |
| 9 var updateCount = 0; | 9 var updateCount = 0; |
| 10 var keydownCount = 5; | 10 var keydownCount = 5; |
| 11 WebInspector.inspectorView.showPanel("elements"); | 11 WebInspector.inspectorView.showPanel("elements"); |
| 12 | 12 |
| 13 InspectorTest.selectNodeAndWaitForStyles("inspected", selectCallback); | 13 InspectorTest.selectNodeAndWaitForStyles("inspected", selectCallback); |
| 14 function selectCallback() | 14 function selectCallback() |
| 15 { | 15 { |
| 16 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_inn
erRebuildUpdate", sniffUpdate, true); | 16 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_inn
erRebuildUpdate", sniffUpdate, true); |
| 17 var element = WebInspector.panels.elements.treeOutline.element; | 17 var element = InspectorTest.firstElementsTreeOutline().element; |
| 18 for (var i = 0; i < keydownCount; ++i) | 18 for (var i = 0; i < keydownCount; ++i) |
| 19 element.dispatchEvent(InspectorTest.createKeyEvent("Up")); | 19 element.dispatchEvent(InspectorTest.createKeyEvent("Up")); |
| 20 | 20 |
| 21 InspectorTest.runAfterPendingDispatches(completeCallback); | 21 InspectorTest.runAfterPendingDispatches(completeCallback); |
| 22 } | 22 } |
| 23 | 23 |
| 24 function completeCallback() | 24 function completeCallback() |
| 25 { | 25 { |
| 26 if (updateCount >= keydownCount) | 26 if (updateCount >= keydownCount) |
| 27 InspectorTest.addResult("ERROR: got " + updateCount + " updates for
" + keydownCount + " consecutive keydowns"); | 27 InspectorTest.addResult("ERROR: got " + updateCount + " updates for
" + keydownCount + " consecutive keydowns"); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 46 | 46 |
| 47 <div></div> | 47 <div></div> |
| 48 <div></div> | 48 <div></div> |
| 49 <div></div> | 49 <div></div> |
| 50 <div></div> | 50 <div></div> |
| 51 <div></div> | 51 <div></div> |
| 52 <div id="inspected"></div> | 52 <div id="inspected"></div> |
| 53 | 53 |
| 54 </body> | 54 </body> |
| 55 </html> | 55 </html> |
| OLD | NEW |