| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <base href="/inspector-debug/"></base> | 3 <base href="/inspector-debug/"></base> |
| 4 <script src="/inspector-debug/Runtime.js"></script> | 4 <script src="/inspector-debug/Runtime.js"></script> |
| 5 <script src="/inspector-unit/inspector-unit-test.js"></script> | 5 <script src="/inspector-unit/inspector-unit-test.js"></script> |
| 6 <script type="text/javascript"> | 6 <script type="text/javascript"> |
| 7 | 7 |
| 8 function test() | 8 function test() |
| 9 { | 9 { |
| 10 var suggestions = ["testTextPrompt"]; | 10 var suggestions = ["testTextPrompt"]; |
| 11 var waitingForAutocomplete = null; | 11 var waitingForAutocomplete = null; |
| 12 var completionsDone = function () { | 12 var completionsDone = function () { |
| 13 console.error("completionsDone called too early!"); | 13 console.error("completionsDone called too early!"); |
| 14 UnitTest.completeTest(); | 14 UnitTest.completeTest(); |
| 15 } | 15 } |
| 16 var prompt = new WebInspector.TextPrompt(completions); | 16 var prompt = new WebInspector.TextPrompt(); |
| 17 prompt.initialize(completions); |
| 17 var element = createElement("div"); | 18 var element = createElement("div"); |
| 18 WebInspector.inspectorView.element.appendChild(element); | 19 WebInspector.inspectorView.element.appendChild(element); |
| 19 var proxy = prompt.attachAndStartEditing(element); | 20 var proxy = prompt.attachAndStartEditing(element); |
| 20 prompt.setText("testT"); | 21 prompt.setText("testT"); |
| 21 prompt.complete(); | 22 prompt.complete(); |
| 22 dumpTextPrompt(); | 23 dumpTextPrompt(); |
| 23 completionsDone(); | 24 completionsDone(); |
| 24 dumpTextPrompt(); | 25 dumpTextPrompt(); |
| 25 | 26 |
| 26 typeCharacter("e"); | 27 typeCharacter("e"); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 } | 103 } |
| 103 } | 104 } |
| 104 | 105 |
| 105 | 106 |
| 106 </script> | 107 </script> |
| 107 </head> | 108 </head> |
| 108 <body> | 109 <body> |
| 109 <p>Tests that the hint displays properly on a WebInspector.TextPrompt with autoc
omplete.</p> | 110 <p>Tests that the hint displays properly on a WebInspector.TextPrompt with autoc
omplete.</p> |
| 110 </body> | 111 </body> |
| 111 </html> | 112 </html> |
| OLD | NEW |