OLD | NEW |
1 <script> | 1 <script> |
2 if (window.testRunner) | 2 if (window.testRunner) |
3 testRunner.dumpAsText(); | 3 testRunner.dumpAsText(); |
4 </script> | 4 </script> |
5 <iframe sandbox="allow-scripts" | 5 <iframe sandbox="allow-scripts" |
6 src="data:text/html,<script> | 6 src="data:text/html,<script> |
7 try { | 7 try { |
8 top.navigator; | 8 top.navigator; |
9 alert('FAIL'); | 9 console.log('FAIL'); |
10 } catch(e) { | 10 } catch(e) { |
11 alert(e); | 11 console.log(e); |
12 } | 12 } |
13 this.x = 7; | 13 this.x = 7; |
14 window.name='navigator'; | 14 window.name='navigator'; |
15 alert(top.navigator === this ? 'PASS' : 'FAIL'); | 15 console.log(top.navigator === this ? 'PASS' : 'FAIL'); |
16 alert(top.navigator.x === 7 ? 'PASS' : 'FAIL'); | 16 console.log(top.navigator.x === 7 ? 'PASS' : 'FAIL'); |
17 </script>"></iframe> | 17 </script>"></iframe> |
18 <iframe sandbox="allow-scripts" | 18 <iframe sandbox="allow-scripts" |
19 src="data:text/html,<script> | 19 src="data:text/html,<script> |
20 alert(top.navigator !== this ? 'PASS' : 'FAIL'); | 20 console.log(top.navigator !== this ? 'PASS' : 'FAIL'); |
21 try { | 21 try { |
22 top.navigator.x; | 22 top.navigator.x; |
23 alert('FAIL'); | 23 console.log('FAIL'); |
24 } catch(e) { | 24 } catch(e) { |
25 alert(e); | 25 console.log(e); |
26 } | 26 } |
27 </script>"></iframe> | 27 </script>"></iframe> |
OLD | NEW |