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

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

Issue 2515583002: DevTools: move FileSystemWorkspaceBinding under persistence/ (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 src="../../../http/tests/inspector/debugger-test.js"></script> 4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script src="../../../http/tests/inspector/workspace-test.js"></script> 5 <script src="../../../http/tests/inspector/workspace-test.js"></script>
6 <script src="../../../http/tests/inspector/isolated-filesystem-test.js"></script > 6 <script src="../../../http/tests/inspector/isolated-filesystem-test.js"></script >
7 <script src="../../../http/tests/inspector/live-edit-test.js"></script> 7 <script src="../../../http/tests/inspector/live-edit-test.js"></script>
8 <script> 8 <script>
9 9
10 function test() 10 function test()
11 { 11 {
12 var target; 12 var target;
13 var resourceScriptMapping; 13 var resourceScriptMapping;
14 var defaultScriptMapping; 14 var defaultScriptMapping;
15 var persistence; 15 var persistence;
16 var fileSystemProjectId = Bindings.FileSystemWorkspaceBinding.projectId("fil e:///var/www"); 16 var fileSystemProjectId = Persistence.FileSystemWorkspaceBinding.projectId(" file:///var/www");
17 17
18 function createWorkspaceWithTarget() 18 function createWorkspaceWithTarget()
19 { 19 {
20 target = InspectorTest.createWorkspaceWithTarget(false); 20 target = InspectorTest.createWorkspaceWithTarget(false);
21 var entry = InspectorTest.testDebuggerWorkspaceBinding._targetToData.get (target); 21 var entry = InspectorTest.testDebuggerWorkspaceBinding._targetToData.get (target);
22 resourceScriptMapping = entry._resourceMapping; 22 resourceScriptMapping = entry._resourceMapping;
23 defaultScriptMapping = entry._defaultMapping; 23 defaultScriptMapping = entry._defaultMapping;
24 if (persistence) 24 if (persistence)
25 persistence.dispose(); 25 persistence.dispose();
26 persistence = new Persistence.Persistence(InspectorTest.testWorkspace, B indings.breakpointManager, Workspace.fileSystemMapping); 26 persistence = new Persistence.Persistence(InspectorTest.testWorkspace, B indings.breakpointManager, Workspace.fileSystemMapping);
(...skipping 26 matching lines...) Expand all
53 { 53 {
54 InspectorTest.addResult("Adding network resource."); 54 InspectorTest.addResult("Adding network resource.");
55 InspectorTest.addMockUISourceCodeViaNetwork("http://localhost/ht ml/foo.js", Common.resourceTypes.Script, "<foo content>", target); 55 InspectorTest.addMockUISourceCodeViaNetwork("http://localhost/ht ml/foo.js", Common.resourceTypes.Script, "<foo content>", target);
56 InspectorTest.addMockUISourceCodeViaNetwork("http://localhost/ba r.js", Common.resourceTypes.Script, "<foo content>", target); 56 InspectorTest.addMockUISourceCodeViaNetwork("http://localhost/ba r.js", Common.resourceTypes.Script, "<foo content>", target);
57 dumpFileSystemUISourceCodesMappings(); 57 dumpFileSystemUISourceCodesMappings();
58 58
59 var uiSourceCode = InspectorTest.testWorkspace.uiSourceCode(file SystemProjectId, "file:///var/www/html/foo.js"); 59 var uiSourceCode = InspectorTest.testWorkspace.uiSourceCode(file SystemProjectId, "file:///var/www/html/foo.js");
60 networkUISourceCode = InspectorTest.testWorkspace.uiSourceCode(B indings.NetworkProject.projectId(target, target.resourceTreeModel.mainFrame, fal se), "http://localhost/html/foo.js"); 60 networkUISourceCode = InspectorTest.testWorkspace.uiSourceCode(B indings.NetworkProject.projectId(target, target.resourceTreeModel.mainFrame, fal se), "http://localhost/html/foo.js");
61 InspectorTest.addResult("Adding mapping between network and file system resources."); 61 InspectorTest.addResult("Adding mapping between network and file system resources.");
62 62
63 var fileSystemPath = Bindings.FileSystemWorkspaceBinding.fileSys temPath(uiSourceCode.project().id()); 63 var fileSystemPath = Persistence.FileSystemWorkspaceBinding.file SystemPath(uiSourceCode.project().id());
64 Workspace.fileSystemMapping.addMappingForResource(networkUISourc eCode.url(), fileSystemPath, uiSourceCode.url()); 64 Workspace.fileSystemMapping.addMappingForResource(networkUISourc eCode.url(), fileSystemPath, uiSourceCode.url());
65 var setting = JSON.stringify(Workspace.fileSystemMapping._fileSy stemMappingSetting.get()); 65 var setting = JSON.stringify(Workspace.fileSystemMapping._fileSy stemMappingSetting.get());
66 66
67 InspectorTest.addResult("Emulate reloading inspector."); 67 InspectorTest.addResult("Emulate reloading inspector.");
68 fs.reportRemoved(); 68 fs.reportRemoved();
69 createWorkspaceWithTarget(); 69 createWorkspaceWithTarget();
70 Workspace.fileSystemMapping._fileSystemMappingSetting.set(JSON.p arse(setting)); 70 Workspace.fileSystemMapping._fileSystemMappingSetting.set(JSON.p arse(setting));
71 Workspace.fileSystemMapping._loadFromSettings(); 71 Workspace.fileSystemMapping._loadFromSettings();
72 fs.reportCreated(fileSystemCreated2); 72 fs.reportCreated(fileSystemCreated2);
73 } 73 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 157 }
158 } 158 }
159 ]); 159 ]);
160 }; 160 };
161 </script> 161 </script>
162 </head> 162 </head>
163 <body onload="runTest()"> 163 <body onload="runTest()">
164 <p>Tests file system project mappings.</p> 164 <p>Tests file system project mappings.</p>
165 </body> 165 </body>
166 </html> 166 </html>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/workspace-test.js ('k') | third_party/WebKit/Source/devtools/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698