Load a placeholder when a url to an image is broken.

I decided to use the old Netscape broken image link icon (later we may
replace the image asset for something more trendier). The ref test will
expect that a failed load should display the rippy image.

ImageCacheTask users can define if a placeholder image should be loaded
at start up or not. This enables both the new behavior (e.g. always
return an image even for broken urls) as also the previous one.
This commit is contained in:
Adenilson Cavalcanti 2015-03-25 15:29:53 -07:00
parent 5ead929fea
commit cdebb3ca54
8 changed files with 77 additions and 32 deletions

View file

@ -193,6 +193,7 @@ flaky_cpu == linebreak_simple_a.html linebreak_simple_b.html
== multiple_css_class_a.html multiple_css_class_b.html
== negative_margin_uncle_a.html negative_margin_uncle_b.html
== negative_margins_a.html negative_margins_b.html
== no-image.html no-image-ref.html
== noscript.html noscript_ref.html
!= noteq_attr_exists_selector.html attr_exists_selector_ref.html
== nth_child_pseudo_a.html nth_child_pseudo_b.html

View file

@ -0,0 +1 @@
<img width="100px" height="100px" src="rippy.jpg">

1
tests/ref/no-image.html Normal file
View file

@ -0,0 +1 @@
<img width="100px" height="100px" src="i-feel-a-disturbance-in-the-force.wtf">

BIN
tests/ref/rippy.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB