OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="/js-test-resources/js-test.js"></script> |
| 4 <script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=100"></script> |
| 5 <script src="resources/picture-preload-helper.js"></script> |
| 6 </head> |
| 7 <body> |
| 8 <script> |
| 9 if (window.testRunner) |
| 10 testRunner.dumpAsText(); |
| 11 |
| 12 shouldBeTrue("internals.isPreloaded('resources/preload-test.jpg?0');"); |
| 13 shouldBeTrue("internals.isPreloaded('resources/image2.png');"); |
| 14 loadFromSource(1); |
| 15 loadFromSource(2); |
| 16 loadFromImg(3); |
| 17 loadFromSource(4); |
| 18 loadFromImg(5); |
| 19 loadFromSource(6); |
| 20 loadFromSource(7); |
| 21 shouldBeFalse("internals.isPreloaded('resources/preload-test.jpg?71');"); |
| 22 shouldBeTrue("internals.isPreloaded('resources/preload-test.jpg?72');"); |
| 23 shouldBeTrue("internals.isPreloaded('resources/preload-test.jpg?8');"); |
| 24 </script> |
| 25 <!-- Control group --> |
| 26 <img src="resources/preload-test.jpg?0"> |
| 27 <picture> |
| 28 <source srcset="resources/image2.png"> |
| 29 <img></picture> |
| 30 <!-- nested element tests - In these we're doing the right thing --> |
| 31 <picture> |
| 32 <picture> |
| 33 <source sizes="400px" srcset="resources/base-image1.png?1 200w, resource
s/base-image3.png?1 400w, resources/base-image2.png?1 800w"> |
| 34 <img src="resources/preload-test.jpg?1"> |
| 35 </picture> |
| 36 </picture> |
| 37 <picture> |
| 38 <div> |
| 39 <picture> |
| 40 <source sizes="400px" srcset="resources/base-image1.png?2 200w, reso
urces/base-image3.png?2 400w, resources/base-image2.png?2 800w"> |
| 41 <img src="resources/preload-test.jpg?2"> |
| 42 </picture> |
| 43 </div> |
| 44 </picture> |
| 45 <picture> |
| 46 <source sizes="400px" srcset="resources/base-image1.png?3 200w, resources/ba
se-image3.png?3 400w, resources/base-image2.png?3 800w"> |
| 47 <div> |
| 48 <picture> |
| 49 <source sizes="400px" srcset="resources/base-image1.png?4 200w, reso
urces/base-image3.png?4 400w, resources/base-image2.png?4 800w"> |
| 50 <!-- We're getting this one right --> |
| 51 <img src="resources/preload-test.jpg?4"> |
| 52 </picture> |
| 53 </div> |
| 54 <!-- This one we're getting wrong --> |
| 55 <img src="resources/preload-test.jpg?3"> |
| 56 </picture> |
| 57 <picture> |
| 58 <source sizes="400px" srcset="resources/base-image1.png?5 200w, resources/ba
se-image3.png?5 400w, resources/base-image2.png?5 800w"> |
| 59 <div /> |
| 60 <picture> |
| 61 <source sizes="400px" srcset="resources/base-image1.png?6 200w, reso
urces/base-image3.png?6 400w, resources/base-image2.png?6 800w"> |
| 62 <!-- We're getting this one right --> |
| 63 <img src="resources/preload-test.jpg?6"> |
| 64 </picture> |
| 65 </div> |
| 66 <!-- This one we're getting wrong --> |
| 67 <img src="resources/preload-test.jpg?5"> |
| 68 </picture> |
| 69 <picture> |
| 70 <picture> |
| 71 <source sizes="400px" srcset="resources/base-image1.png?7 200w, resource
s/base-image3.png?7 400w, resources/base-image2.png?7 800w"> |
| 72 <!-- We're getting these two right --> |
| 73 <img src="resources/preload-test.jpg?7"> |
| 74 <img src="resources/preload-test.jpg?71"> |
| 75 </picture> |
| 76 <img src="resources/preload-test.jpg?72"> |
| 77 </picture> |
| 78 <picture> |
| 79 <img src="resources/preload-test.jpg?8"> |
| 80 </picture> |
| 81 </body> |
| 82 </html> |
| 83 |
OLD | NEW |