1<html>
2<head>
3<link rel="stylesheet"
4 href="resources/redir.php?url=http://localhost:8000/security/resources/xorigincss1.html"></link>
5<link rel="stylesheet"
6 type="text/css"
7 href="resources/redir.php?url=http://localhost:8000/security/resources/xorigincss2.html"></link>
8<link rel="stylesheet"
9 href="resources/redir.php?url=http://localhost:8000/security/resources/xorigincss1.css"></link>
10<link rel="stylesheet"
11 href="resources/xorigincss3.html"></link>
12<script>
13if (window.layoutTestController) {
14 layoutTestController.waitUntilDone();
15 layoutTestController.dumpAsText();
16}
17
18window.onload = function() {
19 ele = document.getElementById("id1");
20 ele.innerText = "LINK Cross-origin, HTML, valid: " + window.getComputedStyle(ele, null).getPropertyValue('background-color');
21 ele = document.getElementById("id2");
22 ele.innerText = "LINK + IMPORT Cross-origin, HTML, invalid: " + window.getComputedStyle(ele, null).getPropertyValue('background-color');
23 ele = document.getElementById("id3");
24 ele.innerText = "LINK Cross-origin, CSS, invalid: " + window.getComputedStyle(ele, null).getPropertyValue('background-color');
25 ele = document.getElementById("id4");
26 ele.innerText = "LINK Same-origin, HTML, invalid: " + window.getComputedStyle(ele, null).getPropertyValue('background-color');
27 ele = document.getElementById("id5");
28 ele.innerText = "IMPORT Cross-origin, HTML, valid: " + window.getComputedStyle(ele, null).getPropertyValue('background-color');
29 ele = document.getElementById("id6");
30 ele.innerText = "IMPORT Cross-origin, CSS, invalid: " + window.getComputedStyle(ele, null).getPropertyValue('background-color');
31 ele = document.getElementById("id7");
32 ele.innerText = "IMPORT Same-origin, HTML, invalid: " + window.getComputedStyle(ele, null).getPropertyValue('background-color');
33
34 if (window.layoutTestController)
35 layoutTestController.notifyDone();
36}
37</script>
38<style>
39/* Deliberately reuse the same file / class / id on this first one */
40@import "resources/redir.php?url=http://localhost:8000/security/resources/xorigincss2.html";
41@import "resources/redir.php?url=http://localhost:8000/security/resources/xorigincss4.html";
42@import "resources/redir.php?url=http://localhost:8000/security/resources/xorigincss2.css";
43@import "resources/xorigincss5.html";
44</style>
45</head>
46<body><div id="id1" class="id1"></div><div id="id2" class="id2"></div><div id="id3" class="id3"></div><div id="id4" class="id4"></div><div id="id5" class="id5"></div><div id="id6" class="id6"></div><div id="id7" class="id7"></div></body>
47</html>