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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/uisourcecode-revisions.html

Issue 2695123004: DevTools: Only provide static script content to UISourceCode (Closed)
Patch Set: Now there is less Created 3 years, 10 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
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/sources-test.js"></script> 4 <script src="../http/tests/inspector/sources-test.js"></script>
5 <script> 5 <script>
6 function test() 6 function test()
7 { 7 {
8 var mockProjectId = 0; 8 var mockProjectId = 0;
9 function createMockProject() 9 function createMockProject()
10 { 10 {
11 var workspace = new Workspace.Workspace(); 11 var workspace = new Workspace.Workspace();
12 var project = new Bindings.ContentProviderBasedProject(workspace, "mockP roject:" + (++mockProjectId)); 12 var project = new Bindings.ContentProviderBasedProject(workspace, "mockP roject:" + (++mockProjectId));
13 project.requestFileContent = function(uri, callback) 13 project.requestFileContent = function(uri, callback)
14 { 14 {
15 callback("<script content>"); 15 callback("<script content>");
16 } 16 }
17 project.requestOriginalFileContent = function(uri)
pfeldman 2017/02/15 23:33:38 Still some extra stuff
einbinder 2017/02/16 00:12:36 You were too fast.
18 {
19 return Promise.resolve("<script content>");
20 }
17 project.setFileContent = function(uri, newContent, callback) 21 project.setFileContent = function(uri, newContent, callback)
18 { 22 {
19 } 23 }
20 return project; 24 return project;
21 } 25 }
22 26
23 function dumpUISourceCodeWithRevisions(uiSourceCode) 27 function dumpUISourceCodeWithRevisions(uiSourceCode)
24 { 28 {
25 var content = uiSourceCode._content; 29 var content = uiSourceCode._content;
26 var revisionsString = ""; 30 var revisionsString = "";
27 var history = uiSourceCode.history(); 31 var history = uiSourceCode.history();
28 for (var i = 0; i < history.length; ++i) { 32 for (var i = 0; i < history.length; ++i) {
29 var revision = history[i]; 33 var revision = history[i];
30 if (i !== 0) 34 if (i !== 0)
31 revisionsString += ", "; 35 revisionsString += ", ";
32 revisionsString += "'" + revision.content + "'"; 36 revisionsString += "'" + revision.content + "'";
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 }, 214 },
211 ]); 215 ]);
212 } 216 }
213 </script> 217 </script>
214 </head> 218 </head>
215 <body onload="runTest()"> 219 <body onload="runTest()">
216 <p>Tests revision support in UISourceCode.</p> 220 <p>Tests revision support in UISourceCode.</p>
217 <a href="https://bugs.webkit.org/show_bug.cgi?id=97669">Bug 97669</a> 221 <a href="https://bugs.webkit.org/show_bug.cgi?id=97669">Bug 97669</a>
218 </body> 222 </body>
219 </html> 223 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698