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

Unified Diff: LayoutTests/fast/css/remove-class-name.html

Issue 165723006: Regression test for class removal. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | LayoutTests/fast/css/remove-class-name-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/remove-class-name.html
diff --git a/LayoutTests/fast/css/remove-class-name.html b/LayoutTests/fast/css/remove-class-name.html
new file mode 100644
index 0000000000000000000000000000000000000000..f94e166b49adc3b794b3232f011214e9ba983427
--- /dev/null
+++ b/LayoutTests/fast/css/remove-class-name.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<style>
+.b .a { background-color: red; }
+</style>
+<div class="b"><div class="a">You should see no red.</div></div>
+<script>
+description("Removing a class affected by a selector.");
+
+document.body.offsetLeft; // force style recalc
+document.getElementsByTagName("div")[1].className = "";
+shouldBe("getComputedStyle(document.getElementsByTagName('div')[1], null).backgroundColor", "'rgba(0, 0, 0, 0)'");
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/remove-class-name-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698