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..b69028b824813e343022c6eb75a4ce7dd584891c |
--- /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 === 'getKeepAwake') { |
+ window.parent.postMessage({'keepAwake': screen.keepAwake}, '*'); |
+ } else if (e.data.tag === 'setKeepAwake') { |
+ screen.keepAwake = e.data.keepAwake; |
+ } |
+}); |
+</script> |
+</body> |
+</html> |