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

Unified Diff: LayoutTests/media/activation-behavior.html

Issue 216233003: Make media element sources unique to investigate flaky test (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: deterministic Created 6 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/activation-behavior.html
diff --git a/LayoutTests/media/activation-behavior.html b/LayoutTests/media/activation-behavior.html
index 0d9a3ccf9ea2233e5bb2f7c98d25be7be519e21b..02b073c0cc7e244722d1629c1dc2327f74fb1f4b 100644
--- a/LayoutTests/media/activation-behavior.html
+++ b/LayoutTests/media/activation-behavior.html
@@ -5,13 +5,21 @@
<script src="media-file.js"></script>
<div id="log"></div>
<script>
+var uniqueSrcCounter = 0;
+
function activation_behavior_test(tagName, src)
{
+ // FIXME: hack used to investigate http://crbug.com/355489
+ function uniqueSrc()
+ {
+ return src + '?activation-behavior-' + ++uniqueSrcCounter;
+ }
+
async_test(function(t)
{
var e = document.createElement(tagName);
e.controls = true;
- e.src = src;
+ e.src = uniqueSrc();
e.preload = 'auto';
e.oncanplay = t.step_func(function()
{
@@ -30,7 +38,7 @@ function activation_behavior_test(tagName, src)
{
var e = document.createElement(tagName);
e.controls = true;
- e.src = src;
+ e.src = uniqueSrc();
e.preload = 'auto';
e.oncanplay = t.step_func(function()
{
@@ -51,7 +59,8 @@ function activation_behavior_test(tagName, src)
var e1 = document.createElement(tagName);
var e2 = document.createElement(tagName);
e1.controls = true;
- e1.src = e2.src = src;
+ e1.src = uniqueSrc();
+ e2.src = uniqueSrc();
e1.preload = e2.preload = 'auto';
var canplaycount = 0;
e1.oncanplay = e2.oncanplay = t.step_func(function()
@@ -92,7 +101,7 @@ function activation_behavior_test(tagName, src)
{
var e = document.createElement(tagName);
e.controls = true;
- e.src = src;
+ e.src = uniqueSrc();
e.preload = 'auto';
e.oncanplay = t.step_func(function()
{
@@ -125,7 +134,7 @@ function activation_behavior_test(tagName, src)
{
var e = document.createElement(tagName);
e.controls = true;
- e.src = src;
+ e.src = uniqueSrc();
e.preload = 'auto';
e.oncanplay = t.step_func(function()
{
@@ -146,7 +155,7 @@ function activation_behavior_test(tagName, src)
var e1 = document.createElement(tagName);
var e2 = document.createElement(tagName);
e1.controls = true;
- e1.src = src;
+ e1.src = uniqueSrc();
e1.preload = 'auto';
e1.oncanplay = t.step_func(function()
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698