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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector-unit/filtered-item-selection-dialog-filtering.js

Issue 2736853002: DevTools: Convert FilteredListWidget to use an optional provider (Closed)
Patch Set: missing timeout Created 3 years, 9 months 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector-unit/filtered-list-widget-providers.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/inspector-unit/filtered-item-selection-dialog-filtering.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-unit/filtered-item-selection-dialog-filtering.js b/third_party/WebKit/LayoutTests/http/tests/inspector-unit/filtered-item-selection-dialog-filtering.js
index c17bec987eae998334af9c39e8d82fa4d29c02f0..e7134fab5ec1ed8bcccfc8c257d2ffd8c690fc4c 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector-unit/filtered-item-selection-dialog-filtering.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector-unit/filtered-item-selection-dialog-filtering.js
@@ -6,7 +6,7 @@ function test() {
var overrideShowMatchingItems = true;
var history = [];
- var StubDelegate = class extends QuickOpen.FilteredListWidget.Delegate {
+ var StubProvider = class extends QuickOpen.FilteredListWidget.Provider {
itemKeyAt(itemIndex) { return overridenInput[itemIndex]; }
itemScoreAt(itemIndex) { return 0; }
itemCount() { return overridenInput.length; }
@@ -17,7 +17,7 @@ function test() {
shouldShowMatchingItems () { return overrideShowMatchingItems; }
};
- var delegate = new StubDelegate();
+ var provider = new StubProvider();
function checkQuery(query, input, hideMatchingItems)
{
@@ -26,7 +26,7 @@ function test() {
TestRunner.addResult("Input:" + JSON.stringify(input));
- var filteredSelectionDialog = new QuickOpen.FilteredListWidget(delegate, history);
+ var filteredSelectionDialog = new QuickOpen.FilteredListWidget(provider, history);
filteredSelectionDialog.showAsDialog();
var promise = TestRunner.addSniffer(filteredSelectionDialog, "_itemsFilteredForTest").then(accept);
filteredSelectionDialog.setQuery(query);
@@ -39,7 +39,7 @@ function test() {
var list = filteredSelectionDialog._list;
var output = [];
for (var i = 0; i < list.length(); ++i)
- output.push(delegate.itemKeyAt(list.itemAtIndex(i)));
+ output.push(provider.itemKeyAt(list.itemAtIndex(i)));
TestRunner.addResult("Output:" + JSON.stringify(output));
}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector-unit/filtered-list-widget-providers.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698