OLD | NEW |
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 <script src='property-suite.js'></script> | 4 <script src='property-suite.js'></script> |
5 <script src='config-templates.js'></script> | 5 <script src='config-templates.js'></script> |
6 | 6 |
7 <div id="testElement"></div> | 7 <div id="testElement"></div> |
8 <script> | 8 <script> |
9 test(function() { | 9 test(function() { |
10 testElement.styleMap.set('background-image', new CSSURLImageValue('')); | 10 testElement.styleMap.set('background-image', new CSSURLImageValue('')); |
11 document.body.offsetTop; | 11 document.body.offsetTop; |
12 assert_equals(testElement.styleMap.get('background-image').intrinsicHeight, 0)
; | 12 assert_equals(testElement.styleMap.get('background-image').intrinsicHeight, 0)
; |
13 assert_equals(testElement.styleMap.get('background-image').intrinsicWidth, 0); | 13 assert_equals(testElement.styleMap.get('background-image').intrinsicWidth, 0); |
14 }, "Check that setting background-image to CSSURLImageValue('') doesn't cause a
crash"); | 14 }, "Check that setting background-image to CSSURLImageValue('') doesn't cause a
crash"); |
15 | 15 |
16 runInlineStylePropertyMapTests( { | 16 runInlineStylePropertyMapTests( { |
17 property: 'background-image', | 17 property: 'background-image', |
18 validKeywords: [ | 18 validKeywords: [ |
19 'none', | 19 'none', |
20 ], | 20 ], |
21 validObjects: [ | 21 validObjects: [ |
22 new CSSURLImageValue(window.location.href + 'resources/1x1-green.jpg'), | 22 new CSSURLImageValue(window.location.href + '/resources/1x1-green.jpg'), |
23 new CSSURLImageValue(window.location.href) | 23 new CSSURLImageValue(window.location.href) |
24 ], | 24 ], |
25 supportsMultiple: false, | 25 supportsMultiple: false, |
26 invalidObjects: [new CSSSimpleLength(4, 'px')] | 26 invalidObjects: [new CSSUnitValue(4, 'px')] |
27 }); | 27 }); |
28 </script> | 28 </script> |
OLD | NEW |