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

Side by Side Diff: content/test/data/screen_orientation/screen_orientation_use_after_detach.html

Issue 909043002: Adjust ScreenOrientation unit test to handle changed detachment timing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <script> 4 <script>
5 5
6 window.iframeLoaded = function() { 6 window.iframeLoaded = function() {
7 document.location.hash = '#ready'; 7 document.location.hash = '#ready';
8 8
9 var iframe = document.getElementsByTagName('iframe')[0]; 9 var iframe = document.getElementsByTagName('iframe')[0];
10 var oldScreen = iframe.contentWindow.screen; 10 var oldScreen = iframe.contentWindow.screen;
11 var oldOrient = oldScreen.orientation;
11 12
12 iframe.remove(); 13 iframe.remove();
13 14
14 oldScreen.orientation.unlock(); 15 // The screen.orientation object will not be exposed once the
16 // screen has become detached, but probe for it regardless to
17 // verify that such post-detach use doesn't crash.
18 oldOrient = oldScreen.orientation || oldOrient;
19
20 oldOrient.unlock();
15 document.location.hash = '#done'; 21 document.location.hash = '#done';
16 } 22 }
17 23
18 </script> 24 </script>
19 <iframe src='detached-iframe.html'></iframe> 25 <iframe src='detached-iframe.html'></iframe>
20 </body> 26 </body>
21 </html> 27 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698