summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_032.htm
blob: abc0370c2ebc303a5c80a4694587fca30bbce1df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html>
<html>
<head><title>XMLHttpRequest</title>
</head>
<body>
    <script type="text/javascript">
    
        try
        {
            xhrRequest = new XMLHttpRequest();
        
            xhrRequest.onreadystatechange = function () {
                if (xhrRequest.readyState == 4 && xhrRequest.status == 200) {
                    //xhr successful
                    parent.window.postMessage("access to window.XMLHttpRequest", "*");
                }
            }
            
            xhrRequest.open("GET", "standalone-pass.htm", true);
            xhrRequest.send();
        
        }catch(e){}

        parent.window.postMessage("no access to window.XMLHttpRequest", "*");
    </script>
</body>
</html>