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

Unified Diff: LayoutTests/inspector/elements/styles/styles-add-blank-property.html

Issue 1158883003: DevTools: shard inspector/elements tests for faster execution. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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/elements/styles/styles-add-blank-property.html
diff --git a/LayoutTests/inspector/elements/styles/styles-add-blank-property.html b/LayoutTests/inspector/elements/styles/styles-add-blank-property.html
deleted file mode 100644
index fcc9b76b763d6da598bcbc5f90878d1e64c3ee5e..0000000000000000000000000000000000000000
--- a/LayoutTests/inspector/elements/styles/styles-add-blank-property.html
+++ /dev/null
@@ -1,111 +0,0 @@
-<html>
-<head>
-<script src="../../../http/tests/inspector/inspector-test.js"></script>
-<script src="../../../http/tests/inspector/elements-test.js"></script>
-<script>
-
-function test()
-{
- InspectorTest.selectNodeAndWaitForStyles("inspected", addAndIncrementFirstProperty);
-
- var treeElement;
- var section;
-
- function addAndIncrementFirstProperty()
- {
- InspectorTest.addResult("Before append:");
- InspectorTest.dumpSelectedElementStyles(true);
- section = InspectorTest.inlineStyleSection();
-
- // Create and increment.
- treeElement = section.addNewBlankProperty(0);
- treeElement.startEditing();
- treeElement.nameElement.textContent = "margin-left";
- treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
-
- treeElement.valueElement.textContent = "1px";
- treeElement.valueElement.firstChild.select();
- treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Up"));
- InspectorTest.waitForStyleApplied(incrementProperty);
- }
-
- function incrementProperty()
- {
- // Increment again.
- treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Up"));
- InspectorTest.waitForStyleApplied(commitProperty);
- }
-
- function commitProperty()
- {
- // Commit.
- treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
- reloadStyles(addAndChangeLastCompoundProperty);
- }
-
- function addAndChangeLastCompoundProperty()
- {
- InspectorTest.addResult("After insertion at index 0:");
- InspectorTest.dumpSelectedElementStyles(true);
-
- treeElement = InspectorTest.inlineStyleSection().addNewBlankProperty(2);
- treeElement.startEditing();
- treeElement.nameElement.textContent = "color";
- treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
-
- treeElement.valueElement.textContent = "green; font-weight: bold";
- treeElement.kickFreeFlowStyleEditForTest();
-
- treeElement.valueElement.textContent = "red; font-weight: bold";
- treeElement.kickFreeFlowStyleEditForTest();
-
- treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
- InspectorTest.waitForStyleApplied(reloadStyles.bind(this, addAndCommitMiddleProperty));
- }
-
- function addAndCommitMiddleProperty()
- {
- InspectorTest.addResult("After appending and changing a 'compound' property:");
- InspectorTest.dumpSelectedElementStyles(true);
-
- treeElement = InspectorTest.inlineStyleSection().addNewBlankProperty(2);
- treeElement.startEditing();
- treeElement.nameElement.textContent = "third-property";
- treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
- treeElement.valueElement.textContent = "third-value";
-
- treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
- InspectorTest.waitForStyleApplied(reloadStyles.bind(this, dumpAndComplete));
- }
-
- function dumpAndComplete()
- {
- InspectorTest.addResult("After insertion at index 2:");
- InspectorTest.dumpSelectedElementStyles(true);
-
- InspectorTest.completeTest();
- }
-
- function reloadStyles(callback) {
- InspectorTest.selectNodeAndWaitForStyles("other", otherCallback);
-
- function otherCallback()
- {
- InspectorTest.selectNodeAndWaitForStyles("inspected", callback);
- }
- }
-}
-
-</script>
-</head>
-
-<body onload="runTest()">
-<p>
-Tests that adding a new blank property works.
-</p>
-
-<div id="inspected" style="font-size: 12px">Text</div>
-<div id="other"></div>
-
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698