| 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 | 11 |
| 12 InspectorTest.selectNodeAndWaitForStyles("inspected", selectCallback); | 12 InspectorTest.selectNodeAndWaitForStyles("inspected", selectCallback); |
| 13 function selectCallback() | 13 function selectCallback() |
| 14 { | 14 { |
| 15 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_inn
erRebuildUpdate", sniffUpdate, true); | 15 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_inn
erRebuildUpdate", sniffUpdate, true); |
| 16 var element = InspectorTest.firstElementsTreeOutline().element; | 16 var element = InspectorTest.firstElementsTreeOutline().element; |
| 17 for (var i = 0; i < keydownCount; ++i) | 17 for (var i = 0; i < keydownCount; ++i) |
| 18 element.dispatchEvent(InspectorTest.createKeyEvent("Up")); | 18 element.dispatchEvent(InspectorTest.createKeyEvent("ArrowUp")); |
| 19 | 19 |
| 20 InspectorTest.deprecatedRunAfterPendingDispatches(completeCallback); | 20 InspectorTest.deprecatedRunAfterPendingDispatches(completeCallback); |
| 21 } | 21 } |
| 22 | 22 |
| 23 function completeCallback() | 23 function completeCallback() |
| 24 { | 24 { |
| 25 if (updateCount >= keydownCount) | 25 if (updateCount >= keydownCount) |
| 26 InspectorTest.addResult("ERROR: got " + updateCount + " updates for
" + keydownCount + " consecutive keydowns"); | 26 InspectorTest.addResult("ERROR: got " + updateCount + " updates for
" + keydownCount + " consecutive keydowns"); |
| 27 else | 27 else |
| 28 InspectorTest.addResult("OK: updates throttled"); | 28 InspectorTest.addResult("OK: updates throttled"); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 45 | 45 |
| 46 <div></div> | 46 <div></div> |
| 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 id="inspected"></div> | 51 <div id="inspected"></div> |
| 52 | 52 |
| 53 </body> | 53 </body> |
| 54 </html> | 54 </html> |
| OLD | NEW |