| 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="editor-test.js"></script> | 4 <script src="editor-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 function codeSnippet() { | 6 function codeSnippet() { |
| 7 return document.getElementById("codeSnippet").textContent; | 7 return document.getElementById("codeSnippet").textContent; |
| 8 } | 8 } |
| 9 | 9 |
| 10 function test() | 10 function test() |
| 11 { | 11 { |
| 12 var textEditor = InspectorTest.createTestEditor(); | 12 var textEditor = InspectorTest.createTestEditor(); |
| 13 textEditor.setMimeType("text/javascript"); | 13 textEditor.setMimeType("text/javascript"); |
| 14 textEditor.setReadOnly(false); | 14 textEditor.setReadOnly(false); |
| 15 textEditor.element.focus(); | 15 textEditor.element.focus(); |
| 16 | 16 |
| 17 var completionDictionary = new WebInspector.SampleCompletionDictionary(); | 17 var completionDictionary = new WebInspector.SampleCompletionDictionary(); |
| 18 textEditor.setCompletionDictionary(completionDictionary); | 18 textEditor.setCompletionDictionary(completionDictionary); |
| 19 textEditor._autocompleteController._initializeIfNeeded(); | |
| 20 | 19 |
| 21 InspectorTest.runTestSuite([ | 20 InspectorTest.runTestSuite([ |
| 22 function testSetInitialText(next) | 21 function testSetInitialText(next) |
| 23 { | 22 { |
| 24 textEditor.setText("one two three3_\nfour five\na_b\nsix\n123foo\n13
2\nseven"); | 23 textEditor.setText("one two three3_\nfour five\na_b\nsix\n123foo\n13
2\nseven"); |
| 25 dumpDictionary(next); | 24 dumpDictionary(next); |
| 26 }, | 25 }, |
| 27 | 26 |
| 28 function testAlphaNumericWords(next) | 27 function testAlphaNumericWords(next) |
| 29 { | 28 { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 </script> | 70 </script> |
| 72 </head> | 71 </head> |
| 73 | 72 |
| 74 <body onload="runTest();"> | 73 <body onload="runTest();"> |
| 75 <p> | 74 <p> |
| 76 This test checks how text editor updates autocompletion dictionary in a response | 75 This test checks how text editor updates autocompletion dictionary in a response |
| 77 to user input. | 76 to user input. |
| 78 </p> | 77 </p> |
| 79 </body> | 78 </body> |
| 80 </html> | 79 </html> |
| OLD | NEW |