Index: LayoutTests/wake_lock/wakelock-api.html |
diff --git a/LayoutTests/wake_lock/wakelock-api.html b/LayoutTests/wake_lock/wakelock-api.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..babf327e445fd5747cd32e109cb1a7a1280acb9d |
--- /dev/null |
+++ b/LayoutTests/wake_lock/wakelock-api.html |
@@ -0,0 +1,23 @@ |
+<!DOCTYPE html> |
+<html> |
+<body> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<script> |
+ |
+test(function() { |
+ assert_idl_attribute(screen, 'keepAwake'); |
+ assert_equals(typeof screen.keepAwake, 'boolean'); |
+}, 'Test that the WakeLock API is present.'); |
+ |
+test(function() { |
+ screen.keepAwake = true; |
+ assert_true(screen.keepAwake); |
+ |
+ screen.keepAwake = false; |
+ assert_false(screen.keepAwake); |
+}, 'Test that screen.keepAwake preserves set value'); |
+ |
+</script> |
+</body> |
+</html> |