Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / transitions / transition-end-event-all-properties.html
index 38c7fec..71eb220 100644 (file)
@@ -1,7 +1,6 @@
 <html>
 <head>
-  <title>Transition End Events</title>
-  <style type="text/css" media="screen">
+  <style>
     .box {
       position: relative;
       left: 0;
     }
     
   </style>
-  <script src="end-event-helpers.js" type="text/javascript" charset="utf-8"></script>
-  <script type="text/javascript" charset="utf-8">
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.waitUntilDone();
-    }
-
-    var expected = [
-      ["background-color", "box2", "webkitTransitionEnd", 0.5],
-      ["background-color", "box3", "webkitTransitionEnd", 0.7],
-      ["height", "box3", "webkitTransitionEnd", 0.7],
-      ["left", "box1", "webkitTransitionEnd", 0.5],
-      ["left", "box2", "webkitTransitionEnd", 0.5],
-      ["left", "box3", "webkitTransitionEnd", 0.7],
-      ["width", "box3", "webkitTransitionEnd", 0.7]
+  <script src="transition-end-event-helpers.js"></script>
+  <script type="text/javascript">
+    
+    var expectedEndEvents = [
+      // [property-name, element-id, elapsed-time, listen]
+      ["background-color", "box2", 0.5, true],
+      ["background-color", "box3", 0.7, true],
+      ["height", "box3",  0.7, true],
+      ["left", "box1", 0.5, true],
+      ["left", "box2", 0.5, true],
+      ["left", "box3", 0.7, true],
+      ["width", "box3", 0.7, true]
     ];
     
-    function startTransition()
+    function setupTest()
     {
       var boxes = document.body.getElementsByClassName('box');
       for (var i = 0; i < boxes.length; ++i) {
-        boxes[i].addEventListener("webkitTransitionEnd", recordEvent, false);
         boxes[i].className = "box box" + (i+1);
       }
-      
-      window.setTimeout(cleanup, 1000);
     }
     
-    window.addEventListener('load', startTransition, false);
+    runTransitionTest(expectedEndEvents, setupTest);
   </script>
 </head>
 <body>