1 <p>This test checks for rdar://problem/
4962298 REGRESSION: Synchronous XHR for missing local file throws exception -- breaks Wikipedia widget
</p>
4 <pre id=
"console"></pre>
9 document
.getElementById("console").appendChild(document
.createTextNode(s
+ "\n"));
12 function logProperty(object
, propertyName
)
16 property
= object
[propertyName
];
20 log(propertyName
+ ": " + property
+ " (" + typeof property
+ ")");
23 function sendRequest()
25 var request
= new XMLHttpRequest();
26 request
.open("GET", "file:///iamthewalrus", false);
31 if (window
.testRunner
)
32 testRunner
.dumpAsText();
35 var request
= sendRequest();
41 /* "status", -- excluded because it differs on tiger and leopard */
45 log("PASS: No exception.");
46 for (var i
= 0; i
< properties
.length
; i
++) //>
47 logProperty(request
, properties
[i
]);
49 log("FAIL: Caught exception " + e
+ ".");