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 <script> | 8 <script> |
| 9 test(function() { |
| 10 testElement.styleMap.set('background-image', new CSSURLImageValue('')); |
| 11 document.body.offsetTop; |
| 12 assert_equals(testElement.styleMap.get('background-image').intrinsicHeight, 0)
; |
| 13 assert_equals(testElement.styleMap.get('background-image').intrinsicWidth, 0); |
| 14 }, "Check that setting background-image to CSSURLImageValue('') doesn't cause a
crash"); |
| 15 |
8 runInlineStylePropertyMapTests( { | 16 runInlineStylePropertyMapTests( { |
9 property: 'background-image', | 17 property: 'background-image', |
10 validKeywords: [ | 18 validKeywords: [ |
11 'none', | 19 'none', |
12 ], | 20 ], |
13 validObjects: [ | 21 validObjects: [ |
14 new CSSURLImageValue(window.location.href + 'resources/1x1-green.jpg'), | 22 new CSSURLImageValue(window.location.href + 'resources/1x1-green.jpg'), |
15 // new CSSURLImageValue('') - This will be introduced in a later patch and c
rashes for now. | 23 new CSSURLImageValue(window.location.href) |
16 ], | 24 ], |
17 supportsMultiple: false, | 25 supportsMultiple: false, |
18 invalidObjects: [new CSSSimpleLength(4, 'px')] | 26 invalidObjects: [new CSSSimpleLength(4, 'px')] |
19 }); | 27 }); |
20 </script> | 28 </script> |
OLD | NEW |