Mavericks results with MountainLion variants.
[WebKit-https.git] / LayoutTests / http / tests / security / shape-inside-image-origin.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/js-test-pre.js"></script>
5 <style>
6     #shape {
7         -webkit-shape-inside: rectangle(0, 0, 0, 0);
8         -webkit-shape-outside: rectangle(0, 0, 0, 0);
9     }
10 </style>
11 </head>
12 <body>
13   <p>Verify that shape-inside and shape-outside can not be set to a URL with a different origin
14   and that the result of doing so sets the property to "none". This test should generate two error
15   messages about unsafe attempts to load a URL.</p>
16   <p id="console"></p>
17
18   <div id="shape"></div>
19
20 <script>
21   var shapeElement = document.getElementById("shape");
22   shouldBeEqualToString('window.getComputedStyle(shapeElement).webkitShapeInside', "rectangle(0px, 0px, 0px, 0px, 0px, 0px)");
23   shouldBeEqualToString('window.getComputedStyle(shapeElement).webkitShapeOutside', "rectangle(0px, 0px, 0px, 0px, 0px, 0px)");
24
25   // The image URL's port does not match this document's origin. We expect a pair of console warnings.
26   shapeElement.style.webkitShapeInside = 'url("http://localhost:8080/security/resources/square100.png")';
27   shapeElement.style.webkitShapeOutside = 'url("http://localhost:8080/security/resources/square100.png")';
28
29   shouldBeEqualToString('window.getComputedStyle(shapeElement).webkitShapeInside', "none");
30   shouldBeEqualToString('window.getComputedStyle(shapeElement).webkitShapeOutside', "none");
31 </script>
32 <script src="../../resources/js-test-post.js"></script>
33 </body>
34 </html>