Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: LayoutTests/screen_orientation/resources/sandboxed-iframe-locking.html

Issue 283423005: Use Promises for screen.lockOrientation(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: cdumez comments Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <script> 1 <script>
jochen (gone - plz use gerrit) 2014/05/22 08:34:35 please add <!DOCTYPE html>
mlamouri (slow - plz ping) 2014/05/22 08:58:56 Done.
2 var exceptionName = ""; 2 var msg = "";
3 try { 3 screen.lockOrientation("portrait-primary").then(function() {
4 screen.lockOrientation("portrait-primary"); 4 }, function(error) {
5 } catch (ex) { 5 msg = error.name;
6 exceptionName = ex.name; 6 });
7 } 7
8 parent.window.postMessage(exceptionName, "*"); 8 // FIXME: for the moment, tests gets notified when there is a failure but
9 // not a success, this hack should allow us to still have the test running.
10 // That should be removed as soon as we get a resolved promise in tests.
11 setTimeout(function() {
12 parent.window.postMessage(msg, "*");
13 })
9 </script> 14 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698