4 <script src=
"../resources/testharness.js"></script>
5 <script src=
"../resources/testharnessreport.js"></script>
8 var previousOrientation
= screen
.orientation
;
13 screen
.orientation
.unlock();
19 }, "Test that screen.orientation.unlock() doesn't throw when there is no lock");
22 [ 'any', 'portrait', 'landscape', 'portrait-primary', 'portrait-secondary',
23 'landscape-primary', 'landscape-secondary' ].forEach(function(orientation
) {
25 screen
.orientation
.lock(orientation
).then(function() {
33 }, "Test that screen.orientation.lock returns a pending promise.");
36 assert_equals(screen
.orientation
, previousOrientation
);
37 }, "Test that screen.orientation.lock() is actually async");
42 screen
.orientation
.unlock();
48 }, "Test that screen.unlock() doesn't throw when there is a lock");