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 | <meta charset="UTF-8"> |
michael@0 | 5 | <title>Test for Bug 823283</title> |
michael@0 | 6 | <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 7 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
michael@0 | 8 | </head> |
michael@0 | 9 | <body> |
michael@0 | 10 | <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=823283">Mozilla Bug 823283</a> |
michael@0 | 11 | <p id="display"></p> |
michael@0 | 12 | <div id="content" style="display: none"></div> |
michael@0 | 13 | <pre id="test"> |
michael@0 | 14 | <script type="application/javascript"> |
michael@0 | 15 | /** Test for Bug 823283 **/ |
michael@0 | 16 | |
michael@0 | 17 | function createTest(prop, typeStr, valCode) |
michael@0 | 18 | { |
michael@0 | 19 | var code = |
michael@0 | 20 | 'is(typeof ' + prop + ', "' + typeStr + '", "' + prop + ': bad unqualified before-state");\n' + |
michael@0 | 21 | 'is(typeof window.' + prop + ', "' + typeStr + '", "' + prop + ': bad qualified before-state");\n' + |
michael@0 | 22 | '\n' + |
michael@0 | 23 | prop + ' = ' + valCode + ';\n' + |
michael@0 | 24 | '\n' + |
michael@0 | 25 | 'is(typeof ' + prop + ', "' + typeStr + '", "' + prop + ': bad unqualified after-state");\n' + |
michael@0 | 26 | 'is(typeof window.' + prop + ', "' + typeStr + '", "' + prop + ': bad qualified after-state");'; |
michael@0 | 27 | |
michael@0 | 28 | return Function(code); |
michael@0 | 29 | } |
michael@0 | 30 | |
michael@0 | 31 | [ |
michael@0 | 32 | ["innerHeight", "number", '"123"'], |
michael@0 | 33 | ["innerWidth", "number", '"456"'], |
michael@0 | 34 | ["outerHeight", "number", '"654"'], |
michael@0 | 35 | ["outerWidth", "number", '"321"'], |
michael@0 | 36 | ["screenX", "number", '"17"'], |
michael@0 | 37 | ["screenY", "number", '"42"'], |
michael@0 | 38 | ["status", "string", '{}'], |
michael@0 | 39 | ["name", "string", '{}'], |
michael@0 | 40 | ].forEach(function(args) |
michael@0 | 41 | { |
michael@0 | 42 | createTest.apply(null, args)(); |
michael@0 | 43 | }); |
michael@0 | 44 | |
michael@0 | 45 | </script> |
michael@0 | 46 | </pre> |
michael@0 | 47 | </body> |
michael@0 | 48 | </html> |