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

Side by Side Diff: third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_getAll.html

Issue 2096133002: [Typed OM] Add support for properties which take numbers in CSSProperties.in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync to head Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 4
5 <div id="testElement"></div> 5 <div id="testElement"></div>
6 6
7 <script> 7 <script>
8 8
9 test(function() { 9 test(function() {
10 // TODO(meade): Make this a test case for a property with multiple values when that is supported. 10 // TODO(meade): Make this a test case for a property with multiple values when that is supported.
(...skipping 20 matching lines...) Expand all
31 test(function() { 31 test(function() {
32 assert_array_equals(testElement.styleMap.getAll('height'), []); 32 assert_array_equals(testElement.styleMap.getAll('height'), []);
33 }, "getAll() returns an empty list if the property isn't set"); 33 }, "getAll() returns an empty list if the property isn't set");
34 34
35 test(function() { 35 test(function() {
36 assert_throws(new TypeError(), function() { 36 assert_throws(new TypeError(), function() {
37 testElement.styleMap.getAll('lemons'); 37 testElement.styleMap.getAll('lemons');
38 }); 38 });
39 }, "getAll() throws if you try to get an invalid property"); 39 }, "getAll() throws if you try to get an invalid property");
40 40
41 test(function() {
42 testElement.style.animationIterationCount = "infinite, 6.2";
43
44 var result = testElement.styleMap.getAll('animation-iteration-count');
45 assert_equals(result.length, 2);
46 assert_true(result[0] instanceof CSSKeywordValue);
47 assert_true(result[1] instanceof CSSNumberValue);
48 assert_equals(result[0].value, "infinite");
49 assert_equals(result[1].value, 6.2);
50 }, "getAll() returns a list of mixed types if they are all valid types");
51
41 </script> 52 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698