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

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: 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 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 fs = new InspectorTest.TestFileSystem("file:///var/www"); 12 var fs = new InspectorTest.TestFileSystem("file:///var/www");
13 InspectorTest.addFooJSFile(fs); 13 InspectorTest.addFooJSFile(fs);
14 fs.reportCreated(function() { }); 14 fs.reportCreated(function() { });
15 15
16 InspectorTest.runTestSuite([ 16 InspectorTest.runTestSuite([
17 function waitForUISourceCodes(next) 17 function waitForUISourceCodes(next)
18 { 18 {
19 Promise.all([ 19 Promise.all([
20 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp es.Network), 20 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp es.Network),
21 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp es.FileSystem) 21 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp es.FileSystem)
22 ]).then(next); 22 ]).then(next);
23 }, 23 },
24 24
25 function goToSourceDialogBeforeBinding(next) 25 function goToSourceDialogBeforeBinding(next)
26 { 26 {
27 dumpGoToSourceDialog(); 27 dumpGoToSourceDialog(next);
28 next();
29 }, 28 },
30 29
31 function addFileSystemMapping(next) 30 function addFileSystemMapping(next)
32 { 31 {
33 Workspace.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http: //127.0.0.1:8000", "/"); 32 Workspace.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http: //127.0.0.1:8000", "/");
34 InspectorTest.waitForBinding("foo.js").then(next); 33 InspectorTest.waitForBinding("foo.js").then(next);
35 }, 34 },
36 35
37 function goToSourceAfterBinding(next) 36 function goToSourceAfterBinding(next)
38 { 37 {
39 dumpGoToSourceDialog(); 38 dumpGoToSourceDialog(next);
40 next();
41 }, 39 },
42 ]); 40 ]);
43 41
44 function dumpGoToSourceDialog() 42 function dumpGoToSourceDialog(next)
45 { 43 {
46 UI.panels.sources._sourcesView.showOpenResourceDialog(); 44 QuickOpen.QuickOpen.show('');
47 var dialog = Sources.OpenResourceDialog._instanceForTest; 45 InspectorTest.addSnifferPromise(QuickOpen.QuickOpen.prototype, '_delegat eLoadedForTest').then(delegate => {
48 var keys = []; 46 var keys = [];
49 for (var i = 0; i < dialog.itemCount(); ++i) 47 for (var i = 0; i < delegate.itemCount(); ++i)
50 keys.push(dialog.itemKeyAt(i)); 48 keys.push(delegate.itemKeyAt(i));
51 keys.sort(); 49 keys.sort();
52 InspectorTest.addResult(keys.join("\n")); 50 InspectorTest.addResult(keys.join("\n"));
53 UI.Dialog._instance.detach(); 51 UI.Dialog._instance.detach();
52 next();
53 });
54 } 54 }
55 }; 55 };
56 </script> 56 </script>
57 </head> 57 </head>
58 <body onload="runTest()"> 58 <body onload="runTest()">
59 <p>Verify that GoTo source dialog filters out mapped uiSourceCodes.</p> 59 <p>Verify that GoTo source dialog filters out mapped uiSourceCodes.</p>
60 </body> 60 </body>
61 </html> 61 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698