1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52

content / test / data / gpu / pixel_background.html [blame]

<html>
<head>
<meta name="viewport" content="initial-scale=1">
<title>Basic Rasterization Test: Blue Box over Black Background</title>
<style type="text/css">
body {
  margin: 0px;
  padding: 0px;
  background-color: green;
}
#container {
  position: relative;
  margin: 10px;
  width: 200px;
  height: 200px;
  background-color: black;
}
#blue_box {
  position: relative;
  top: 50px;
  left: 50px;
  width: 100px;
  height: 100px;
  background-color: blue;
}
</style>
<script>
var g_swapsBeforeAck = 15;

function main() {
  waitForFinish();
}

function waitForFinish()
{
  if (g_swapsBeforeAck == 0) {
    domAutomationController.send("SUCCESS");
  } else {
    g_swapsBeforeAck--;
    document.getElementById('blue_box').style.zIndex = g_swapsBeforeAck + 1;
    window.requestAnimationFrame(waitForFinish);
  }
}
</script>
</head>

<body onload="main()">
<div id="container">
  <div id="blue_box"></div>
</div>
</body>
</html>