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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-go-to-file-dialog.html

Issue 2679483002: DevTools: Create extensible QuickOpen control (Closed)
Patch Set: Created 3 years, 10 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
Index: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-go-to-file-dialog.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-go-to-file-dialog.html b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-go-to-file-dialog.html
index 3199c190e3d46c3d61e2e5a0707a636536a235c4..46a65a61ad3b8f15047131ddbc7696083d3b2180 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-go-to-file-dialog.html
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-go-to-file-dialog.html
@@ -24,8 +24,7 @@ function test()
function goToSourceDialogBeforeBinding(next)
{
- dumpGoToSourceDialog();
- next();
+ dumpGoToSourceDialog(next);
},
function addFileSystemMapping(next)
@@ -36,21 +35,22 @@ function test()
function goToSourceAfterBinding(next)
{
- dumpGoToSourceDialog();
- next();
+ dumpGoToSourceDialog(next);
},
]);
- function dumpGoToSourceDialog()
+ function dumpGoToSourceDialog(next)
{
- UI.panels.sources._sourcesView.showOpenResourceDialog();
- var dialog = Sources.OpenResourceDialog._instanceForTest;
- var keys = [];
- for (var i = 0; i < dialog.itemCount(); ++i)
- keys.push(dialog.itemKeyAt(i));
- keys.sort();
- InspectorTest.addResult(keys.join("\n"));
- UI.Dialog._instance.detach();
+ QuickOpen.QuickOpen.show('');
+ InspectorTest.addSnifferPromise(QuickOpen.QuickOpen.prototype, '_delegateLoadedForTest').then(delegate => {
+ var keys = [];
+ for (var i = 0; i < delegate.itemCount(); ++i)
+ keys.push(delegate.itemKeyAt(i));
+ keys.sort();
+ InspectorTest.addResult(keys.join("\n"));
+ UI.Dialog._instance.detach();
+ next();
+ });
}
};
</script>

Powered by Google App Engine
This is Rietveld 408576698