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

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

Issue 374623002: [screen-orientation] Update implementation to match recent spec changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 5 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
index 9a48a806fc6fbe10c7c1eb63018bde719e2204ec..5ae52de880e70be3c49c2a3109045ccd997e9a0c 100644
--- a/LayoutTests/screen_orientation/lockOrientation-basic.html
+++ b/LayoutTests/screen_orientation/lockOrientation-basic.html
@@ -10,19 +10,19 @@ var previousOrientation = screen.orientation;
test(function() {
var caught = false;
try {
- screen.unlockOrientation();
+ screen.orientation.unlock();
} catch (e) {
caught = true;
}
assert_false(caught);
-}, "Test that unlockOrientation() doesn't throw when there is no lock");
+}, "Test that screen.orientation.unlock() doesn't throw when there is no lock");
test(function() {
[ 'any', 'portrait', 'landscape', 'portrait-primary', 'portrait-secondary',
'landscape-primary', 'landscape-secondary' ].forEach(function(orientation) {
var pending = true;
- screen.lockOrientation(orientation).then(function() {
+ screen.orientation.lock(orientation).then(function() {
pending = false;
}, function() {
pending = false;
@@ -30,22 +30,22 @@ test(function() {
assert_true(pending);
});
-}, "Test that screen.lockOrientation returns a pending promise.");
+}, "Test that screen.orientation.lock returns a pending promise.");
test(function() {
assert_equals(screen.orientation, previousOrientation);
-}, "Test that screen.lockOrientation() is actually async");
+}, "Test that screen.orientation.lock() is actually async");
test(function() {
var caught = false;
try {
- screen.unlockOrientation();
+ screen.orientation.unlock();
} catch (e) {
caught = true;
}
assert_false(caught);
-}, "Test that unlockOrientation doesn't throw when there is a lock");
+}, "Test that screen.unlock() doesn't throw when there is a lock");
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698