Bug 1535077 - Switch to using Ref and PureComponent in the SearchBox component. r...
[gecko.git] / layout / reftests / bugs / 1050493-1.html
blob321cf0d6c5d8ecd6f853066a1e757db9a1ae3205
1 <!DOCTYPE html>
2 <html class="reftest-wait">
3 <meta charset="utf-8">
4 <title>Test for bug 1050493</title>
6 <style>
7 body {
8 position: relative;
10 #box {
11 width: 50px;
12 height: 50px;
13 background-color: red;
14 position: absolute;
16 </style>
18 <div style="left: 0; top: 0;" id="box"></div>
20 <script>
21 var positions = [
22 { x: 4.6260797642782014, y: 0.46260797642782014 },
23 { x: 5.0304173163526205, y: 0.4878118314685598 },
24 { x: 5.0304173163526205, y: 0.5041006554218519 },
25 { x: 5.556750627747686, y: 0.5041006554218519 }];
26 var s = document.getElementById('box').style,
27 i = 0;
28 function f() {
29 if (i < positions.length) {
30 s.left = positions[i].x + "px";
31 s.top = positions[i].y + "px";
32 i++;
33 requestAnimationFrame(f);
34 } else {
35 document.documentElement.className = "";
38 window.addEventListener("MozReftestInvalidate", function () {
39 f();
40 });
41 </script>