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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/file-system-mapping-overrides.html

Issue 2506463002: DevTools: remove Bindings.NetworkMapping.addMapping/removeMapping methods (Closed)
Patch Set: rebaseline Created 4 years, 1 month 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="../http/tests/inspector/inspector-test.js"></script> 3 <script src="../http/tests/inspector/inspector-test.js"></script>
4 <script> 4 <script>
5 function test() 5 function test()
6 { 6 {
7 InspectorTest.runTestSuite([ 7 InspectorTest.runTestSuite([
8 function testFileSystemClashDirectOrder(next) 8 function testFileSystemClashDirectOrder(next)
9 { 9 {
10 var fileSystemMapping = new Workspace.FileSystemMapping(); 10 var fileSystemMapping = new Workspace.FileSystemMapping(Workspace.is olatedFileSystemManager);
11 fileSystemMapping.addFileSystem("file:///Source/devtools"); 11 fileSystemMapping.addFileSystem("file:///Source/devtools");
12 12
13 fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devt ools", "chrome-devtools://devtools/bundled/wrong_url", "/"); 13 fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devt ools", "chrome-devtools://devtools/bundled/wrong_url", "/");
14 fileSystemMapping.addFileMapping("file:///Source/devtools", "http:// localhost:1234/right_url", "/"); 14 fileSystemMapping.addFileMapping("file:///Source/devtools", "http:// localhost:1234/right_url", "/");
15 15
16 InspectorTest.addResult(fileSystemMapping.networkURLForFileSystemURL ("file:///Source/devtools", "file:///Source/devtools/file.txt")); 16 InspectorTest.addResult(fileSystemMapping.networkURLForFileSystemURL ("file:///Source/devtools", "file:///Source/devtools/file.txt"));
17 fileSystemMapping.dispose();
17 next(); 18 next();
18 }, 19 },
19 20
20 function testFileSystemClashReversedOrder(next) 21 function testFileSystemClashReversedOrder(next)
21 { 22 {
22 var fileSystemMapping = new Workspace.FileSystemMapping(); 23 var fileSystemMapping = new Workspace.FileSystemMapping(Workspace.is olatedFileSystemManager);
23 fileSystemMapping.addFileSystem("file:///Source/devtools"); 24 fileSystemMapping.addFileSystem("file:///Source/devtools");
24 25
25 fileSystemMapping.addFileMapping("file:///Source/devtools", "http:// localhost:1234/right_url", "/"); 26 fileSystemMapping.addFileMapping("file:///Source/devtools", "http:// localhost:1234/right_url", "/");
26 fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devt ools", "chrome-devtools://devtools/wrong_url", "/"); 27 fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devt ools", "chrome-devtools://devtools/wrong_url", "/");
27 28
28 InspectorTest.addResult(fileSystemMapping.networkURLForFileSystemURL ("file:///Source/devtools", "file:///Source/devtools/file.txt")); 29 InspectorTest.addResult(fileSystemMapping.networkURLForFileSystemURL ("file:///Source/devtools", "file:///Source/devtools/file.txt"));
30 fileSystemMapping.dispose();
29 next(); 31 next();
30 }, 32 },
31 33
32 function testNetworkClashDirectOrder(next) 34 function testNetworkClashDirectOrder(next)
33 { 35 {
34 var fileSystemMapping = new Workspace.FileSystemMapping(); 36 var fileSystemMapping = new Workspace.FileSystemMapping(Workspace.is olatedFileSystemManager);
35 fileSystemMapping.addFileSystem("file:///Source/devtools"); 37 fileSystemMapping.addFileSystem("file:///Source/devtools");
36 38
37 fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devt ools", "http://localhost:1234/front_end", "/wrong"); 39 fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devt ools", "http://localhost:1234/front_end", "/wrong");
38 fileSystemMapping.addFileMapping("file:///Source/devtools", "http:// localhost:1234/front_end", "/right"); 40 fileSystemMapping.addFileMapping("file:///Source/devtools", "http:// localhost:1234/front_end", "/right");
39 41
40 InspectorTest.addResult(fileSystemMapping.fileForURL("http://localho st:1234/front_end/file.txt").fileURL); 42 InspectorTest.addResult(fileSystemMapping.fileForURL("http://localho st:1234/front_end/file.txt").fileURL);
43 fileSystemMapping.dispose();
41 next(); 44 next();
42 }, 45 },
43 46
44 function testNetworkClashReversedOrder(next) 47 function testNetworkClashReversedOrder(next)
45 { 48 {
46 var fileSystemMapping = new Workspace.FileSystemMapping(); 49 var fileSystemMapping = new Workspace.FileSystemMapping(Workspace.is olatedFileSystemManager);
47 fileSystemMapping.addFileSystem("file:///Source/devtools"); 50 fileSystemMapping.addFileSystem("file:///Source/devtools");
48 51
49 fileSystemMapping.addFileMapping("file:///Source/devtools", "http:// localhost:1234/front_end", "/right"); 52 fileSystemMapping.addFileMapping("file:///Source/devtools", "http:// localhost:1234/front_end", "/right");
50 fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devt ools", "http://localhost:1234/front_end", "/wrong"); 53 fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devt ools", "http://localhost:1234/front_end", "/wrong");
51 54
52 InspectorTest.addResult(fileSystemMapping.fileForURL("http://localho st:1234/front_end/file.txt").fileURL); 55 InspectorTest.addResult(fileSystemMapping.fileForURL("http://localho st:1234/front_end/file.txt").fileURL);
56 fileSystemMapping.dispose();
53 next(); 57 next();
54 }, 58 },
55 ]); 59 ]);
56 } 60 }
57 </script> 61 </script>
58 </head> 62 </head>
59 <body onload="runTest()"> 63 <body onload="runTest()">
60 <p>Tests FileSystemMapping overrides</p> 64 <p>Tests FileSystemMapping overrides</p>
61 </body> 65 </body>
62 </html> 66 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698