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

Side by Side Diff: LayoutTests/wake_lock/wakelock-in-nested-frame.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, 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../resources/js-test.js"></script>
mlamouri (slow - plz ping) 2015/04/28 08:00:25 Please use test-harness.js
5 <script>
6 description("Test WakeLock API in a nested context.");
7
8 if (!window.testRunner)
9 debug('This test cannot be run without the TestRunner');
10
11 gc();
12 jsTestIsAsync = true;
13
14 function callback(nestedDocument) {
15 if (nestedDocument.keepScreenAwake != false)
16 testFailed("On start keepScreenAwake should be false");
17 debug('keepScreenAwake should be initialized to false in the nested context' );
18 nestedDocument.keepScreenAwake = true;
19 if (nestedDocument.keepScreenAwake != true)
20 testFailed("keepScreenAwake should be save value");
21 debug('keepScreenAwake save value in the nested context');
22 setTimeout(finishJSTest, 0);
23 }
24
25 // called from the nested context when it's loaded
26 function startTest(nested) {
27 nested.runTest(callback);
28 }
29 // set keepScreenAwake to true in main frame
30 document.keepScreenAwake = true;
31
32 // Load the nested document
33 var iframe = document.createElement("iframe");
34 document.body.appendChild(iframe);
35 iframe.src = "resources/nested-frame.html";
36
37 </script>
38 </body>
39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698