| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | |
| 4 <script src="../../http/tests/inspector/console-test.js"></script> | |
| 5 <script> | |
| 6 | |
| 7 var a = {}; | |
| 8 for (var i = 0; i < 1000; ++i) | |
| 9 a[i] = "property" + i; | |
| 10 | |
| 11 function test() | |
| 12 { | |
| 13 var consoleView = WebInspector.ConsoleView.instance(); | |
| 14 consoleView._prompt.setText("pro"); | |
| 15 | |
| 16 InspectorTest.addSniffer(consoleView._prompt._suggestBox, "updateSuggestions
", suggestionsShown); | |
| 17 consoleView._prompt._element.dispatchEvent(new KeyboardEvent("keydown", { ke
y: "p"})); | |
| 18 consoleView._prompt._element.dispatchEvent(new InputEvent("input", {})); | |
| 19 | |
| 20 function suggestionsShown() | |
| 21 { | |
| 22 consoleView._prompt._element.dispatchEvent(new KeyboardEvent("keydown",
{ key: "e"})); | |
| 23 consoleView._prompt._element.dispatchEvent(new InputEvent("input", {})); | |
| 24 setTimeout(keyDownTab, 0); | |
| 25 } | |
| 26 | |
| 27 function keyDownTab() | |
| 28 { | |
| 29 consoleView._prompt._element.dispatchEvent(new KeyboardEvent("keydown",
{ key: "Tab" })); | |
| 30 InspectorTest.completeTest(); | |
| 31 } | |
| 32 } | |
| 33 </script> | |
| 34 </head> | |
| 35 <body onload="runTest()"> | |
| 36 <p>Tests that TextPrompt doesn't throw exception on some event sequence. crbug.c
om/587683</p> | |
| 37 </body> | |
| 38 </html> | |
| OLD | NEW |