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

Unified 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, 10 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/background-image.html
diff --git a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/background-image.html b/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/background-image.html
index 9d3c3f7860b7e637100cb9055138392a7aeb7a50..90706a2e9798c1f15e9be932e241996821df986a 100644
--- a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/background-image.html
+++ b/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/background-image.html
@@ -4,7 +4,15 @@
<script src='property-suite.js'></script>
<script src='config-templates.js'></script>
+<div id="testElement"></div>
<script>
+test(function() {
+ testElement.styleMap.set('background-image', new CSSURLImageValue(''));
+ document.body.offsetTop;
+ assert_equals(testElement.styleMap.get('background-image').intrinsicHeight, 0);
+ assert_equals(testElement.styleMap.get('background-image').intrinsicWidth, 0);
+}, "Check that setting background-image to CSSURLImageValue('') doesn't cause a crash");
+
runInlineStylePropertyMapTests( {
property: 'background-image',
validKeywords: [
@@ -12,7 +20,7 @@ runInlineStylePropertyMapTests( {
],
validObjects: [
new CSSURLImageValue(window.location.href + 'resources/1x1-green.jpg'),
- // new CSSURLImageValue('') - This will be introduced in a later patch and crashes for now.
+ new CSSURLImageValue(window.location.href)
],
supportsMultiple: false,
invalidObjects: [new CSSSimpleLength(4, 'px')]
« 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