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

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

Issue 2460513003: DevTools: [Persistence] tabs should not change order during reload (Closed)
Patch Set: fix test 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-merge-editor-tabs-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="../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="../workspace-test.js"></script> 5 <script src="../workspace-test.js"></script>
6 <script src="../isolated-filesystem-test.js"></script> 6 <script src="../isolated-filesystem-test.js"></script>
7 <script src="./persistence-test.js"></script> 7 <script src="./persistence-test.js"></script>
8 <script src="./resources/foo.js"></script> 8 <script src="./resources/foo.js"></script>
9 <script> 9 <script>
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 WebInspector.persistence.addEventListener(WebInspector.Persistence.E vents.BindingRemoved, onBindingRemoved); 75 WebInspector.persistence.addEventListener(WebInspector.Persistence.E vents.BindingRemoved, onBindingRemoved);
76 WebInspector.fileSystemMapping.removeFileMapping(fs.fileSystemPath, "http://127.0.0.1:8000", "/"); 76 WebInspector.fileSystemMapping.removeFileMapping(fs.fileSystemPath, "http://127.0.0.1:8000", "/");
77 77
78 function onBindingRemoved(event) 78 function onBindingRemoved(event)
79 { 79 {
80 var binding = event.data; 80 var binding = event.data;
81 if (binding.network.name() !== "foo.js") 81 if (binding.network.name() !== "foo.js")
82 return 82 return
83 WebInspector.persistence.removeEventListener(WebInspector.Persis tence.Events.BindingRemoved, onBindingRemoved); 83 WebInspector.persistence.removeEventListener(WebInspector.Persis tence.Events.BindingRemoved, onBindingRemoved);
84 dumpEditorTabs(); 84 dumpEditorTabs();
85 dumpSourceFrame(networkSourceFrame); 85 dumpSourceFrame(fileSystemSourceFrame);
lushnikov 2016/10/28 22:14:30 since after this change the actual selected file w
86 next(); 86 next();
87 } 87 }
88 }, 88 },
89 ]); 89 ]);
90 90
91 function dumpEditorTabs() 91 function dumpEditorTabs()
92 { 92 {
93 var editorContainer = WebInspector.panels.sources._sourcesView._editorCo ntainer; 93 var editorContainer = WebInspector.panels.sources._sourcesView._editorCo ntainer;
94 var openedUISourceCodes = editorContainer._tabIds.keysArray(); 94 var openedUISourceCodes = editorContainer._tabIds.keysArray();
95 openedUISourceCodes.sort((a, b) => a.url().compareTo(b.url())); 95 openedUISourceCodes.sort((a, b) => a.url().compareTo(b.url()));
96 InspectorTest.addResult("Opened tabs: "); 96 InspectorTest.addResult("Opened tabs: ");
97 for (code of openedUISourceCodes) 97 for (code of openedUISourceCodes)
98 InspectorTest.addResult(" " + code.url()); 98 InspectorTest.addResult(" " + code.url());
99 } 99 }
100 100
101 function dumpSourceFrame(sourceFrame) 101 function dumpSourceFrame(sourceFrame)
102 { 102 {
103 InspectorTest.addResult("SourceFrame: " + sourceFrame._url); 103 InspectorTest.addResult("SourceFrame: " + sourceFrame._url);
104 InspectorTest.addResult(" selection: " + sourceFrame.selection()); 104 InspectorTest.addResult(" selection: " + sourceFrame.selection());
105 InspectorTest.addResult(" firstVisibleLine: " + sourceFrame.textEdito r.firstVisibleLine()); 105 InspectorTest.addResult(" firstVisibleLine: " + sourceFrame.textEdito r.firstVisibleLine());
106 InspectorTest.addResult(" isDirty: " + sourceFrame.uiSourceCode().isD irty()); 106 InspectorTest.addResult(" isDirty: " + sourceFrame.uiSourceCode().isD irty());
107 } 107 }
108 }; 108 };
109 </script> 109 </script>
110 </head> 110 </head>
111 <body onload="runTest()"> 111 <body onload="runTest()">
112 <p>Verify that tabs get merged and split when binding is added and removed.</p> 112 <p>Verify that tabs get merged and split when binding is added and removed.</p>
113 </body> 113 </body>
114 </html> 114 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-merge-editor-tabs-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698