Modern IDB: Remove unneeded "Alert: " string from storage/indexeddb/modern tests.
[WebKit-https.git] / LayoutTests / transitions / transition-end-event-helpers.js
index 5afee34..fa5f352 100644 (file)
@@ -10,12 +10,12 @@ var _processedEvents = false;
 /* Call this function to record manually transition end events:
 
 Function parameters:
-    event [required]: the event passed with "webkitTransitionEnd"
+    event [required]: the event passed with "webkitTransitionEnd" or "transitionend"
 
 */
 function recordTransitionEndEvent(event)
 {
-  if (event.type != "webkitTransitionEnd")
+  if (event.type != "webkitTransitionEnd" && event.type != "transitionend" )
     throw("Invalid transition end event!");
 
   _recordedEvents.push([
@@ -49,9 +49,9 @@ function runTransitionTest(expected, callback)
 {
   _expectedEventCount = expected.length;
 
-  if (window.layoutTestController) {
-    layoutTestController.dumpAsText();
-    layoutTestController.waitUntilDone();
+  if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
   }
   
   function processEndEvents(expected)
@@ -130,16 +130,17 @@ function runTransitionTest(expected, callback)
     document.body.removeChild(document.getElementById('container'));
     document.getElementById('result').innerHTML = examineResults(_recordedEvents, expected);
 
-    if (window.layoutTestController)
-        layoutTestController.notifyDone();
+    if (window.testRunner)
+        testRunner.notifyDone();
   }
 
-  function startTest(expected, callback)
+  function startTest(expected, callback, maxTime)
   {
     if (callback)
       callback();
     
-    var maxTime = 0;
+    if (!maxTime)
+        maxTime = 0;
 
     for (var i=0; i < expected.length; ++i) {
       if (expected[i][3]) {