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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/console/console-auto-completion.html

Issue 2033403005: Eradicate keyIndentifier from devtools/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Call KeyCodeToKeyIdentifier for unhandle key events Created 4 years, 6 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 <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/console-test.js"></script> 4 <script src="../../http/tests/inspector/console-test.js"></script>
5 <script> 5 <script>
6 6
7 var a = {}; 7 var a = {};
8 for (var i = 0; i < 1000; ++i) 8 for (var i = 0; i < 1000; ++i)
9 a[i] = "property" + i; 9 a[i] = "property" + i;
10 10
11 function test() 11 function test()
12 { 12 {
13 var consoleView = WebInspector.ConsoleView.instance(); 13 var consoleView = WebInspector.ConsoleView.instance();
14 consoleView._prompt.setText("pro"); 14 consoleView._prompt.setText("pro");
15 15
16 InspectorTest.addSniffer(consoleView._prompt._suggestBox, "updateSuggestions ", suggestionsShown); 16 InspectorTest.addSniffer(consoleView._prompt._suggestBox, "updateSuggestions ", suggestionsShown);
17 consoleView._prompt._element.dispatchEvent(new KeyboardEvent("keydown", { ke y: "p"})); 17 consoleView._prompt._element.dispatchEvent(new KeyboardEvent("keydown", { ke y: "p"}));
18 consoleView._prompt._element.dispatchEvent(new InputEvent("input", {})); 18 consoleView._prompt._element.dispatchEvent(new InputEvent("input", {}));
19 19
20 function suggestionsShown() 20 function suggestionsShown()
21 { 21 {
22 consoleView._prompt._element.dispatchEvent(new KeyboardEvent("keydown", { key: "e"})); 22 consoleView._prompt._element.dispatchEvent(new KeyboardEvent("keydown", { key: "e"}));
23 consoleView._prompt._element.dispatchEvent(new InputEvent("input", {})); 23 consoleView._prompt._element.dispatchEvent(new InputEvent("input", {}));
24 setTimeout(keyDownTab, 0); 24 setTimeout(keyDownTab, 0);
25 } 25 }
26 26
27 function keyDownTab() 27 function keyDownTab()
28 { 28 {
29 consoleView._prompt._element.dispatchEvent(new KeyboardEvent("keydown", { keyIdentifier: "U+0009" })); 29 consoleView._prompt._element.dispatchEvent(new KeyboardEvent("keydown", { key: "Tab" }));
30 InspectorTest.completeTest(); 30 InspectorTest.completeTest();
31 } 31 }
32 } 32 }
33 </script> 33 </script>
34 </head> 34 </head>
35 <body onload="runTest()"> 35 <body onload="runTest()">
36 <p>Tests that TextPrompt doesn't throw exception on some event sequence. crbug.c om/587683</p> 36 <p>Tests that TextPrompt doesn't throw exception on some event sequence. crbug.c om/587683</p>
37 </body> 37 </body>
38 </html> 38 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698