| 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';
|
| }
|
|
|
|
|