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

Unified Diff: LayoutTests/fast/css/style-scoped/style-scoped-with-dom-operation.html

Issue 325663003: Remove scoped styles (retry) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix layout test (and expectation) Created 6 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/fast/css/style-scoped/style-scoped-with-dom-operation.html
diff --git a/LayoutTests/fast/css/style-scoped/style-scoped-with-dom-operation.html b/LayoutTests/fast/css/style-scoped/style-scoped-with-dom-operation.html
deleted file mode 100644
index e053332971b38e0620bb38ae21b9950e7d711e52..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/css/style-scoped/style-scoped-with-dom-operation.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<style>
-span {
- background-color: green;
-}
-</style>
-<script src="../../../resources/js-test.js"></script>
-</head>
-<body>
- <div>
- <div>
- <style id="existingStyle" scoped>
- .target { background-color: red; }
- </style>
- <span id="target" class="target">Hello, World!</span>
- </div>
- </div>
-</body>
-<script>
-description("Tests that &lt;style scoped&gt; is correctly applied after DOM operations, i.e. insertBefore, appendChild, and removeChild.");
-
-var target = document.getElementById('target');
-
-var existingStyle = document.getElementById('existingStyle');
-var newStyle = document.createElement('style');
-
-newStyle.setAttribute('scoped', 'scoped');
-newStyle.innerHTML = ".target { background-color: blue; }";
-
-debug("Insert a new scoped style before an existing scoped style.");
-existingStyle.parentNode.insertBefore(newStyle, existingStyle);
-shouldBe("window.getComputedStyle(target).backgroundColor", '"rgb(255, 0, 0)"');
-
-debug("Move an inserted scoped style after an existing scoped style.");
-existingStyle.parentNode.appendChild(newStyle);
-shouldBe("window.getComputedStyle(target).backgroundColor", '"rgb(0, 0, 255)"');
-
-debug("Move an inserted scoped style into grandparent of an existing scoped style.");
-document.body.children[0].appendChild(newStyle);
-shouldBe("window.getComputedStyle(target).backgroundColor", '"rgb(255, 0, 0)"');
-
-debug("Remove an inserted scoped style.");
-newStyle.parentNode.removeChild(newStyle);
-shouldBe("window.getComputedStyle(target).backgroundColor", '"rgb(255, 0, 0)"');
-
-debug("Remove an existing scoped style.");
-existingStyle.parentNode.removeChild(existingStyle);
-shouldBe("window.getComputedStyle(target).backgroundColor", '"rgb(0, 128, 0)"');
-</script>
-</html>

Powered by Google App Engine
This is Rietveld 408576698