OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <style> | 3 <style> |
4 iframe { width: 400px; height: 200px;} | 4 iframe { width: 400px; height: 300px;} |
5 </style> | 5 </style> |
6 <script src="/resources/testharness.js"></script> | 6 <script src="/resources/testharness.js"></script> |
7 <script src="/resources/testharnessreport.js"></script> | 7 <script src="/resources/testharnessreport.js"></script> |
8 <script> | 8 <script> |
9 setup({explicit_timeout: true}); | 9 setup({explicit_timeout: true}); |
10 | 10 |
11 async_test(function(t) { | 11 async_test(function(t) { |
12 window.addEventListener("message", t.step_func_done(function(e) { | 12 window.addEventListener("message", t.step_func_done(function(e) { |
13 assert_equals(e.data, "BLOCKED", "The message should say 'BLOCKED'."
); | 13 assert_equals(e.data, "BLOCKED", "The message should say 'BLOCKED'."
); |
14 })); | 14 })); |
15 }, "The sandboxed iframe should post a message saying the top navigation w
as blocked when no user gesture."); | 15 }, "The sandboxed iframe should post a message saying the top navigation w
as blocked when no user gesture."); |
16 </script> | 16 </script> |
17 </head> | 17 </head> |
18 <body> | 18 <body> |
19 <p>This tests that an iframe in sandbox with 'allow-top-navigation-by-user-a
ctivation' | 19 <p>This tests that an iframe in sandbox with 'allow-top-navigation-by-user-a
ctivation' |
20 can navigate the top level page, if it is trigged by a user gesture.</p> | 20 can navigate the top level page, if it is trigged by a user gesture.</p> |
21 <p>Click on the button in the iframe and it should navigate the top page.</p
> | 21 <p>Click on the button in the iframe and it should navigate the top page.</p
> |
22 <iframe id="i" sandbox="allow-scripts allow-top-navigation-by-user-activatio
n" src="support/iframe-that-performs-top-navigation.html"></iframe> | 22 <iframe id="i" sandbox="allow-scripts allow-top-navigation-by-user-activatio
n" src="support/iframe-that-performs-top-navigation.html"></iframe> |
23 </body> | 23 </body> |
24 </html> | 24 </html> |
OLD | NEW |