OLD | NEW |
| 1 <!DOCTYPE html> |
| 2 <html> |
1 <script> | 3 <script> |
2 var exceptionName = ""; | 4 var msg = ""; |
3 try { | 5 screen.lockOrientation("portrait-primary").then(function() { |
4 screen.lockOrientation("portrait-primary"); | 6 }, function(error) { |
5 } catch (ex) { | 7 msg = error.name; |
6 exceptionName = ex.name; | 8 }); |
7 } | 9 |
8 parent.window.postMessage(exceptionName, "*"); | 10 // FIXME: for the moment, tests gets notified when there is a failure but |
| 11 // not a success, this hack should allow us to still have the test running. |
| 12 // That should be removed as soon as we get a resolved promise in tests. |
| 13 setTimeout(function() { |
| 14 parent.window.postMessage(msg, "*"); |
| 15 }) |
9 </script> | 16 </script> |
| 17 </html> |
OLD | NEW |