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

Unified Diff: LayoutTests/wake_lock/wakelock-api.html

Issue 1084923002: Wake Lock API implementation (Blink part) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « LayoutTests/wake_lock/resources/subframe.html ('k') | LayoutTests/wake_lock/wakelock-in-nested-frame.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « LayoutTests/wake_lock/resources/subframe.html ('k') | LayoutTests/wake_lock/wakelock-in-nested-frame.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698