Index: LayoutTests/http/tests/loading/resources/picture-preload-helper.js |
diff --git a/LayoutTests/http/tests/loading/resources/picture-preload-helper.js b/LayoutTests/http/tests/loading/resources/picture-preload-helper.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..11e41dbd8cc1caf4b10a9945f699359483d8e159 |
--- /dev/null |
+++ b/LayoutTests/http/tests/loading/resources/picture-preload-helper.js |
@@ -0,0 +1,20 @@ |
+function loadFromSource(i) { |
+ shouldBeFalse("internals.isPreloaded('resources/preload-test.jpg?" + i + "');"); |
+ shouldBeFalse("internals.isPreloaded('resources/base-image1.png?" + i + "');"); |
+ shouldBeFalse("internals.isPreloaded('resources/base-image2.png?" + i + "');"); |
+ shouldBeTrue("internals.isPreloaded('resources/base-image3.png?" + i + "');"); |
+} |
+ |
+function loadFromSource2x(i) { |
+ shouldBeFalse("internals.isPreloaded('resources/preload-test.jpg?" + i + "');"); |
+ shouldBeFalse("internals.isPreloaded('resources/base-image1.png?" + i + "');"); |
+ shouldBeTrue("internals.isPreloaded('resources/base-image2.png?" + i + "');"); |
+ shouldBeFalse("internals.isPreloaded('resources/base-image3.png?" + i + "');"); |
+} |
+ |
+function loadFromImg(i) { |
+ shouldBeTrue("internals.isPreloaded('resources/preload-test.jpg?" + i + "');"); |
+ shouldBeFalse("internals.isPreloaded('resources/base-image1.png?" + i + "');"); |
+ shouldBeFalse("internals.isPreloaded('resources/base-image2.png?" + i + "');"); |
+ shouldBeFalse("internals.isPreloaded('resources/base-image3.png?" + i + "');"); |
+} |