| 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>
|
|
|