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

Unified Diff: third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-update-links-2.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-2.html
diff --git a/third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-update-links-2.html b/third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-update-links-2.html
new file mode 100644
index 0000000000000000000000000000000000000000..84ce46e13f1a4694d05aa2b453eecc46d49b2194
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-update-links-2.html
@@ -0,0 +1,67 @@
+<html>
+<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()
+{
+ InspectorTest.runTestSuite([
+ function selectInitialNode(next)
+ {
+ InspectorTest.selectNodeAndWaitForStyles("container", next);
+ },
+
+ function testEditSelector(next)
+ {
+ var section = WebInspector.panels.elements.sidebarPanes.styles._sectionBlocks[0].sections[3];
+ section.startEditingSelector();
+ section._selectorElement.textContent = ".should-change, .INSERTED-OTHER-SELECTOR";
+ InspectorTest.waitForSelectorCommitted(onSelectorEdited);
+ section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
+
+ function onSelectorEdited()
+ {
+ InspectorTest.addResult("\n\n#### AFTER SELECTOR EDIT ####\n\n");
+ InspectorTest.dumpSelectedElementStyles(true, false, true);
+ var rules = InspectorTest.getMatchedRules();
+ InspectorTest.validateRuleRanges("container", rules, next);
+ }
+ }
+ ]);
+}
+</script>
+<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>
+Tests that links are updated properly when editing selector.
+</p>
+
+<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