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

Side by Side Diff: third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/background-image.html

Issue 2703393012: CSSStyleImageValue::imageLayoutSize() shouldn't crash if no ImageResourceContent (Closed)
Patch Set: Remove file and instead add test to existing file Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <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>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698