Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / images / image-with-origin-header.html
bloba497e261cd23af026b0826d3ac204e27d07093f8
1 <!DOCTYPE html>
2 <body>
3 <script src="/js-test-resources/js-test.js"></script>
4 <script>
5 description("Tests that the order of setting the src of an image element and its crossOrigin attribute doesn't matter");
6 jsTestIsAsync = true;
8 var img = new Image();
9 img.src="http://127.0.0.1:8000/resources/origin.php?1";
10 img.crossOrigin = "anonymous";
11 var img2 = new Image();
12 img2.crossOrigin = "anonymous";
13 img2.src="http://127.0.0.1:8000/resources/origin.php?2";
15 var srcFirstHasOrigin = false;
16 var srcLastHasOrigin = false;
17 document.body.onload = function() {
18 srcFirstHasOrigin = (img.width == 100)
19 shouldBeTrue('srcFirstHasOrigin');
20 srcLastHasOrigin = (img2.width == 100)
21 shouldBeTrue('srcLastHasOrigin');
22 finishJSTest();
25 </script>
26 </body>
27 </html>