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 src="../editor/editor-test.js"></script> |
| 6 <script> |
| 7 window.foobar = "foobar"; |
| 8 window.foobaz = "foobaz"; |
| 9 |
| 10 function test() |
| 11 { |
| 12 InspectorTest.waitUntilConsoleEditorLoaded().then(onConsoleEditorLoaded); |
| 13 |
| 14 var consoleEditor; |
| 15 function onConsoleEditorLoaded(editor) |
| 16 { |
| 17 consoleEditor = editor; |
| 18 InspectorTest.runTestSuite(testSuite); |
| 19 } |
| 20 |
| 21 var testSuite = [ |
| 22 function testSummonSuggestBox(next) |
| 23 { |
| 24 InspectorTest.addSniffer(WebInspector.TextEditorAutocompleteControll
er.prototype, "_onSuggestionsShownForTest", onSuggestionsShown); |
| 25 InspectorTest.typeIn(consoleEditor, "f"); |
| 26 |
| 27 function onSuggestionsShown() |
| 28 { |
| 29 InspectorTest.addResult("Suggestions shown."); |
| 30 next(); |
| 31 } |
| 32 }, |
| 33 |
| 34 function testTypeText(next) |
| 35 { |
| 36 InspectorTest.addSniffer(WebInspector.TextEditorAutocompleteControll
er.prototype, "_onSuggestionsHiddenForTest", onSuggestionsHidden); |
| 37 InspectorTest.addSniffer(WebInspector.TextEditorAutocompleteControll
er.prototype, "_onCursorActivityHandledForTest", onCursorActivityHandled); |
| 38 InspectorTest.typeIn(consoleEditor, "o"); |
| 39 |
| 40 function onSuggestionsHidden() |
| 41 { |
| 42 InspectorTest.addResult("FAIL: suggestbox is hidden during typin
g."); |
| 43 InspectorTest.completeTest(); |
| 44 } |
| 45 |
| 46 function onCursorActivityHandled() |
| 47 { |
| 48 InspectorTest.addResult("SUCCESS: suggestbox is not hidden durin
g typing."); |
| 49 next(); |
| 50 } |
| 51 } |
| 52 ]; |
| 53 } |
| 54 </script> |
| 55 </head> |
| 56 <body onload="runTest()"> |
| 57 <p>Verify that console does not hide autocomplete during typing.</p> |
| 58 </body> |
| 59 </html> |
OLD | NEW |