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

Side by Side 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: merge Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../inspector-test.js"></script> 3 <script src="../inspector-test.js"></script>
4 <script src="../debugger-test.js"></script> 4 <script src="../debugger-test.js"></script>
5 <script src="../isolated-filesystem-test.js"></script> 5 <script src="../isolated-filesystem-test.js"></script>
6 <script src="./persistence-test.js"></script> 6 <script src="./persistence-test.js"></script>
7 <script src="./resources/foo.js"></script> 7 <script src="./resources/foo.js"></script>
8 <script> 8 <script>
9 9
10 function test() 10 function test()
11 { 11 {
12 var testMapping = InspectorTest.initializeTestMapping(); 12 var testMapping = InspectorTest.initializeTestMapping();
13 var fs = new InspectorTest.TestFileSystem("file:///var/www"); 13 var fs = new InspectorTest.TestFileSystem("file:///var/www");
14 InspectorTest.addFooJSFile(fs); 14 InspectorTest.addFooJSFile(fs);
15 fs.reportCreated(function() { }); 15 fs.reportCreated(function() { });
16 16
17 InspectorTest.runTestSuite([ 17 InspectorTest.runTestSuite([
18 function waitForUISourceCodes(next) 18 function waitForUISourceCodes(next)
19 { 19 {
20 Promise.all([ 20 Promise.all([
21 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp es.Network), 21 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp es.Network),
22 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp es.FileSystem) 22 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp es.FileSystem)
23 ]).then(next); 23 ]).then(next);
24 }, 24 },
25 25
26 function goToSourceDialogBeforeBinding(next) 26 function goToSourceDialogBeforeBinding(next)
27 { 27 {
28 dumpGoToSourceDialog(); 28 dumpGoToSourceDialog(next);
29 next();
30 }, 29 },
31 30
32 function addFileSystemMapping(next) 31 function addFileSystemMapping(next)
33 { 32 {
34 testMapping.addBinding("foo.js"); 33 testMapping.addBinding("foo.js");
35 InspectorTest.waitForBinding("foo.js").then(next); 34 InspectorTest.waitForBinding("foo.js").then(next);
36 }, 35 },
37 36
38 function goToSourceAfterBinding(next) 37 function goToSourceAfterBinding(next)
39 { 38 {
40 dumpGoToSourceDialog(); 39 dumpGoToSourceDialog(next);
41 next();
42 }, 40 },
43 ]); 41 ]);
44 42
45 function dumpGoToSourceDialog() 43 function dumpGoToSourceDialog(next)
46 { 44 {
47 UI.panels.sources._sourcesView.showOpenResourceDialog(); 45 QuickOpen.QuickOpen.show('');
48 var dialog = Sources.OpenResourceDialog._instanceForTest; 46 InspectorTest.addSnifferPromise(QuickOpen.QuickOpen.prototype, '_provide rLoadedForTest').then(provider => {
49 var keys = []; 47 var keys = [];
50 for (var i = 0; i < dialog.itemCount(); ++i) 48 for (var i = 0; i < provider.itemCount(); ++i)
51 keys.push(dialog.itemKeyAt(i)); 49 keys.push(provider.itemKeyAt(i));
52 keys.sort(); 50 keys.sort();
53 InspectorTest.addResult(keys.join("\n")); 51 InspectorTest.addResult(keys.join("\n"));
54 UI.Dialog._instance.hide(); 52 UI.Dialog._instance.hide();
53 next();
54 });
55 } 55 }
56 }; 56 };
57 </script> 57 </script>
58 </head> 58 </head>
59 <body onload="runTest()"> 59 <body onload="runTest()">
60 <p>Verify that GoTo source dialog filters out mapped uiSourceCodes.</p> 60 <p>Verify that GoTo source dialog filters out mapped uiSourceCodes.</p>
61 </body> 61 </body>
62 </html> 62 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698