| Index: third_party/WebKit/LayoutTests/typedcssom/cssURLImageValue.html
|
| diff --git a/third_party/WebKit/LayoutTests/typedcssom/cssURLImageValue.html b/third_party/WebKit/LayoutTests/typedcssom/cssURLImageValue.html
|
| index 58c665bdc4ecd8d8ae7b50d483a2d681b0065e44..bfba81785cb7893e149d73b22ccca7201e8251a3 100644
|
| --- a/third_party/WebKit/LayoutTests/typedcssom/cssURLImageValue.html
|
| +++ b/third_party/WebKit/LayoutTests/typedcssom/cssURLImageValue.html
|
| @@ -5,6 +5,7 @@
|
| <div id="testImage1"></div>
|
| <div id="testImage2"></div>
|
| <div id="testImage3"></div>
|
| +<div id="testImage4"></div>
|
|
|
| <script>
|
|
|
| @@ -21,6 +22,15 @@ function base64Url() {
|
| return "data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA=";
|
| }
|
|
|
| +function assertCorrectURLImageValue(image, expectedUrl, expectedWidth, expectedHeight, expectedRatio) {
|
| + assert_true(image instanceof CSSURLImageValue);
|
| + assert_equals(image.url, expectedUrl);
|
| + assert_equals(image.state, "loaded");
|
| + assert_equals(image.intrinsicWidth, expectedWidth);
|
| + assert_equals(image.intrinsicHeight, expectedHeight);
|
| + assert_equals(image.intrinsicRatio, expectedRatio);
|
| +}
|
| +
|
| test(function() {
|
| var image = new CSSURLImageValue(url());
|
| assert_equals(image.state, "unloaded");
|
| @@ -107,4 +117,17 @@ test(function() {
|
| };
|
| }
|
|
|
| +test(function() {
|
| + var url4 = base64Url();
|
| +
|
| + for (var i = 0; i < imageProperties.length; ++i) {
|
| + testImage4.style[imageProperties[i]] = 'url(' + url4 + ')';
|
| + }
|
| +
|
| + for (var i = 0; i < imageProperties.length; ++i) {
|
| + assertCorrectURLImageValue(getComputedStyleMap(testImage4).get(imageProperties[i]), url4, 1, 1, 1);
|
| + assertCorrectURLImageValue(testImage4.styleMap.get(imageProperties[i]), url4, 1, 1, 1);
|
| + }
|
| +}, "Getting CSSURLImageValue from StyleMap");
|
| +
|
| </script>
|
|
|