Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-util.js

Issue 2439083003: Replace flaky test, wrangle with harness/infra
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-util.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-util.js b/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-util.js
index 092af85c5cdb430c6de0757be268e1bf4e8cfdbf..2dab53c2a6f643f348cf8bf5fb079adcf4a80462 100644
--- a/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-util.js
+++ b/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-util.js
@@ -407,11 +407,17 @@
{
return media_test(function(test)
{
- var mediaTag = document.createElement("video");
+ var tagType = properties.audio_only ? "audio" : "video";
+ var mediaTag = document.createElement(tagType);
document.body.appendChild(mediaTag);
// Overload done() so that element added to the document can be removed.
test.removeMediaElement_ = true;
+ if (typeof(properties.remove_element_when_done) != undefined) {
+ // Some tests may want the mediaElement to stick around.
+ test.removeMediaElement_ = properties.remove_element_when_done
+ }
+
var oldTestDone = test.done.bind(test);
test.done = function()
{

Powered by Google App Engine
This is Rietveld 408576698