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

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

Issue 1187193005: DevTools: migrate from CSS.setPropertyText to CSS.setStyleText (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: for landing 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-property-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-property-text.html
diff --git a/LayoutTests/inspector-protocol/css/css-set-property-text.html b/LayoutTests/inspector-protocol/css/css-set-property-text.html
deleted file mode 100644
index 86db5ff9e13fba459051c49f9d14683e0ee24fff..0000000000000000000000000000000000000000
--- a/LayoutTests/inspector-protocol/css/css-set-property-text.html
+++ /dev/null
@@ -1,189 +0,0 @@
-<html>
-<head>
-<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
-<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script>
-<script type="text/javascript">
-function test()
-{
- InspectorTest.eventHandler["CSS.styleSheetAdded"] = styleSheetAdded;
- InspectorTest.sendCommandOrDie("DOM.enable", {});
- InspectorTest.sendCommandOrDie("CSS.enable", {});
-
- var setPropertyText;
- var verifyProtocolError;
- var dumpStyleSheet;
-
- function styleSheetAdded(result)
- {
- var styleSheetId = result.params.header.styleSheetId;
- setPropertyText = InspectorTest.setPropertyText.bind(InspectorTest, styleSheetId, false);
- verifyProtocolError = InspectorTest.setPropertyText.bind(InspectorTest, styleSheetId, true);
- dumpStyleSheet = InspectorTest.dumpStyleSheetText.bind(null, styleSheetId);
- InspectorTest.sendCommandOrDie("CSS.getStyleSheetText", { styleSheetId: styleSheetId }, onInitialStyleSheetText);
- }
-
- function onInitialStyleSheetText(result)
- {
- InspectorTest.log("==== Initial style sheet text ====");
- InspectorTest.log(result.text);
- InspectorTest.runTestSuite(testSuite);
- }
-
- var testSuite = [
- function testEditProperty(next)
- {
- setPropertyText({
- range: { startLine: 7, startColumn: 4, endLine: 7, endColumn: 14 },
- text: "content: 'EDITED PROPERTY';"
- }, InspectorTest.undoAndNext(next));
- },
-
- function testBreakingCommentEditProperty(next)
- {
- verifyProtocolError({
- range: { startLine: 8, startColumn: 4, endLine: 8, endColumn: 14 },
- text: "/*<--OPENED COMMENT"
- }, next);
- },
-
- function testInsertFirstProperty(next)
- {
- setPropertyText({
- range: { startLine: 6, startColumn: 4, endLine: 6, endColumn: 4 },
- text: "content: 'INSERTED PROPERTY';"
- }, InspectorTest.undoAndNext(next));
- },
-
- function testInsertLastProperty(next)
- {
- setPropertyText({
- range: { startLine: 10, startColumn: 0, endLine: 10, endColumn: 0 },
- text: "content: 'INSERTED PROPERTY';"
- }, InspectorTest.undoAndNext(next));
- },
-
- function testInsertMultipleProperties(next)
- {
- setPropertyText({
- range: { startLine: 8, startColumn: 0, endLine: 8, endColumn: 0 },
- text: "content: 'INSERTED #1';content: 'INSERTED #2';"
- }, InspectorTest.undoAndNext(next));
- },
-
- function testInsertPropertyInEmptyRule(next)
- {
- setPropertyText({
- range: { startLine: 16, startColumn: 13, endLine: 16, endColumn: 13 },
- text: "content: 'INSERTED PROPERTY';"
- }, InspectorTest.undoAndNext(next));
- },
-
- function testInsertPropertyOutsideRule(next)
- {
- verifyProtocolError({
- range: { startLine: 10, startColumn: 1, endLine: 10, endColumn: 1 },
- text: "content: 'INSERTED PROPERTY';"
- }, next);
- },
-
- function testInsertBreakingPropertyInLastEmptyRule(next)
- {
- verifyProtocolError({
- range: { startLine: 16, startColumn: 13, endLine: 16, endColumn: 13 },
- text: "content: 'INSERTED PROPERTY'/*"
- }, next);
- },
-
- function testDisableProperty(next)
- {
- setPropertyText({
- range: { startLine: 7, startColumn: 4, endLine: 7, endColumn: 14 },
- text: "/* margin: 0; */"
- }, InspectorTest.undoAndNext(next));
- },
-
- function testRedo(next)
- {
- setPropertyText({
- range: { startLine: 10, startColumn: 0, endLine: 10, endColumn: 0 },
- text: "align-items: center;"
- }, InspectorTest.undoAndNext(redo));
-
- function redo()
- {
- InspectorTest.sendCommandOrDie("DOM.redo", null, dumpStyleSheet.bind(null, InspectorTest.undoAndNext(next)));
- }
- },
-
- function testInvalidParameters(next)
- {
- verifyProtocolError({
- range: { startLine: "three", startColumn: 0, endLine: 4, endColumn: 0 },
- text: "no matter what is here"
- }, next);
- },
-
- function testNegativeRangeParameters(next)
- {
- verifyProtocolError({
- range: { startLine: -1, startColumn: -1, endLine: 1, endColumn: 0 },
- text: "color: blue;"
- }, next);
- },
-
- function testStartLineOutOfBounds(next)
- {
- verifyProtocolError({
- range: { startLine: 100, startColumn: 0, endLine: 100, endColumn: 0 },
- text: "color: blue;"
- }, next);
- },
-
- function testEndLineOutOfBounds(next)
- {
- verifyProtocolError({
- range: { startLine: 0, startColumn: 0, endLine: 100, endColumn: 0 },
- text: "color: blue;"
- }, next);
- },
-
- function testStartColumnBeyondLastLineCharacter(next)
- {
- verifyProtocolError({
- range: { startLine: 3, startColumn: 1000, endLine: 3, endColumn: 1000 },
- text: "color: blue;"
- }, next);
- },
-
- function testEndColumnBeyondLastLineCharacter(next)
- {
- verifyProtocolError({
- range: { startLine: 3, startColumn: 0, endLine: 3, endColumn: 1000 },
- text: "color: blue;"
- }, next);
- },
-
- function testInsertBeyondLastCharacterOfLastLine(next)
- {
- verifyProtocolError({
- range: { startLine: 3, startColumn: 1, endLine: 3, endColumn: 1 },
- text: "color: blue;"
- }, next);
- },
-
- function testReversedRange(next)
- {
- verifyProtocolError({
- range: { startLine: 2, startColumn: 0, endLine: 0, endColumn: 0 },
- text: "color: blue;"
- }, next);
- },
- ];
-}
-
-</script>
-<link rel="stylesheet" href="resources/set-property-text.css"/>
-</head>
-<body onload="runTest();">
-</body>
-</html>
« no previous file with comments | « no previous file | LayoutTests/inspector-protocol/css/css-set-property-text-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698