Index: LayoutTests/screen_orientation/resources/sandboxed-iframe-locking.html |
diff --git a/LayoutTests/screen_orientation/resources/sandboxed-iframe-locking.html b/LayoutTests/screen_orientation/resources/sandboxed-iframe-locking.html |
index cc931a49fb8f982d2799fc4e92b20161486be216..8b81f64b91202f68bf917c5b1cf46f2d7a697154 100644 |
--- a/LayoutTests/screen_orientation/resources/sandboxed-iframe-locking.html |
+++ b/LayoutTests/screen_orientation/resources/sandboxed-iframe-locking.html |
@@ -1,9 +1,17 @@ |
+<!DOCTYPE html> |
+<html> |
<script> |
- var exceptionName = ""; |
- try { |
- screen.lockOrientation("portrait-primary"); |
- } catch (ex) { |
- exceptionName = ex.name; |
- } |
- parent.window.postMessage(exceptionName, "*"); |
+ var msg = ""; |
+ screen.lockOrientation("portrait-primary").then(function() { |
+ }, function(error) { |
+ msg = error.name; |
+ }); |
+ |
+ // FIXME: for the moment, tests gets notified when there is a failure but |
+ // not a success, this hack should allow us to still have the test running. |
+ // That should be removed as soon as we get a resolved promise in tests. |
+ setTimeout(function() { |
+ parent.window.postMessage(msg, "*"); |
+ }) |
</script> |
+</html> |