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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-merge-editor-tabs.html

Issue 2551233002: DevTools: show filesystem file by default (Closed)
Patch Set: nit Created 4 years 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()
(...skipping 10 matching lines...) Expand all
21 21
22 function openNetworkTab(next) 22 function openNetworkTab(next)
23 { 23 {
24 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTypes.N etwork) 24 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTypes.N etwork)
25 .then(code => InspectorTest.showUISourceCodePromise(code)) 25 .then(code => InspectorTest.showUISourceCodePromise(code))
26 .then(onNetworkTab); 26 .then(onNetworkTab);
27 27
28 function onNetworkTab(sourceFrame) 28 function onNetworkTab(sourceFrame)
29 { 29 {
30 networkSourceFrame = sourceFrame; 30 networkSourceFrame = sourceFrame;
31 networkSourceFrame.setSelection(new Common.TextRange(2, 0, 2, 5) );
32 networkSourceFrame.scrollToLine(2);
31 dumpSourceFrame(networkSourceFrame); 33 dumpSourceFrame(networkSourceFrame);
32 next(); 34 next();
33 } 35 }
34 }, 36 },
35 37
36 function openFileSystemTab(next) 38 function openFileSystemTab(next)
37 { 39 {
38 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTypes.F ileSystem) 40 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTypes.F ileSystem)
39 .then(onFileSystemSourceCode) 41 .then(onFileSystemSourceCode)
40 .then(onFileSystemTab); 42 .then(onFileSystemTab);
41 43
42 function onFileSystemSourceCode(code) 44 function onFileSystemSourceCode(code)
43 { 45 {
44 code.setWorkingCopy("\n\nwindow.foo = ()=>'foo2';"); 46 code.setWorkingCopy("\n\nwindow.foo = ()=>'foo2';");
45 return InspectorTest.showUISourceCodePromise(code); 47 return InspectorTest.showUISourceCodePromise(code);
46 } 48 }
47 49
48 function onFileSystemTab(sourceFrame) 50 function onFileSystemTab(sourceFrame)
49 { 51 {
50 fileSystemSourceFrame = sourceFrame; 52 fileSystemSourceFrame = sourceFrame;
51 fileSystemSourceFrame.setSelection(new Common.TextRange(2, 0, 2, 5));
52 fileSystemSourceFrame.scrollToLine(2);
53 dumpSourceFrame(fileSystemSourceFrame); 53 dumpSourceFrame(fileSystemSourceFrame);
54 dumpEditorTabs(); 54 dumpEditorTabs();
55 next(); 55 next();
56 } 56 }
57 }, 57 },
58 58
59 function addFileMapping(next) 59 function addFileMapping(next)
60 { 60 {
61 InspectorTest.waitForBinding("foo.js").then(onBindingCreated); 61 InspectorTest.waitForBinding("foo.js").then(onBindingCreated);
62 Workspace.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http: //127.0.0.1:8000", "/"); 62 Workspace.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http: //127.0.0.1:8000", "/");
63 63
64 function onBindingCreated() 64 function onBindingCreated()
65 { 65 {
66 dumpEditorTabs(); 66 dumpEditorTabs();
67 dumpSourceFrame(networkSourceFrame); 67 dumpSourceFrame(fileSystemSourceFrame);
68 next(); 68 next();
69 } 69 }
70 }, 70 },
71 71
72 function removeFileMapping(next) 72 function removeFileMapping(next)
73 { 73 {
74 Persistence.persistence.addEventListener(Persistence.Persistence.Eve nts.BindingRemoved, onBindingRemoved); 74 Persistence.persistence.addEventListener(Persistence.Persistence.Eve nts.BindingRemoved, onBindingRemoved);
75 Workspace.fileSystemMapping.removeFileMapping(fs.fileSystemPath, "ht tp://127.0.0.1:8000", "/"); 75 Workspace.fileSystemMapping.removeFileMapping(fs.fileSystemPath, "ht tp://127.0.0.1:8000", "/");
76 76
77 function onBindingRemoved(event) 77 function onBindingRemoved(event)
(...skipping 26 matching lines...) Expand all
104 InspectorTest.addResult(" firstVisibleLine: " + sourceFrame.textEdito r.firstVisibleLine()); 104 InspectorTest.addResult(" firstVisibleLine: " + sourceFrame.textEdito r.firstVisibleLine());
105 InspectorTest.addResult(" isDirty: " + sourceFrame.uiSourceCode().isD irty()); 105 InspectorTest.addResult(" isDirty: " + sourceFrame.uiSourceCode().isD irty());
106 } 106 }
107 }; 107 };
108 </script> 108 </script>
109 </head> 109 </head>
110 <body onload="runTest()"> 110 <body onload="runTest()">
111 <p>Verify that tabs get merged and split when binding is added and removed.</p> 111 <p>Verify that tabs get merged and split when binding is added and removed.</p>
112 </body> 112 </body>
113 </html> 113 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698