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

Unified Diff: LayoutTests/screen_orientation/lockOrientation-basic.html

Issue 171683015: Screen Orientation API: Add support for lockOrientation() / unlockOrientation() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 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
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>

Powered by Google App Engine
This is Rietveld 408576698