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

Unified Diff: LayoutTests/inspector-protocol/css/css-set-style-text.html

Issue 1219713003: DevTools: [regression] compare canonical text when matching styles. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: awesome review comment addressed. Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector-protocol/css/css-set-style-text-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector-protocol/css/css-set-style-text.html
diff --git a/LayoutTests/inspector-protocol/css/css-set-style-text.html b/LayoutTests/inspector-protocol/css/css-set-style-text.html
index 20ace4b3e895105ef952562a33305d7d42cd49e3..d2aefcf6bc0b0d822481013b84a2abe307a0c795 100644
--- a/LayoutTests/inspector-protocol/css/css-set-style-text.html
+++ b/LayoutTests/inspector-protocol/css/css-set-style-text.html
@@ -37,7 +37,12 @@ function test()
InspectorTest.sendCommandOrDie("CSS.getStyleSheetText", { styleSheetId: styleSheetId }, onInitialStyleSheetText);
}
- function dumpAndNext(next)
+ function dumpAndCall(next)
+ {
+ return InspectorTest.loadAndDumpMatchingRules.bind(InspectorTest, documentNodeId, "#test", next);
+ }
+
+ function dumpUndoAndNext(next)
{
return InspectorTest.loadAndDumpMatchingRules.bind(InspectorTest, documentNodeId, "#test", InspectorTest.undoAndNext(next));
}
@@ -56,7 +61,34 @@ function test()
styleSheetId: styleSheetId,
range: { startLine: 0, startColumn: 7, endLine: 2, endColumn: 0 },
text: "\n content: 'EDITED';\n",
- }, dumpAndNext(next));
+ }, dumpUndoAndNext(next));
+ },
+
+ function testSetStyleTwice(next)
+ {
+ setStyleText({
+ styleSheetId: styleSheetId,
+ range: { startLine: 0, startColumn: 7, endLine: 2, endColumn: 0 },
+ text: "\n color: green;\n padding: 0 4px;\n cursor: pointer\n",
+ }, dumpAndCall(step2));
+
+ function step2()
+ {
+ setStyleText({
+ styleSheetId: styleSheetId,
+ range: { startLine: 0, startColumn: 7, endLine: 4, endColumn: 0 },
+ text: "\n color: green;\n padding: 0 6px;\n cursor: pointer\n",
+ }, dumpAndCall(step3));
+ }
+
+ function step3()
+ {
+ setStyleText({
+ styleSheetId: styleSheetId,
+ range: { startLine: 0, startColumn: 7, endLine: 4, endColumn: 0 },
+ text: "\n color: green;\n padding: 0 8px;\n cursor: pointer\n",
+ }, dumpUndoAndNext(next));
+ }
},
function testSetStylePoorContent(next)
@@ -65,7 +97,7 @@ function test()
styleSheetId: styleSheetId,
range: { startLine: 0, startColumn: 7, endLine: 2, endColumn: 0 },
text: "}",
- }, dumpAndNext(next));
+ }, dumpUndoAndNext(next));
},
function testSetStyleInMedia(next)
@@ -74,7 +106,7 @@ function test()
styleSheetId: styleSheetId,
range: { startLine: 13, startColumn: 11, endLine: 15, endColumn: 4 },
text: "\n content: 'EDITED';\n color: red;\n /** foo */\n ",
- }, dumpAndNext(next));
+ }, dumpUndoAndNext(next));
},
function testDeleteStyleBody(next)
@@ -83,7 +115,7 @@ function test()
styleSheetId: styleSheetId,
range: { startLine: 13, startColumn: 11, endLine: 15, endColumn: 4 },
text: "",
- }, dumpAndNext(next));
+ }, dumpUndoAndNext(next));
},
function testSetStylePoorRange(next)
@@ -92,7 +124,7 @@ function test()
styleSheetId: styleSheetId,
range: { startLine: 11, startColumn: 11, endLine: 15, endColumn: 4 },
text: "\n content: 'EDITED';\n",
- }, dumpAndNext(next));
+ }, dumpUndoAndNext(next));
},
function testSetStyleOpenComment(next)
@@ -101,7 +133,7 @@ function test()
styleSheetId: styleSheetId,
range: { startLine: 13, startColumn: 11, endLine: 15, endColumn: 4 },
text: "\n content: 'EDITED'/* ;\n",
- }, dumpAndNext(next));
+ }, dumpUndoAndNext(next));
},
function testSetStyleOfRemovedRule(next)
@@ -113,7 +145,7 @@ function test()
styleSheetId: styleSheetId,
range: { startLine: 0, startColumn: 7, endLine: 2, endColumn: 0 },
text: "\n content: 'EDITED';\n",
- }, dumpAndNext(next));
+ }, dumpUndoAndNext(next));
}
}
];
« no previous file with comments | « no previous file | LayoutTests/inspector-protocol/css/css-set-style-text-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698