Index: third_party/WebKit/LayoutTests/typedcssom/computedstyle/pseudo-elements.html |
diff --git a/third_party/WebKit/LayoutTests/typedcssom/computedstyle/pseudo-elements.html b/third_party/WebKit/LayoutTests/typedcssom/computedstyle/pseudo-elements.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1becbe8850fcabf8b206be23dda008a1ee2146af |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/typedcssom/computedstyle/pseudo-elements.html |
@@ -0,0 +1,35 @@ |
+<!DOCTYPE html> |
+ |
+<script src='../../resources/testharness.js'></script> |
+<script src='../../resources/testharnessreport.js'></script> |
+ |
+<style> |
+#testElement { |
+ border: 5px solid purple; |
+} |
+ |
+#testElement:after { |
+ border: 1px solid black; |
+} |
+</style> |
+ |
+<div id="testElement"></div> |
+ |
+<script> |
+ |
+var computedStyleMap = getComputedStyleMap(testElement); |
+var pseudoComputedStyleMap = getComputedStyleMap(testElement, '::after'); |
+test(function() { |
+ assert_equals(computedStyleMap.get('border-top-width').cssString, '5px'); |
+ assert_equals(pseudoComputedStyleMap.get('border-top-width').cssString, '1px'); |
+}, 'get on Computed StyleMap of pseudo element returns correct styles'); |
+ |
+test(function() { |
+ // TODO(meade): When actual multiple valued properties are supported, use one of them. |
+ |
+ var styleValueList = pseudoComputedStyleMap.getAll('border-top-width'); |
+ assert_equals(styleValueList.length, 1); |
+ assert_equals(styleValueList[0].cssString, '1px'); |
+}, 'getAll on Computed StyleMap of pseudo element returns list of correct styles'); |
+ |
+</script> |