<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html lang="en">
 <head>
  <title>multiple open()s (simple version)</title>
 </head>
 <body>
  <p>FAIL: Script did not run.</p>
  <script type="text/javascript">
   if (window.testRunner)
     testRunner.dumpAsText();

   var p = document.getElementsByTagName('p')[0];
   p.firstChild.data = 'FAIL: Test did not complete.';
   //if (window.ActiveXObject) // hack to let IE work
   //  window.XMLHttpRequest = function () { return new ActiveXObject("Microsoft.XMLHTTP"); }
   var r = new XMLHttpRequest();
   r.open('GET', '002-simple-a.txt', false); // "A"
   r.send();
   r.open('GET', '002-simple-b.txt', false); // "B"
   r.send();
   if (r.responseText == 'B') {
       p.firstChild.data = 'PASS';
   } else {
       p.firstChild.data = 'FAIL: responseText contains "' + r.responseText + '".';
   }
  </script>
 </body>
</html>
