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

Unified Diff: third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-update-links-3.html

Issue 2182393003: DevTools: split inspector/elements/styles-4/styles-update-links.html into 4 tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-update-links-3.html
diff --git a/third_party/WebKit/LayoutTests/inspector/elements/styles-3/styles-disable-property-after-selector-edit.html b/third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-update-links-3.html
similarity index 55%
copy from third_party/WebKit/LayoutTests/inspector/elements/styles-3/styles-disable-property-after-selector-edit.html
copy to third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-update-links-3.html
index f401155125097013fee979ae6db57860f737af63..4f1c3cc6102a56c47fad9e59e27635fcf6540007 100644
--- a/third_party/WebKit/LayoutTests/inspector/elements/styles-3/styles-disable-property-after-selector-edit.html
+++ b/third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-update-links-3.html
@@ -2,6 +2,21 @@
<head>
<script src="../../../http/tests/inspector/inspector-test.js"></script>
<script src="../../../http/tests/inspector/elements-test.js"></script>
+<script src="./styles-update-links.js"></script>
+<style>
+#pseudo::after {
+ pseudo-property: "12";
+ color: red;
+}
+
+#pseudo::after {
+ border: 1px solid black;
+}
+
+#pseudo::before {
+ color: blue;
+}
+</style>
<script>
function test()
@@ -9,21 +24,12 @@ function test()
InspectorTest.runTestSuite([
function selectInitialNode(next)
{
- InspectorTest.selectNodeAndWaitForStyles("inspected", next);
- },
-
- function editSelector(next)
- {
- var section = InspectorTest.firstMatchedStyleSection();
- section.startEditingSelector();
- section._selectorElement.textContent = "#inspected, .INSERTED-OTHER-SELECTOR";
- InspectorTest.waitForSelectorCommitted(next);
- section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
+ InspectorTest.selectNodeAndWaitForStyles("container", next);
},
function testDisableProperty(next)
{
- var treeItem = InspectorTest.getMatchedStylePropertyTreeItem("color");
+ var treeItem = InspectorTest.getMatchedStylePropertyTreeItem("border");
InspectorTest.waitForStyleApplied(onPropertyDisabled);
treeItem._toggleEnabled({ target: { checked: false }, consume: function() { } });
@@ -31,25 +37,29 @@ function test()
{
InspectorTest.addResult("\n\n#### AFTER PROPERTY DISABLED ####\n\n");
InspectorTest.dumpSelectedElementStyles(true, false, true);
- next();
+ var rules = InspectorTest.getMatchedRules();
+ InspectorTest.validateRuleRanges("container", rules, next);
}
}
]);
}
</script>
-<style>
-#inspected {
- color: red;
-}
-</style>
+<link rel="stylesheet" href="../styles/resources/styles-update-links-2.css"></link>
+<link rel="stylesheet" href="../styles/resources/styles-update-links.css"></link>
</head>
<body onload="runTest()">
<p>
-Verifies that sequence of setting selector and disabling property works.
+Tests that links are updated properly after disabling property.
</p>
-<div id="inspected">Red text here.</div>
+<div id="container" class="left-intact should-change">
+Red text here.
+</div>
+
+<div id="other"></div>
+
+<section id="pseudo"></div>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698