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

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

Issue 1813943003: DevTools: automatic mapping detection is broken for cases with specific file paths. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added expectations Created 4 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/file-system-mapping-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 var paths = { 7 var paths = {
8 FOO: "file:///home/username/projects/foo", 8 FOO: "file:///home/username/projects/foo",
9 BAR: "file:///home/username/projects/bar", 9 BAR: "file:///home/username/projects/bar",
10 BUILD: "file:///home/username/project/build",
10 SITE1: "file:///www/site1" 11 SITE1: "file:///www/site1"
11 }; 12 };
12 13
13 function addFileSystem(fileSystemMapping, path) 14 function addFileSystem(fileSystemMapping, path)
14 { 15 {
15 InspectorTest.addResult("Adding file system " + path); 16 InspectorTest.addResult("Adding file system " + path);
16 fileSystemMapping.addFileSystem(path); 17 fileSystemMapping.addFileSystem(path);
17 checkAndDumpFileSystemMapping(fileSystemMapping); 18 checkAndDumpFileSystemMapping(fileSystemMapping);
18 } 19 }
19 20
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // At first create file system mapping and clear it. 89 // At first create file system mapping and clear it.
89 var fileSystemMapping = new WebInspector.FileSystemMapping(); 90 var fileSystemMapping = new WebInspector.FileSystemMapping();
90 var fileSystemPaths = Object.keys(fileSystemMapping._fileSystemMappings); 91 var fileSystemPaths = Object.keys(fileSystemMapping._fileSystemMappings);
91 for (var i = 0; i < fileSystemPaths.length; ++i) 92 for (var i = 0; i < fileSystemPaths.length; ++i)
92 fileSystemMapping.removeFileSystem(fileSystemPaths[i]); 93 fileSystemMapping.removeFileSystem(fileSystemPaths[i]);
93 94
94 // Now fill it with file systems. 95 // Now fill it with file systems.
95 checkAndDumpFileSystemMapping(fileSystemMapping); 96 checkAndDumpFileSystemMapping(fileSystemMapping);
96 addFileSystem(fileSystemMapping, paths.FOO) 97 addFileSystem(fileSystemMapping, paths.FOO)
97 addFileSystem(fileSystemMapping, paths.BAR) 98 addFileSystem(fileSystemMapping, paths.BAR)
99 addFileSystem(fileSystemMapping, paths.BUILD)
98 addFileSystem(fileSystemMapping, paths.SITE1) 100 addFileSystem(fileSystemMapping, paths.SITE1)
99 101
100 // Now fill it with file mappings. 102 // Now fill it with file mappings.
101 addFileMapping(fileSystemMapping, paths.SITE1, "http://localhost/", "/"); 103 addFileMapping(fileSystemMapping, paths.SITE1, "http://localhost/", "/");
102 addFileMapping(fileSystemMapping, paths.SITE1, "http://www.foo.com/", "/foo/ "); 104 addFileMapping(fileSystemMapping, paths.SITE1, "http://www.foo.com/", "/foo/ ");
103 addFileMapping(fileSystemMapping, paths.FOO, "http://www.example.com/bar/", "/foo/"); 105 addFileMapping(fileSystemMapping, paths.FOO, "http://www.example.com/bar/", "/foo/");
104 addMappingForResource(fileSystemMapping, "http://www.bar.com/foo/folder/42.j s", paths.FOO, paths.FOO + "/baz/folder/42.js"); 106 addMappingForResource(fileSystemMapping, "http://www.bar.com/foo/folder/42.j s", paths.FOO, paths.FOO + "/baz/folder/42.js");
107 addMappingForResource(fileSystemMapping, "http://localhost:3333/build/layout .css", paths.BUILD, paths.BUILD + "/layout.css");
105 108
106 InspectorTest.addResult("Testing mappings for url:"); 109 InspectorTest.addResult("Testing mappings for url:");
107 dumpFileForURL(fileSystemMapping, "http://www.bar.com/foo/folder/42.js"); 110 dumpFileForURL(fileSystemMapping, "http://www.bar.com/foo/folder/42.js");
108 dumpFileForURL(fileSystemMapping, "http://www.foo.com/bar/folder/42.js"); 111 dumpFileForURL(fileSystemMapping, "http://www.foo.com/bar/folder/42.js");
109 dumpFileForURL(fileSystemMapping, "http://localhost/index.html"); 112 dumpFileForURL(fileSystemMapping, "http://localhost/index.html");
110 dumpFileForURL(fileSystemMapping, "https://localhost/index.html"); 113 dumpFileForURL(fileSystemMapping, "https://localhost/index.html");
111 dumpFileForURL(fileSystemMapping, "http://localhost:8080/index.html"); 114 dumpFileForURL(fileSystemMapping, "http://localhost:8080/index.html");
112 dumpFileForURL(fileSystemMapping, "http://localhost/"); 115 dumpFileForURL(fileSystemMapping, "http://localhost/");
116 dumpFileForURL(fileSystemMapping, "http://localhost:3333/build/main.css");
113 InspectorTest.addResult(""); 117 InspectorTest.addResult("");
114 118
115 InspectorTest.addResult("Testing mappings for path:"); 119 InspectorTest.addResult("Testing mappings for path:");
116 dumpURLForPath(fileSystemMapping, paths.FOO, paths.FOO + "/baz/folder/42.js" ); 120 dumpURLForPath(fileSystemMapping, paths.FOO, paths.FOO + "/baz/folder/42.js" );
117 dumpURLForPath(fileSystemMapping, paths.FOO, paths.FOO + "/baz/folder/43.js" ); 121 dumpURLForPath(fileSystemMapping, paths.FOO, paths.FOO + "/baz/folder/43.js" );
118 dumpURLForPath(fileSystemMapping, paths.FOO, paths.FOO + "/bar/folder/42.js" ); 122 dumpURLForPath(fileSystemMapping, paths.FOO, paths.FOO + "/bar/folder/42.js" );
119 dumpURLForPath(fileSystemMapping, paths.FOO, paths.FOO + "/foo/folder/42.js" ); 123 dumpURLForPath(fileSystemMapping, paths.FOO, paths.FOO + "/foo/folder/42.js" );
120 dumpURLForPath(fileSystemMapping, paths.FOO, paths.FOO + "/foo2/folder/42.js "); 124 dumpURLForPath(fileSystemMapping, paths.FOO, paths.FOO + "/foo2/folder/42.js ");
121 dumpURLForPath(fileSystemMapping, paths.SITE1, paths.SITE1 + "/foo/index.htm l"); 125 dumpURLForPath(fileSystemMapping, paths.SITE1, paths.SITE1 + "/foo/index.htm l");
122 dumpURLForPath(fileSystemMapping, paths.SITE1, paths.SITE1 + "/index.html"); 126 dumpURLForPath(fileSystemMapping, paths.SITE1, paths.SITE1 + "/index.html");
(...skipping 18 matching lines...) Expand all
141 removeFileSystem(fileSystemMapping, paths.BAR) 145 removeFileSystem(fileSystemMapping, paths.BAR)
142 146
143 InspectorTest.completeTest(); 147 InspectorTest.completeTest();
144 } 148 }
145 </script> 149 </script>
146 </head> 150 </head>
147 <body onload="runTest()"> 151 <body onload="runTest()">
148 <p>Tests FileSystemMapping</p> 152 <p>Tests FileSystemMapping</p>
149 </body> 153 </body>
150 </html> 154 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/file-system-mapping-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698