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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/changes/changes-highlighter.html

Issue 2772643002: DevTools: Changes View (Closed)
Patch Set: fix test Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/changes/changes-highlighter-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
(Empty)
1 <html>
2 <head>
3
4 <link rel="stylesheet" href="resources/before.css">
5 <link rel="stylesheet" href="resources/after.css">
6 <script src="../../http/tests/inspector/inspector-test.js"></script>
7 <script src="../../http/tests/inspector/debugger-test.js"></script>
8 <script src="changes-test.js"></script>
9 <script>
10
11 function test() {
12 InspectorTest.waitForUISourceCode("after.css").then(uiSourceCode => uiSource Code.requestContent()).then(onAfterContent);
13
14 function onAfterContent(content) {
15 InspectorTest.waitForScriptSource("before.css", uiSourceCode => uiSourceCo de.setWorkingCopy(content));
16 InspectorTest.addSniffer(Changes.ChangesView.prototype, "_renderDiffRows", rowsRendered, true);
17 UI.viewManager.showView("changes.changes");
18 }
19
20 function rowsRendered() {
21 var codeMirror = this._editor._codeMirror;
22 for (var i = 0; i < codeMirror.lineCount(); i++) {
23 codeMirror.scrollIntoView(i); // Ensure highlighting
24 var lineInfo = codeMirror.lineInfo(i);
25 var prefix = "";
26 if (lineInfo.handle.styleClasses.bgClass === "deletion")
27 prefix = "-";
28 else if (lineInfo.handle.styleClasses.bgClass === "addition")
29 prefix = "+";
30 else if (lineInfo.handle.styleClasses.bgClass === "equal")
31 prefix = " ";
32 InspectorTest.addResult(prefix + " " + lineInfo.text);
33
34 }
35 InspectorTest.completeTest();
36 }
37 }
38 </script>
39 </head>
40 <body onload="runTest()">
41 <p>Tests that the changes view highlights diffs correctly.</p>
42 </body>
43 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/changes/changes-highlighter-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698