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

Side by Side Diff: LayoutTests/fullscreen/full-screen-zIndex-after.html

Issue 457663002: Convert more fullscreen tests to reftests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address feedback Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script> 4 <script>
5 var runPixelTests = true; 5 var runPixelTests = true;
6 6
7 function init() { 7 function init() {
8 // Bail out early if the full screen API is not enabled or is mi ssing: 8 // Bail out early if the full screen API is not enabled or is mi ssing:
9 if (Element.prototype.webkitRequestFullScreen == undefined) { 9 if (Element.prototype.webkitRequestFullScreen == undefined) {
10 logResult(false, "Element.prototype.webkitRequestFullScreen == undefined"); 10 logResult(false, 'Element.prototype.webkitRequestFullScreen == undefined');
11 endTest(); 11 endTest();
12 } else { 12 } else {
13 waitForEvent(document, 'webkitfullscreenchange', function() { 13 document.onwebkitfullscreenchange = function() {
14 if (document.webkitIsFullScreen) 14 document.onwebkitfullscreenchange = endTest;
15 runWithKeyDown(function() { document.webkitCancelFul lScreen(); }); 15 document.webkitCancelFullScreen();
16 else { 16 };
17 endTest(); 17 function goFullScreen() {
18 } 18 document.getElementById('block1').webkitRequestFullScree n();
19 }); 19 }
20 runWithKeyDown(goFullScreen); 20 runWithKeyDown(goFullScreen);
21 } 21 }
22 } 22 }
23
24 function goFullScreen() {
25 document.getElementById('block1').webkitRequestFullScreen();
26 }
27 </script> 23 </script>
28 <script src="full-screen-test.js"></script> 24 <script src="full-screen-test.js"></script>
29 <style> 25 <style>
30 #block1 { 26 #block1 {
31 width: 200px; 27 width: 200px;
32 height: 100px; 28 height: 100px;
33 border: 4px solid darkgreen; 29 border: 4px solid darkgreen;
34 background-color: green; 30 background-color: green;
35 } 31 }
36 #block2 { 32 #block2 {
37 width: 100px; 33 width: 100px;
38 height: 50px; 34 height: 50px;
39 border: 4px solid darkred; 35 border: 4px solid darkred;
40 background-color: red; 36 background-color: red;
41 z-index: 200; 37 z-index: 200;
42 position: relative; 38 position: relative;
43 left: 50px; 39 left: 50px;
44 top: 25px; 40 top: 25px;
45 } 41 }
46 #block3 { 42 #block3 {
47 z-index: 500; 43 z-index: 500;
48 position: relative; 44 position: relative;
49 } 45 }
50 </style> 46 </style>
51 </head> 47 </head>
52 <body onload="init()"> 48 <body onload="init()">
53 <div>This tests that an element with a positive z-index appears behind t he full screen element. 49 <div>This tests that an element with a positive z-index appears behind t he full screen element.
54 After entering full screen mode, the green box should not be obscur ed by the red box. 50 After entering full screen mode, the green box should not be obscur ed by the red box.
55 Click <button onclick="goFullScreen()">go full screen</button> to r un the test.</div> 51 Click <button onclick="goFullScreen()">go full screen</button> to r un the test.</div>
56 <div id="block2"></div> 52 <div id="block2"></div>
57 <div id="block3"> 53 <div id="block3">
58 <div id="block1"></div> 54 <div id="block1"></div>
59 </div> 55 </div>
60 </body> 56 </body>
57 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698