Blame dom/base/test/test_bug484396.html

Packit f0b94e
Packit f0b94e
<html>
Packit f0b94e
Packit f0b94e
https://bugzilla.mozilla.org/show_bug.cgi?id=484396
Packit f0b94e
-->
Packit f0b94e
<head>
Packit f0b94e
  <title>Test for Bug 484396</title>
Packit f0b94e
  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
Packit f0b94e
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
Packit f0b94e
</head>
Packit f0b94e
<body>
Packit f0b94e
Mozilla Bug 484396
Packit f0b94e

Packit f0b94e
Packit f0b94e
  
Packit f0b94e
Packit f0b94e
Packit f0b94e
<script type="application/javascript">
Packit f0b94e
SimpleTest.waitForExplicitFinish();
Packit f0b94e
Packit f0b94e
var msg = 'xhr.open() succeeds with empty url';
Packit f0b94e
var xhr = new XMLHttpRequest();
Packit f0b94e
Packit f0b94e
try {
Packit f0b94e
  xhr.open('GET', '');
Packit f0b94e
  ok(true, msg);
Packit f0b94e
} catch (e) {
Packit f0b94e
  ok(false, msg);
Packit f0b94e
}
Packit f0b94e
Packit f0b94e
xhr.onerror = function () {
Packit f0b94e
  ok(false, 'xhr.send() succeeds with empty url');
Packit f0b94e
}
Packit f0b94e
Packit f0b94e
xhr.onreadystatechange = function () {
Packit f0b94e
  if (4 == xhr.readyState) {
Packit f0b94e
    is(xhr.status, 200, 'xhr.status is 200 OK');
Packit f0b94e
    ok(-1 < xhr.responseText.indexOf('Bug 484396'), 'xhr.responseText contains the calling page');
Packit f0b94e
    
Packit f0b94e
    SimpleTest.finish();
Packit f0b94e
  }
Packit f0b94e
};
Packit f0b94e
Packit f0b94e
xhr.send('');
Packit f0b94e
</script>
Packit f0b94e
Packit f0b94e
</body>
Packit f0b94e
</html>