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

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: review commenst 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 <!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>
OLDNEW
« no previous file with comments | « LayoutTests/screen_orientation/lockOrientation-basic-expected.txt ('k') | Source/modules/modules.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698