| Index: tools/perf/page_sets/webrtc_cases.py
|
| diff --git a/tools/perf/page_sets/webrtc_cases.py b/tools/perf/page_sets/webrtc_cases.py
|
| index 1bd0f9cceb34f39320676d39caf599d7d99403df..16918ebeb18a022fe0f3dfda62cdf8af5ef77981 100644
|
| --- a/tools/perf/page_sets/webrtc_cases.py
|
| +++ b/tools/perf/page_sets/webrtc_cases.py
|
| @@ -7,6 +7,9 @@ from telemetry.page import page as page_module
|
| from telemetry.page import page_set as page_set_module
|
|
|
|
|
| +WEBRTC_GITHUB_SAMPLES_URL = 'http://webrtc.github.io/samples/src/content/'
|
| +
|
| +
|
| class WebrtcCasesPage(page_module.Page):
|
|
|
| def __init__(self, url, page_set):
|
| @@ -23,8 +26,7 @@ class Page1(WebrtcCasesPage):
|
|
|
| def __init__(self, page_set):
|
| super(Page1, self).__init__(
|
| - url=('http://googlechrome.github.io/webrtc/samples/web/content/'
|
| - 'getusermedia/gum/'),
|
| + url=WEBRTC_GITHUB_SAMPLES_URL + 'getusermedia/gum/',
|
| page_set=page_set)
|
|
|
| def RunPageInteractions(self, action_runner):
|
| @@ -37,8 +39,7 @@ class Page2(WebrtcCasesPage):
|
|
|
| def __init__(self, page_set):
|
| super(Page2, self).__init__(
|
| - url=('http://googlechrome.github.io/webrtc/samples/web/content/'
|
| - 'peerconnection/pc1/'),
|
| + url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/pc1/',
|
| page_set=page_set)
|
|
|
| def RunPageInteractions(self, action_runner):
|
| @@ -55,8 +56,7 @@ class Page3(WebrtcCasesPage):
|
|
|
| def __init__(self, page_set):
|
| super(Page3, self).__init__(
|
| - url=('http://googlechrome.github.io/webrtc/samples/web/content/'
|
| - 'getusermedia/resolution/'),
|
| + url=WEBRTC_GITHUB_SAMPLES_URL + 'getusermedia/resolution/',
|
| page_set=page_set)
|
|
|
| def RunPageInteractions(self, action_runner):
|
| @@ -70,8 +70,7 @@ class Page4(WebrtcCasesPage):
|
|
|
| def __init__(self, page_set):
|
| super(Page4, self).__init__(
|
| - url=('http://googlechrome.github.io/webrtc/samples/web/content/'
|
| - 'peerconnection/audio/?codec=OPUS'),
|
| + url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/audio/?codec=OPUS',
|
| page_set=page_set)
|
|
|
| def RunPageInteractions(self, action_runner):
|
| @@ -86,8 +85,7 @@ class Page5(WebrtcCasesPage):
|
|
|
| def __init__(self, page_set):
|
| super(Page5, self).__init__(
|
| - url=('http://googlechrome.github.io/webrtc/samples/web/content/'
|
| - 'peerconnection/audio/?codec=G722'),
|
| + url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/audio/?codec=G722',
|
| page_set=page_set)
|
|
|
| def RunPageInteractions(self, action_runner):
|
| @@ -102,8 +100,7 @@ class Page6(WebrtcCasesPage):
|
|
|
| def __init__(self, page_set):
|
| super(Page6, self).__init__(
|
| - url=('http://googlechrome.github.io/webrtc/samples/web/content/'
|
| - 'peerconnection/audio/?codec=PCMU'),
|
| + url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/audio/?codec=PCMU',
|
| page_set=page_set)
|
|
|
| def RunPageInteractions(self, action_runner):
|
| @@ -118,8 +115,7 @@ class Page7(WebrtcCasesPage):
|
|
|
| def __init__(self, page_set):
|
| super(Page7, self).__init__(
|
| - url=('http://googlechrome.github.io/webrtc/samples/web/content/'
|
| - 'peerconnection/audio/?codec=ISAC_16K'),
|
| + url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/audio/?codec=ISAC_16K',
|
| page_set=page_set)
|
|
|
| def RunPageInteractions(self, action_runner):
|
| @@ -128,6 +124,25 @@ class Page7(WebrtcCasesPage):
|
| action_runner.Wait(10)
|
|
|
|
|
| +class Page8(WebrtcCasesPage):
|
| +
|
| + """ Why: Sets up a WebRTC 1080p call for 45 seconds. """
|
| +
|
| + def __init__(self, page_set):
|
| + super(Page8, self).__init__(
|
| + url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/constraints/',
|
| + page_set=page_set)
|
| +
|
| + def RunPageInteractions(self, action_runner):
|
| + action_runner.ExecuteJavaScript('minWidthInput.value = 1920')
|
| + action_runner.ExecuteJavaScript('maxWidthInput.value = 1920')
|
| + action_runner.ExecuteJavaScript('minHeightInput.value = 1080')
|
| + action_runner.ExecuteJavaScript('maxHeightInput.value = 1080')
|
| + action_runner.ClickElement('button[id="getMedia"]')
|
| + action_runner.Wait(2)
|
| + action_runner.ClickElement('button[id="connect"]')
|
| + action_runner.Wait(45)
|
| +
|
| class WebrtcCasesPageSet(page_set_module.PageSet):
|
|
|
| """ WebRTC tests for Real-time audio and video communication. """
|
| @@ -147,3 +162,4 @@ class WebrtcCasesPageSet(page_set_module.PageSet):
|
| self.AddUserStory(Page5(self))
|
| self.AddUserStory(Page6(self))
|
| self.AddUserStory(Page7(self))
|
| + self.AddUserStory(Page8(self))
|
|
|