content/base/test/file_bug622088_inner.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 <!DOCTYPE HTML>
     2 <html>
     3 <head>
     4 <script>
     5 function load() {
     6   (window.opener || window.parent).innerLoaded(window);
     7 }
     9 function doXHR(req) {
    10   // Do a sync XHR and return the XHR's referrer.
    11   if (!req) {
    12     req = new XMLHttpRequest();
    13   }
    15   // file_bug622088.sjs echos its referrer back to us.  We need to refer to it
    16   // using an absolute URI because we sometimes pass in |req| from a window
    17   // which has a data: URI.  In that case, a relative path would not get
    18   // resolved properly!
    19   //
    20   // Resolve our relative URI to an absolute one by creating an anchor element
    21   // and reading its href property.
    22   var anchor = document.createElement('a');
    23   anchor.href = 'file_bug622088.sjs';
    25   dump('anchor.href=' + anchor.href + '\n');
    27   req.open('GET', anchor.href, false);
    28   req.send(null);
    29   return req.responseText;
    30 }
    31 </script>
    32 </head>
    34 <body onload='load()'>
    35 <!--Inner frame target for test_bug622088_2.html. -->
    36 </body>
    38 </html>

mercurial