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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector-unit/suggest-box.html

Issue 2513423003: DevTools: Convert inspector-unit tests to use reusable test harness (Closed)
Patch Set: Moved type definition out of externs Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/inspector-unit/suggest-box.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-unit/suggest-box.html b/third_party/WebKit/LayoutTests/http/tests/inspector-unit/suggest-box.html
deleted file mode 100644
index 590cdb5ef3d6accf4e8a96490c63f233cf3574ac..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/http/tests/inspector-unit/suggest-box.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<html>
-<head>
-<base href="/inspector-debug/"></base>
-<script src="/inspector-debug/Runtime.js"></script>
-<script src="/inspector-unit/inspector-unit-test.js"></script>
-<script>
-function test() {
- var delegate = {
- applySuggestion: function(suggestion, isIntermediateSuggestion) {
- UnitTest.addResult((isIntermediateSuggestion ? "Intermediate " : "") + "Suggestion Applied: " + suggestion);
- },
- acceptSuggestion: function() {
- UnitTest.addResult("Suggestion accepted");
- }
- };
- var div = document.createElement("div");
- UI.inspectorView.element.appendChild(div);
- var suggestBox = new UI.SuggestBox(delegate);
-
- UnitTest.addResult("");
- UnitTest.addResult("Testing that the first item is selected.");
- suggestBox.updateSuggestions(new AnchorBox(50, 50, 400, 400), [
- {title: "First"},
- {title: "Hello"},
- {title: "The best suggestion"}], true, true, "e");
-
- UnitTest.addResult("");
- UnitTest.addResult("Testing that no item is selected.");
- suggestBox.updateSuggestions(new AnchorBox(50, 50, 400, 400), [
- {title: "First"},
- {title: "Hello", priority: 2},
- {title: "The best suggestion", priority: 5}], false, true, "e");
-
- UnitTest.addResult("");
- UnitTest.addResult("Testing that highest priority item is selected.");
- suggestBox.updateSuggestions(new AnchorBox(50, 50, 400, 400), [
- {title: "First"},
- {title: "Hello", priority: 2},
- {title: "The best suggestion", priority: 5}], true, true, "e");
-
- UnitTest.addResult("");
- UnitTest.addResult("Testing that arrow keys can be used for selection.");
- suggestBox.keyPressed(UnitTest.createKeyEvent("ArrowUp"));
- suggestBox.keyPressed(UnitTest.createKeyEvent("ArrowUp"));
- suggestBox.keyPressed(UnitTest.createKeyEvent("ArrowUp"));
- suggestBox.keyPressed(UnitTest.createKeyEvent("ArrowDown"));
- suggestBox.keyPressed(UnitTest.createKeyEvent("ArrowDown"));
-
- UnitTest.addResult("");
- UnitTest.addResult("Testing that enter can be used to accept a suggestion.");
- suggestBox.keyPressed(UnitTest.createKeyEvent("Enter"));
-
- UnitTest.addResult("");
- UnitTest.addResult("Testing that highest priority item is selected.");
- suggestBox.updateSuggestions(new AnchorBox(50, 50, 400, 400), [
- {title: "First"},
- {title: "Hello", priority: 2},
- {title: "The best suggestion", priority: 5}], true, true, "e");
-
- UnitTest.completeTest();
-}
-</script>
-</head>
-<body>
-This tests if the SuggestBox works properly.
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698