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

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: another try Created 3 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
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.setFileContent = function(uri, newContent, callback) 17 project.setFileContent = function(uri, newContent, callback)
18 { 18 {
19 } 19 }
20 return project; 20 return project;
21 } 21 }
22 22
23 function dumpUISourceCodeWithRevisions(uiSourceCode) 23 function dumpUISourceCodeWithRevisions(uiSourceCode)
24 { 24 {
25 var content = uiSourceCode._content; 25 var content = uiSourceCode._content;
26 var revisionsString = ""; 26 var revisionsString = "";
27 var history = uiSourceCode.history(); 27 var history = uiSourceCode.history();
28 for (var i = 0; i < history.length; ++i) { 28 for (var i = 0; i < history.length; ++i) {
29 var revision = history[i]; 29 var revision = history[i];
30 if (i !== 0) 30 if (i !== 0)
31 revisionsString += ", "; 31 revisionsString += ", ";
32 revisionsString += "'" + revision.content + "'"; 32 revisionsString += "'" + revision.content + "'";
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 }, 210 },
211 ]); 211 ]);
212 } 212 }
213 </script> 213 </script>
214 </head> 214 </head>
215 <body onload="runTest()"> 215 <body onload="runTest()">
216 <p>Tests revision support in UISourceCode.</p> 216 <p>Tests revision support in UISourceCode.</p>
217 <a href="https://bugs.webkit.org/show_bug.cgi?id=97669">Bug 97669</a> 217 <a href="https://bugs.webkit.org/show_bug.cgi?id=97669">Bug 97669</a>
218 </body> 218 </body>
219 </html> 219 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698