Bug 1258020 - Increase timeouts for network bandwidth limiting tests. Netflix takes a LONG time to load when bandwidth is low. r?SingingTree, r?maja_zf
MozReview-Commit-ID: 3mukTlWesby
--- a/dom/media/test/external/external_media_harness/testcase.py
+++ b/dom/media/test/external/external_media_harness/testcase.py
@@ -117,26 +117,25 @@ class NetworkBandwidthTestCase(MediaTest
BrowserMobProxyTestCaseMixin.setUp(self)
self.proxy = self.create_browsermob_proxy()
def tearDown(self):
super(NetworkBandwidthTestCase, self).tearDown()
BrowserMobProxyTestCaseMixin.tearDown(self)
self.proxy = None
- def run_videos(self):
+ def run_videos(self, timeout=60):
"""
Run each of the videos in the video list. Raises if something goes
wrong in playback.
"""
with self.marionette.using_context('content'):
for url in self.video_urls:
- video = VP(self.marionette, url,
- stall_wait_time=60,
- set_duration=60)
+ video = VP(self.marionette, url, stall_wait_time=60,
+ set_duration=60, timeout=timeout)
self.run_playback(video)
class VideoPlaybackTestsMixin(object):
"""
Test MSE playback in HTML5 video element.
@@ -183,25 +182,25 @@ class VideoPlaybackTestsMixin(object):
class NetworkBandwidthTestsMixin(object):
"""
Test video urls with various bandwidth settings.
"""
def test_playback_limiting_bandwidth_250(self):
self.proxy.limits({'downstream_kbps': 250})
- self.run_videos()
+ self.run_videos(timeout=120)
def test_playback_limiting_bandwidth_500(self):
self.proxy.limits({'downstream_kbps': 500})
- self.run_videos()
+ self.run_videos(timeout=120)
def test_playback_limiting_bandwidth_1000(self):
self.proxy.limits({'downstream_kbps': 1000})
- self.run_videos()
+ self.run_videos(timeout=120)
reset_adobe_gmp_script = """
navigator.requestMediaKeySystemAccess('com.adobe.primetime',
[{initDataType: 'cenc'}]).then(
function(access) {
marionetteScriptFinished('success');
},
--- a/dom/media/test/external/external_media_tests/playback/test_ultra_low_bandwidth.py
+++ b/dom/media/test/external/external_media_tests/playback/test_ultra_low_bandwidth.py
@@ -7,9 +7,9 @@ from marionette import BrowserMobProxyTe
from external_media_harness.testcase import NetworkBandwidthTestCase
class TestUltraLowBandwidth(NetworkBandwidthTestCase,
BrowserMobProxyTestCaseMixin):
def test_playback_limiting_bandwidth_160(self):
self.proxy.limits({'downstream_kbps': 160})
- self.run_videos()
+ self.run_videos(timeout=120)