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

Unified Diff: LayoutTests/inspector-protocol/css/css-set-property-text-inline.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
Index: LayoutTests/inspector-protocol/css/css-set-property-text-inline.html
diff --git a/LayoutTests/inspector-protocol/css/css-set-property-text-inline.html b/LayoutTests/inspector-protocol/css/css-set-property-text-inline.html
deleted file mode 100644
index e6c7814e07de1f423d1d2f01baf195aabf605686..0000000000000000000000000000000000000000
--- a/LayoutTests/inspector-protocol/css/css-set-property-text-inline.html
+++ /dev/null
@@ -1,98 +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" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script>
-<script type="text/javascript">
-function test()
-{
- var setPropertyText;
- var verifyProtocolError;
- var dumpStyleSheet;
- var documentNodeId;
-
- InspectorTest.requestDocumentNodeId(onDocumentNodeReceived);
-
- function onDocumentNodeReceived(nodeId)
- {
- documentNodeId = nodeId;
- InspectorTest.sendCommandOrDie("CSS.enable", {}, onCSSEnabled);
- }
-
- function onCSSEnabled()
- {
- InspectorTest.requestNodeId(documentNodeId, "#reddiv", onNodeRecieved);
- }
-
- function onNodeRecieved(nodeId)
- {
- InspectorTest.sendCommandOrDie("CSS.getInlineStylesForNode", {
- nodeId: nodeId,
- }, onInlineStyleRecieved);
- }
-
- function onInlineStyleRecieved(result)
- {
- var styleSheetId = result.inlineStyle.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: 0, startColumn: 0, endLine: 0, endColumn: 11 },
- text: "content: 'EDITED PROPERTY';"
- }, InspectorTest.undoAndNext(next));
- },
-
- function testBreakingCommentEditProperty(next)
- {
- verifyProtocolError({
- range: { startLine: 0, startColumn: 0, endLine: 0, endColumn: 11 },
- text: "/*<--OPENED COMMENT"
- }, next);
- },
-
- function testInsertFirstProperty(next)
- {
- setPropertyText({
- range: { startLine: 0, startColumn: 0, endLine: 0, endColumn: 0 },
- text: "content: 'INSERTED PROPERTY';"
- }, InspectorTest.undoAndNext(next));
- },
-
- function testInsertMultipleProperties(next)
- {
- setPropertyText({
- range: { startLine: 0, startColumn: 11, endLine: 0, endColumn: 11 },
- text: "content: 'INSERTED #1';content: 'INSERTED #2';"
- }, InspectorTest.undoAndNext(next));
- },
-
- function testInsertLastProperty(next)
- {
- setPropertyText({
- range: { startLine: 0, startColumn: 24, endLine: 0, endColumn: 24 },
- text: "content: 'INSERTED PROPERTY';"
- }, InspectorTest.undoAndNext(next));
- },
- ];
-}
-
-</script>
-</head>
-<body onload="runTest();">
- <div id="reddiv" style="color: red; border: 0px;">Some red text goes here</div>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698