-
tonyg@chromium.org authored
Reviewed by Darin Adler. Fix race condition in 4 media tests https://bugs.webkit.org/show_bug.cgi?id=55414 The parser may yield and give events a chance to dispatch between any two tokens. So it is possible that the loadstart event fires immediately after the video tag is inserted into the document but before the subsequent script is parsed. This is very rare in the layout test environment since these small files are loaded from disk. This patch eliminates that race condition by allowing waitForEvent to register for events that bubble up to the document from any element. Then the registration can happen before before the element is inserted into the document. * media/video-source-media.html: * media/video-source-none-supported.html: * media/video-source-type-params.html: * media/video-source-type.html: * media/video-test.js: (waitForEvent): (waitForEventAndTest): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
71e0b305