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.)

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

mercurial