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> |