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

Unified Diff: third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_getAll.html

Issue 1590193002: Partial implementation of inline StylePropertyMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@maps
Patch Set: Remove missed WillBe type in Element.h and Element.cpp 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/inlineStylePropertyMap_getAll.html
diff --git a/third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_getAll.html b/third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_getAll.html
new file mode 100644
index 0000000000000000000000000000000000000000..a69db093f3b9d8ed9d91083b3e49d06c2d7b1eab
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_getAll.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+
+<div id="testElement"></div>
+
+<script>
+
+// getAll
+test(function() {
+ // TODO(meade): Add a test case for a property with multiple values when that is supported.
+ testElement.styleMap.set('width', new SimpleLength(90, 'px'));
+ var result = testElement.styleMap.getAll('width');
+ assert_equals(1, result.length);
+ assert_equals('90px', result[0].cssString);
+}, "getAll() returns a list of values");
+
+test(function() {
+ assert_array_equals([], testElement.styleMap.getAll('height'));
+}, "getAll() returns an empty list if the property isn't set");
+
+test(function() {
+ assert_throws(new TypeError(), function() {
+ testElement.styleMap.getAll('lemons');
+ });
+}, "getAll() throws if you try to get an invalid property");
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698