Index: third_party/WebKit/LayoutTests/inspector/console/console-retain-autocomplete-on-typing.html |
diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-retain-autocomplete-on-typing.html b/third_party/WebKit/LayoutTests/inspector/console/console-retain-autocomplete-on-typing.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..20dcadaec741c1f632fc7f0d3b25b3e046d6c925 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/inspector/console/console-retain-autocomplete-on-typing.html |
@@ -0,0 +1,59 @@ |
+<html> |
+<head> |
+<script src="../../http/tests/inspector/inspector-test.js"></script> |
+<script src="../../http/tests/inspector/console-test.js"></script> |
+<script src="../editor/editor-test.js"></script> |
+<script> |
+window.foobar = "foobar"; |
+window.foobaz = "foobaz"; |
+ |
+function test() |
+{ |
+ InspectorTest.waitUntilConsoleEditorLoaded().then(onConsoleEditorLoaded); |
+ |
+ var consoleEditor; |
+ function onConsoleEditorLoaded(editor) |
+ { |
+ consoleEditor = editor; |
+ InspectorTest.runTestSuite(testSuite); |
+ } |
+ |
+ var testSuite = [ |
+ function testSummonSuggestBox(next) |
+ { |
+ InspectorTest.addSniffer(WebInspector.TextEditorAutocompleteController.prototype, "_onSuggestionsShownForTest", onSuggestionsShown); |
+ InspectorTest.typeIn(consoleEditor, "f"); |
+ |
+ function onSuggestionsShown() |
+ { |
+ InspectorTest.addResult("Suggestions shown."); |
+ next(); |
+ } |
+ }, |
+ |
+ function testTypeText(next) |
+ { |
+ InspectorTest.addSniffer(WebInspector.TextEditorAutocompleteController.prototype, "_onSuggestionsHiddenForTest", onSuggestionsHidden); |
+ InspectorTest.addSniffer(WebInspector.TextEditorAutocompleteController.prototype, "_onCursorActivityHandledForTest", onCursorActivityHandled); |
+ InspectorTest.typeIn(consoleEditor, "o"); |
+ |
+ function onSuggestionsHidden() |
+ { |
+ InspectorTest.addResult("FAIL: suggestbox is hidden during typing."); |
+ InspectorTest.completeTest(); |
+ } |
+ |
+ function onCursorActivityHandled() |
+ { |
+ InspectorTest.addResult("SUCCESS: suggestbox is not hidden during typing."); |
+ next(); |
+ } |
+ } |
+ ]; |
+} |
+</script> |
+</head> |
+<body onload="runTest()"> |
+<p>Verify that console does not hide autocomplete during typing.</p> |
+</body> |
+</html> |