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

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

Issue 2588503002: DevTools: Cache the original content on UISourceCode (Closed)
Patch Set: Don't modify test 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="../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
einbinder 2016/12/20 00:56:55 There was trailing whitespace in this file.
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 for (var i = 0; i < uiSourceCode.history.length; ++i) { 27 for (var i = 0; i < uiSourceCode.history.length; ++i) {
28 var revision = uiSourceCode.history[i]; 28 var revision = uiSourceCode.history[i];
29 if (i !== 0) 29 if (i !== 0)
30 revisionsString += ", "; 30 revisionsString += ", ";
31 revisionsString += "'" + revision.content + "'"; 31 revisionsString += "'" + revision.content + "'";
32 } 32 }
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 }, 209 },
210 ]); 210 ]);
211 } 211 }
212 </script> 212 </script>
213 </head> 213 </head>
214 <body onload="runTest()"> 214 <body onload="runTest()">
215 <p>Tests revision support in UISourceCode.</p> 215 <p>Tests revision support in UISourceCode.</p>
216 <a href="https://bugs.webkit.org/show_bug.cgi?id=97669">Bug 97669</a> 216 <a href="https://bugs.webkit.org/show_bug.cgi?id=97669">Bug 97669</a>
217 </body> 217 </body>
218 </html> 218 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698