| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <body> | |
| 4 <script src='../resources/testharness.js'></script> | |
| 5 <script src='../resources/testharnessreport.js'></script> | |
| 6 | |
| 7 <iframe sandbox='allow-scripts allow-same-origin allow-presentation'></iframe> | |
| 8 | |
| 9 <script> | |
| 10 | |
| 11 async_test(function(t) { | |
| 12 window.onmessage = t.step_func_done(function(e) { | |
| 13 e.data.forEach(function(result) { | |
| 14 if (result.test == 'getAvailability') { | |
| 15 assert_equals(result.status, 'success', result.test); | |
| 16 return; | |
| 17 } | |
| 18 | |
| 19 // TODO(mlamouri): we are only testing that it doesn't fail for security | |
| 20 // reasons because the request will still fail for lack of devices/backend
. | |
| 21 assert_equals(result.status, 'failure', result.test); | |
| 22 assert_not_equals(result.name, 'SecurityError', result.test); | |
| 23 }); | |
| 24 }); | |
| 25 | |
| 26 document.querySelector('iframe').src = 'resources/embedded-smoke-tests.html'; | |
| 27 }, 'Test that calling Presentation API works from inside a sandboxed iframe with
"allow-presentation".'); | |
| 28 | |
| 29 </script> | |
| 30 </body> | |
| 31 </html> | |
| OLD | NEW |