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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/autocomplete-general.html

Issue 2356423002: [DevTools] Turn WebInspector.Panel into a web component.
Patch Set: partial fixes Created 4 years, 2 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="../sources/debugger/resources/edit-me.js"></script> 3 <script src="../sources/debugger/resources/edit-me.js"></script>
4 <script src="../editor/editor-test.js"></script> 4 <script src="../editor/editor-test.js"></script>
5 <script src="../../http/tests/inspector/inspector-test.js"></script> 5 <script src="../../http/tests/inspector/inspector-test.js"></script>
6 <script src="../../http/tests/inspector/debugger-test.js"></script> 6 <script src="../../http/tests/inspector/debugger-test.js"></script>
7 <script> 7 <script>
8 function codeSnippet() { 8 function codeSnippet() {
9 return document.getElementById("codeSnippet").textContent; 9 return document.getElementById("codeSnippet").textContent;
10 } 10 }
(...skipping 14 matching lines...) Expand all
25 // This test has to be the first. It validates that autocompletion contr oller 25 // This test has to be the first. It validates that autocompletion contr oller
26 // will initialize as a key will be pressed. 26 // will initialize as a key will be pressed.
27 function testCompletionsShowUpOnKeyPress(next) 27 function testCompletionsShowUpOnKeyPress(next)
28 { 28 {
29 textEditor.setText("name1 name2 name3 name4\nna"); 29 textEditor.setText("name1 name2 name3 name4\nna");
30 textEditor.setSelection(WebInspector.TextRange.createFromLocation(1, 2)); 30 textEditor.setSelection(WebInspector.TextRange.createFromLocation(1, 2));
31 InspectorTest.addSniffer(WebInspector.TextEditorAutocompleteControll er.prototype, "_onSuggestionsShownForTest", onAutocompletionSuggestBox); 31 InspectorTest.addSniffer(WebInspector.TextEditorAutocompleteControll er.prototype, "_onSuggestionsShownForTest", onAutocompletionSuggestBox);
32 InspectorTest.typeIn(textEditor, "m"); 32 InspectorTest.typeIn(textEditor, "m");
33 function onAutocompletionSuggestBox() 33 function onAutocompletionSuggestBox()
34 { 34 {
35 document.activeElement.dispatchEvent(InspectorTest.createKeyEven t("Enter")); 35 var root = textEditor.element;
36 while (root && root.nodeType !== Node.DOCUMENT_FRAGMENT_NODE)
37 root = root.parentNode;
38 (root || document).activeElement.dispatchEvent(InspectorTest.cre ateKeyEvent("Enter"));
36 dumpDictionary(next); 39 dumpDictionary(next);
37 } 40 }
38 }, 41 },
39 42
40 function testSetInitialText(next) 43 function testSetInitialText(next)
41 { 44 {
42 textEditor.setText("one two three3_\nfour five\na_b\nsix\n123foo\n13 2\nseven"); 45 textEditor.setText("one two three3_\nfour five\na_b\nsix\n123foo\n13 2\nseven");
43 dumpDictionary(next); 46 dumpDictionary(next);
44 }, 47 },
45 48
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 </script> 85 </script>
83 </head> 86 </head>
84 87
85 <body onload="runTest();"> 88 <body onload="runTest();">
86 <p> 89 <p>
87 This test checks how text editor updates autocompletion dictionary in a response 90 This test checks how text editor updates autocompletion dictionary in a response
88 to user input. 91 to user input.
89 </p> 92 </p>
90 </body> 93 </body>
91 </html> 94 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698