Index: LayoutTests/screen_orientation/lockOrientation-basic.html |
diff --git a/LayoutTests/screen_orientation/lockOrientation-basic.html b/LayoutTests/screen_orientation/lockOrientation-basic.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c54226dccc79f78ac099b7bb625cba2ac86e4dc3 |
--- /dev/null |
+++ b/LayoutTests/screen_orientation/lockOrientation-basic.html |
@@ -0,0 +1,16 @@ |
+<!DOCTYPE html> |
+<html> |
+<body> |
+<script src="../resources/js-test.js"></script> |
+<script> |
+description("Basic screen.lockOrientation() / screen.unlockOrientation() testing"); |
+ |
+shouldBeEqualToString("screen.orientation", "portrait-primary"); |
+shouldNotThrow("screen.unlockOrientation()"); |
+shouldBeTrue("screen.lockOrientation('landscape-primary')"); |
+shouldBeEqualToString("screen.orientation", "portrait-primary"); // Should update asynchronously. |
+shouldBeTrue("screen.lockOrientation('landscape-secondary')"); // Consecutive locking. |
+shouldNotThrow("screen.unlockOrientation()"); |
+</script> |
+</body> |
+</html> |