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

Unified Diff: LayoutTests/wake_lock/resources/subframe.html

Issue 1084923002: Wake Lock API implementation (Blink part) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Applied review comments Created 5 years, 7 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/wake_lock/resources/subframe.html
diff --git a/LayoutTests/wake_lock/resources/subframe.html b/LayoutTests/wake_lock/resources/subframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..e5d714f0a8fe46a440f76a582d1e1869ccf58858
--- /dev/null
+++ b/LayoutTests/wake_lock/resources/subframe.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head/>
+<body>
+<script>
+window.addEventListener('message', function(e) {
+ if(e.data.tag === 'getKeepScreenAwake') {
mlamouri (slow - plz ping) 2015/05/05 13:45:43 nit: space between 'if' and '('
+ window.parent.postMessage({'keepScreenAwake': document.keepScreenAwake}, '*');
+ } else if (e.data.tag === 'setKeepScreenAwake') {
+ document.keepScreenAwake = e.data.keepScreenAwake;
+ }
+});
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/wake_lock/wakelock-api.html » ('j') | LayoutTests/wake_lock/wakelock-in-nested-frame.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698