Index: third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-content.html |
diff --git a/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-content.html b/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-content.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4a63e47349789a5e1eec11055dc75943bd5015b3 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-content.html |
@@ -0,0 +1,48 @@ |
+<!DOCTYPE html> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+ |
+<style> |
+#target1::before { |
+ content: 'test'; |
+} |
+#target1::after { |
+ content: normal; |
+} |
+#target2 { |
+ content: 'test'; |
+} |
+#target2::before { |
+ content: normal; |
+} |
+#target2::after { |
+ content: 'test'; |
+} |
+#target3 { |
+ content: none; |
+} |
+#target3::before { |
+ content: none; |
+} |
+#target3::after { |
+ content: 'test'; |
+} |
+</style> |
+ |
+<div id="target1"></div> |
+<div id="target2"></div> |
+<div id="target3"></div> |
+ |
+<script> |
+test(function() { |
+ assert_equals(getComputedStyle(target1).content, 'normal'); |
+ assert_equals(getComputedStyle(target1, '::before').content, '"test"'); |
+ assert_equals(getComputedStyle(target1, '::after').content, 'none'); |
+ assert_equals(getComputedStyle(target2).content, 'normal'); |
+ assert_equals(getComputedStyle(target2, '::before').content, 'none'); |
+ assert_equals(getComputedStyle(target2, '::after').content, '"test"'); |
+ assert_equals(getComputedStyle(target3).content, 'normal'); |
+ assert_equals(getComputedStyle(target3, '::before').content, 'none'); |
+ assert_equals(getComputedStyle(target3, '::after').content, '"test"'); |
+}, 'Test that content computes to "normal" for elements (not pseudo elements) and to "none" if the specified value of pseudo elements is "normal"'); |
+</script> |