Commit ddc4720a authored by jrummell@chromium.org's avatar jrummell@chromium.org

Increase timeout on slow encrypted-media layout tests

The default timeout for tests using the w3c test harness is 2 seconds.
For several of these tests that play a little bit of video, this is not
long enough, especially when running using slower builds (like ASAN).
Setting the timeouts to a large value (60s) for both per-test time and
entire test time so that the infrastructure timeouts will be used.

BUG=353770, 353792
TEST=layout tests pass repeatedly using ASAN build

Review URL: https://codereview.chromium.org/205143002

git-svn-id: svn://svn.chromium.org/blink/trunk@169712 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 2978880d
......@@ -931,9 +931,7 @@ crbug.com/353736 [ Linux ] fast/forms/select/listbox-appearance-basic.html [ Pas
crbug.com/353751 http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-same-none-block.html [ Pass Failure ]
crbug.com/353763 http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-same-url-block.html [ Pass Failure ]
crbug.com/353754 fast/scrolling/hover-during-scroll.html [ Pass Failure ]
crbug.com/353770 [ Linux ] media/encrypted-media/encrypted-media-playback-setmediakeys-after-src.html [ Pass Failure Timeout ]
crbug.com/353790 [ Linux Win ] virtual/threaded/animations/import.html [ Pass Timeout ]
crbug.com/353792 media/encrypted-media/encrypted-media-waiting-for-a-key.html [ Pass Failure Crash ]
# Disabled until Chromium side lands
crbug.com/350103 virtual/serviceworker/http/tests/serviceworker/indexeddb.html [ Skip ]
......
......@@ -8,6 +8,9 @@
<body>
<div id="log"></div>
<script>
// Timeout for all tests to run.
setup({ timeout: 60000 });
// Generate a distinct test for each type in |types|.
function test_type_support(types, expectation, description)
{
......@@ -18,7 +21,8 @@
assert_true(type.length == 1 || type.length == 2);
assert_equals(MediaKeys.isTypeSupported.apply(
this, type), expectation, 'isTypeSupported');
}, description + ": '" + type.join("', '") + "'");
}, description + ": '" + type.join("', '") + "'",
{ timeout: 60000 });
}
};
......
......@@ -12,6 +12,9 @@
<div id="log"></div>
<p>Test that needkey event is fired on an encrypted media file.</p>
<script>
// Timeout for all tests to run.
setup({ timeout: 60000 });
var expectedInitData = stringToUint8Array('0123456789012345');
// Will get 2 identical events, one for audio, one for video.
......@@ -35,7 +38,7 @@
waitForEventAndRunStep("needkey", video, onNeedKey, test);
video.src = "../content/test-encrypted.webm";
}, "Needkey fired on encrypted media file.");
}, "Needkey fired on encrypted media file.", { timeout: 60000 });
</script>
</body>
</html>
......@@ -12,6 +12,9 @@
<div id="log"></div>
<p>Test playback of encrypted media using Clear Key key system.</p>
<script>
// Timeout for all tests to run.
setup({ timeout: 60000 });
async_test(function(test)
{
var video = document.getElementById("testVideo");
......@@ -76,7 +79,8 @@
video.src = "../content/test-encrypted.webm";
video.setMediaKeys(mediaKeys);
video.play();
}, "Playback using Clear Key key system, calling setMediaKeys() after setting src attribute.");
}, "Playback using Clear Key key system, calling setMediaKeys() after setting src attribute.",
{ timeout: 60000 });
</script>
</body>
</html>
......@@ -12,6 +12,9 @@
<div id="log"></div>
<p>Test playback of encrypted media using Clear Key key system.</p>
<script>
// Timeout for all tests to run.
setup({ timeout: 60000 });
async_test(function(test)
{
var video = document.getElementById("testVideo");
......@@ -76,7 +79,8 @@
video.setMediaKeys(mediaKeys);
video.src = "../content/test-encrypted.webm";
video.play();
}, "Playback using Clear Key key system, calling setMediaKeys() before setting src attribute.");
}, "Playback using Clear Key key system, calling setMediaKeys() before setting src attribute.",
{ timeout: 60000 });
</script>
</body>
</html>
......@@ -14,6 +14,9 @@
var mediaKeySession = null;
var initData = stringToUint8Array('init data');
// Timeout for all tests to run.
setup({ timeout: 60000 });
test(function()
{
// Too few parameters.
......@@ -26,7 +29,7 @@
assert_throws('NOT_SUPPORTED_ERR', function() { new MediaKeys('unsupported'); });
assert_throws('NOT_SUPPORTED_ERR', function() { new MediaKeys(1); });
assert_throws('NOT_SUPPORTED_ERR', function() { new MediaKeys(new Uint8Array(0)); });
}, 'Test MediaKeys constructor exceptions.');
}, 'Test MediaKeys constructor exceptions.', { timeout: 60000 });
test(function()
{
......@@ -38,7 +41,7 @@
assert_equals(mediaKeys.keySystem, 'org.w3.clearkey');
assert_equals(typeof mediaKeys.createSession, 'function');
assert_equals(typeof mediaKeys.addEventListener, 'undefined');
}, 'Test MediaKeys constructor.');
}, 'Test MediaKeys constructor.', { timeout: 60000 });
test(function()
{
......@@ -65,7 +68,7 @@
assert_throws('NotSupportedError', function() { mediaKeys.createSession('unsupported', initData); });
assert_throws('NotSupportedError', function() { mediaKeys.createSession('video/foo', initData); });
assert_throws('NotSupportedError', function() { mediaKeys.createSession('text/webm', initData); });
}, 'Test MediaKeys createSession() exceptions.');
}, 'Test MediaKeys createSession() exceptions.', { timeout: 60000 });
test(function()
{
......@@ -82,7 +85,7 @@
assert_equals(typeof mediaKeySession.onmessage, 'undefined');
assert_equals(typeof mediaKeySession.onclose, 'undefined');
assert_equals(typeof mediaKeySession.onerror, 'undefined');
}, 'Test MediaKeys createSession().');
}, 'Test MediaKeys createSession().', { timeout: 60000 });
test(function()
{
......@@ -94,20 +97,20 @@
assert_throws('InvalidAccessError', function() { mediaKeySession.update(undefined); });
assert_throws('InvalidAccessError', function() { mediaKeySession.update(1); });
assert_throws('InvalidAccessError', function() { mediaKeySession.update(new Uint8Array(0)); });
}, 'Test MediaKeySession update() exceptions.');
}, 'Test MediaKeySession update() exceptions.', { timeout: 60000 });
test(function()
{
mediaKeySession.update(new Uint8Array(1), 'extra');
mediaKeySession.update(new Uint8Array(1));
}, 'Test MediaKeySession update().');
}, 'Test MediaKeySession update().', { timeout: 60000 });
test(function()
{
mediaKeySession.release();
// FIXME: This causes Chromium to crash. Uncomment this once Chromium is fixed.
// mediaKeySession.release('extra');
}, 'Test MediaKeySession release().');
}, 'Test MediaKeySession release().', { timeout: 60000 });
// FIXME: Add syntax checks for MediaKeys.IsTypeSupported().
// FIXME: Add syntax checks for MediaKeyError and MediaKeySession events.
......
......@@ -11,6 +11,9 @@
<video id="testVideo"></video>
<div id="log"></div>
<script>
// Timeout for all tests to run.
setup({ timeout: 60000 });
async_test(function(test)
{
var video = document.getElementById("testVideo");
......@@ -92,7 +95,7 @@
video.src = "../content/test-encrypted.webm";
video.setMediaKeys(mediaKeys);
video.play();
}, "Waiting for a key.");
}, "Waiting for a key.", { timeout: 60000 });
</script>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment