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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/screen_orientation/screen_orientation_use_after_detach.html
diff --git a/content/test/data/screen_orientation/screen_orientation_use_after_detach.html b/content/test/data/screen_orientation/screen_orientation_use_after_detach.html
index 7618f2bc60071886a648ce322752185cb0f667da..2d367d90de9081cf5eacfa9e66f95571b6a9bfbf 100644
--- a/content/test/data/screen_orientation/screen_orientation_use_after_detach.html
+++ b/content/test/data/screen_orientation/screen_orientation_use_after_detach.html
@@ -8,10 +8,16 @@ window.iframeLoaded = function() {
var iframe = document.getElementsByTagName('iframe')[0];
var oldScreen = iframe.contentWindow.screen;
+ var oldOrient = oldScreen.orientation;
iframe.remove();
- oldScreen.orientation.unlock();
+ // The screen.orientation object will not be exposed once the
+ // screen has become detached, but probe for it regardless to
+ // verify that such post-detach use doesn't crash.
+ oldOrient = oldScreen.orientation || oldOrient;
+
+ oldOrient.unlock();
document.location.hash = '#done';
}
« 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