Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <script type="application/javascript"> |
michael@0 | 5 | function setup() { |
michael@0 | 6 | // Set up different target objects for expandos, one for each binding type. |
michael@0 | 7 | window.targetWN = window; |
michael@0 | 8 | window.targetDOM = new XMLHttpRequest(); |
michael@0 | 9 | window.targetJS = new Date(); |
michael@0 | 10 | } |
michael@0 | 11 | |
michael@0 | 12 | function placeExpando(name, val, target) { |
michael@0 | 13 | target[name] = val; |
michael@0 | 14 | } |
michael@0 | 15 | |
michael@0 | 16 | // If val === null, then we shouldn't have access. |
michael@0 | 17 | function checkExpando(name, val, target, msg) { |
michael@0 | 18 | if (val !== null) { |
michael@0 | 19 | ok(name in target, msg); |
michael@0 | 20 | try { |
michael@0 | 21 | is(target[name], val, "Got the right expando value"); |
michael@0 | 22 | } catch(e) { ok(false, "Threw when accessing same-origin expando"); } |
michael@0 | 23 | } |
michael@0 | 24 | else { |
michael@0 | 25 | ok(!(name in target), msg); |
michael@0 | 26 | } |
michael@0 | 27 | } |
michael@0 | 28 | |
michael@0 | 29 | </script> |
michael@0 | 30 | </head> |
michael@0 | 31 | <body onload="setup();"> |
michael@0 | 32 | <span>Salut, Ma Cherise. ;-)</span> |
michael@0 | 33 | </body> |
michael@0 | 34 | </html> |