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

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

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

Powered by Google App Engine
This is Rietveld 408576698