| Index: third_party/WebKit/LayoutTests/inspector/filtered-item-selection-dialog-filtering.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector/filtered-item-selection-dialog-filtering.html b/third_party/WebKit/LayoutTests/inspector/filtered-item-selection-dialog-filtering.html
|
| deleted file mode 100644
|
| index 6ec8ee340d0271d883b69359e0265bcc498db135..0000000000000000000000000000000000000000
|
| --- a/third_party/WebKit/LayoutTests/inspector/filtered-item-selection-dialog-filtering.html
|
| +++ /dev/null
|
| @@ -1,128 +0,0 @@
|
| -<html>
|
| -<head>
|
| -<script src="../http/tests/inspector/inspector-test.js"></script>
|
| -<script src="../http/tests/inspector/sources-test.js"></script>
|
| -<script>
|
| -
|
| -function test()
|
| -{
|
| -
|
| - var overridenInput = [];
|
| - var overrideShowMatchingItems = true;
|
| - var history = [];
|
| -
|
| - var StubDelegate = class extends WebInspector.FilteredListWidget.Delegate {
|
| - constructor()
|
| - {
|
| - super(history);
|
| - }
|
| -
|
| - itemKeyAt(itemIndex) { return overridenInput[itemIndex]; }
|
| - itemScoreAt(itemIndex) { return 0; }
|
| - itemCount() { return overridenInput.length; }
|
| - selectItem(itemIndex, promptValue)
|
| - {
|
| - InspectorTest.addResult("Selected item index: " + itemIndex);
|
| - }
|
| - shouldShowMatchingItems() { return overrideShowMatchingItems; }
|
| - };
|
| -
|
| - var delegate = new StubDelegate();
|
| -
|
| - function checkQuery(query, input, hideMatchingItems, acceptAutocomplete, next)
|
| - {
|
| - overridenInput = input;
|
| - overrideShowMatchingItems = !hideMatchingItems;
|
| -
|
| - InspectorTest.addResult("Input:" + JSON.stringify(input));
|
| -
|
| - var filteredSelectionDialog = new WebInspector.FilteredListWidget(delegate);
|
| - filteredSelectionDialog.showAsDialog();
|
| - InspectorTest.addSniffer(filteredSelectionDialog, "_autocompletedForTests", onautocomplete);
|
| - filteredSelectionDialog.setQuery(query);
|
| - filteredSelectionDialog._updateAfterItemsLoaded();
|
| -
|
| - function onautocomplete()
|
| - {
|
| - if (acceptAutocomplete) {
|
| - dump();
|
| - InspectorTest.addSniffer(filteredSelectionDialog, "_autocompletedForTests", accept);
|
| - filteredSelectionDialog._prompt.acceptAutoComplete();
|
| - } else {
|
| - accept();
|
| - }
|
| - }
|
| -
|
| - function dump()
|
| - {
|
| - InspectorTest.addResult("Query:" + JSON.stringify(filteredSelectionDialog._value()));
|
| - var items = filteredSelectionDialog._filteredItems;
|
| - var output = [];
|
| - for (var i = 0; i < items.length; ++i)
|
| - output.push(delegate.itemKeyAt(items[i]));
|
| - InspectorTest.addResult("Output:" + JSON.stringify(output));
|
| - InspectorTest.addResult("Completion:" + JSON.stringify(filteredSelectionDialog._prompt.textWithCurrentSuggestion()));
|
| - }
|
| -
|
| - function accept()
|
| - {
|
| - dump();
|
| - filteredSelectionDialog._onEnter(InspectorTest.createKeyEvent("Enter"));
|
| - InspectorTest.addResult("History:" + JSON.stringify(history));
|
| - next();
|
| - }
|
| - }
|
| -
|
| - InspectorTest.runTestSuite([
|
| - function emptyQueryMatchesEverything(next)
|
| - {
|
| - checkQuery("", ["a", "bc"], false, false, next);
|
| - },
|
| -
|
| - function caseSensitiveMatching(next)
|
| - {
|
| - checkQuery("aB", ["abc", "acB"], false, false, next);
|
| - },
|
| -
|
| - function caseInsensitiveMatching(next)
|
| - {
|
| - checkQuery("ab", ["abc", "bac", "a_B"], false, false, next);
|
| - },
|
| -
|
| - function dumplicateSymbolsInQuery(next)
|
| - {
|
| - checkQuery("aab", ["abab", "abaa", "caab", "baac", "fooaab"], false, false, next);
|
| - },
|
| -
|
| - function dangerousInputEscaping(next)
|
| - {
|
| - checkQuery("^[]{}()\\.$*+?|", ["^[]{}()\\.$*+?|", "0123456789abcdef"], false, false, next);
|
| - },
|
| -
|
| - function itemIndexIsNotReportedInGoToLine(next)
|
| - {
|
| - checkQuery(":1", [":1:2:3.js"], true, false, next);
|
| - },
|
| -
|
| - function autoCompleteIsLast(next)
|
| - {
|
| - checkQuery("", ["abc", "abcd"], false, false, next);
|
| - },
|
| -
|
| - function autoCompleteAccept(next)
|
| - {
|
| - checkQuery("a", ["abc", "abcd", "aabcd"], false, true, next);
|
| - }
|
| - ]);
|
| -}
|
| -
|
| -</script>
|
| -</head>
|
| -
|
| -<body onload="runTest()">
|
| -<p>
|
| -Check to see that FilteredItemSelectionDialog uses proper regex to filter results.
|
| -</p>
|
| -
|
| -</body>
|
| -</html>
|
|
|