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

Unified Diff: LayoutTests/fast/sub-pixel/shadows-computed-style.html

Issue 23241010: Support subpixel values for text-shadow and box-shadow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed review comments Created 6 years, 11 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/sub-pixel/shadows-computed-style.html
diff --git a/LayoutTests/fast/sub-pixel/shadows-computed-style.html b/LayoutTests/fast/sub-pixel/shadows-computed-style.html
new file mode 100644
index 0000000000000000000000000000000000000000..ff7e0ee27279799700b38cbd413bc050c13e724e
--- /dev/null
+++ b/LayoutTests/fast/sub-pixel/shadows-computed-style.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<style>
+ #text { text-shadow: 0.5px 1.5px 2.5px red; }
+ #box { box-shadow: 0.5px 1.5px 2.5px 3.5px red; }
+</style>
+
+<div id="text">Text shadow</div>
+<div id="box">Box shadow</div>
+
+<script>
+ description("Tests the computed style for subpixel shadows");
+
+ var text = document.getElementById("text");
+ var box = document.getElementById("box");
+
+ var style = window.getComputedStyle(text, null);
+ shouldBe("style.getPropertyValue('text-shadow')",
+ "'rgb(255, 0, 0) 0.5px 1.5px 2.5px'");
+ style = window.getComputedStyle(box, null);
+ shouldBe("style.getPropertyValue('box-shadow')",
+ "'rgb(255, 0, 0) 0.5px 1.5px 2.5px 3.5px'");
+</script>
+

Powered by Google App Engine
This is Rietveld 408576698