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

Unified Diff: LayoutTests/screen_orientation/screenorientation-unsupported-no-crash.html

Issue 943483003: Gracefully handle screen.orientation access over unsupported frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switch to testharness.js 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 | Source/modules/screen_orientation/ScreenOrientation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/screen_orientation/screenorientation-unsupported-no-crash.html
diff --git a/LayoutTests/screen_orientation/screenorientation-unsupported-no-crash.html b/LayoutTests/screen_orientation/screenorientation-unsupported-no-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..a806543e3a19353f2c43f1adaf6708e6b89bfeb8
--- /dev/null
+++ b/LayoutTests/screen_orientation/screenorientation-unsupported-no-crash.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="../fast/forms/resources/picker-common.js"></script>
+<input type=date id=date>
+<script>
+test(function() {
+ function popupCallback() {
+ // To handle platforms (Mac) that doesn't support testing popup menu windows,
+ // phrase the check so that openPicker()'s errorCallback produces the same
+ // expected output when invoked.
+ var popupWindowScreenOrientation = popupWindow ? popupWindow.screen.orientation : null;
+ assert_equals(popupWindowScreenOrientation, null);
+ }
+ openPicker(document.getElementById('date'), popupCallback, popupCallback);
+}, "Verify that accessing screen.orientation where unsupported doesn't crash.");
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | Source/modules/screen_orientation/ScreenOrientation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698