[Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointereven...
[WebKit-https.git] / LayoutTests / compositing / self-painting-layers.html
index 21e2b12..4b63210 100644 (file)
       font-size: 24pt;
       line-height: 150%;
     }
-    
     </style>
+
+    <script src="resources/media-testing.js"></script>
+    <script src="../media/media-file.js"></script>
+
     <script type="text/javascript" charset="utf-8">
-      if (window.layoutTestController)
-        layoutTestController.waitUntilDone();
+      function testDone()
+      {
+        if (window.testRunner)
+          testRunner.notifyDone();
+      }
+
+      function modifyDocument()
+      {
+        document.getElementById('details').scrollTop = 24;
+      }
 
-      function testOnLoad()
+      function doTest()
       {
-        window.setTimeout(function() {
-          document.getElementById('details').scrollTop = 24;
-          if (window.layoutTestController)
-            layoutTestController.notifyDone();
-        }, 0);
+        var video = document.getElementsByTagName('video')[0];
+        setupVideo(video, 'resources/video', modifyDocument, testDone);
       }
-      
-      window.addEventListener('load', function() {
-        document.getElementById('video').src = "resources/video.mp4";
-      }, false);
     </script>
   </head>
-  <body>
+  <body onload="doTest()">
       <p>You should not see double text when the div scrolls</p>
         <div id="container">
-          <video id="video" width="300" height="200" onload="testOnLoad()"></video>
+          <video id="video" width="300" height="200"></video>
         </div>
 
         <div id="details">