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

Unified Diff: third_party/WebKit/LayoutTests/typedcssom/computedstyle/pseudo-elements.html

Issue 1849653003: Implement ComputedStylePropertyMap for Typed OM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@maps-inline
Patch Set: Fix compilation Created 4 years, 8 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: 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..73ed06904f3ae133ae07a5ac4bd2c0e979b38ec4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/typedcssom/computedstyle/pseudo-elements.html
@@ -0,0 +1,42 @@
+<head>
Timothy Loh 2016/04/15 04:16:07 no need for head/body, and please use standards mo
meade_UTC10 2016/04/27 05:53:56 Done.
+
+<script src='../../resources/testharness.js'></script>
+<script src='../../resources/testharnessreport.js'></script>
+
+<style type='text/css'>
Timothy Loh 2016/04/15 04:16:07 no need for type=..
meade_UTC10 2016/04/27 05:53:56 Done.
+#testElement {
+ border: 5px solid purple;
+ width: 20px;
Timothy Loh 2016/04/15 04:16:07 width not needed?
meade_UTC10 2016/04/27 05:53:56 Done.
+}
+
+#testElement:after {
+ border: 1px solid black;
+ width: 10px;
+}
+</style>
+
+</head>
+<body>
+
+<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>
+
+</body>

Powered by Google App Engine
This is Rietveld 408576698