Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 from telemetry.page import page as page_module | 4 from telemetry.page import page as page_module |
| 5 from telemetry.page import page_set as page_set_module | 5 from telemetry.page import page_set as page_set_module |
| 6 | 6 |
| 7 | 7 |
| 8 class WebrtcCasesPage(page_module.Page): | 8 class WebrtcCasesPage(page_module.Page): |
| 9 | 9 |
| 10 def __init__(self, url, page_set): | 10 def __init__(self, url, page_set): |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 action_runner.Wait(10) | 42 action_runner.Wait(10) |
| 43 action_runner.ClickElement('button[id="btn3"]') | 43 action_runner.ClickElement('button[id="btn3"]') |
| 44 | 44 |
| 45 def RunWebrtc(self, action_runner): | 45 def RunWebrtc(self, action_runner): |
| 46 action_runner.ClickElement('button[id="btn1"]') | 46 action_runner.ClickElement('button[id="btn1"]') |
| 47 action_runner.Wait(2) | 47 action_runner.Wait(2) |
| 48 action_runner.ClickElement('button[id="btn2"]') | 48 action_runner.ClickElement('button[id="btn2"]') |
| 49 action_runner.Wait(10) | 49 action_runner.Wait(10) |
| 50 action_runner.ClickElement('button[id="btn3"]') | 50 action_runner.ClickElement('button[id="btn3"]') |
| 51 | 51 |
| 52 class Page3(WebrtcCasesPage): | |
| 53 | |
| 54 """ Why: Acquires a high definition local stream. """ | |
| 55 | |
| 56 def __init__(self, page_set): | |
| 57 super(Page3, self).__init__( | |
| 58 url=('http://googlechrome.github.io/webrtc/samples/web/content/' | |
| 59 'getusermedia-resolution/'), | |
| 60 page_set=page_set) | |
| 61 | |
| 62 def RunEndure(self, action_runner): | |
| 63 action_runner.ClickElement('button[id="hd"]') | |
| 64 action_runner.Wait(10) | |
|
qyearsley
2014/09/23 17:01:35
1. Might we want to remove the RunEndure method fo
phoglund_chromium
2014/09/25 11:31:58
Yeah, I double-checked and nobody calls RunEndure
| |
| 65 | |
| 66 def RunWebrtc(self, action_runner): | |
| 67 action_runner.ClickElement('button[id="hd"]') | |
| 68 action_runner.Wait(10) | |
| 69 | |
| 52 | 70 |
| 53 class WebrtcCasesPageSet(page_set_module.PageSet): | 71 class WebrtcCasesPageSet(page_set_module.PageSet): |
| 54 | 72 |
| 55 """ WebRTC tests for Real-time audio and video communication. """ | 73 """ WebRTC tests for Real-time audio and video communication. """ |
| 56 | 74 |
| 57 def __init__(self): | 75 def __init__(self): |
| 58 super(WebrtcCasesPageSet, self).__init__( | 76 super(WebrtcCasesPageSet, self).__init__( |
| 77 archive_data_file='data/webrtc_cases.json', | |
| 78 bucket=page_set_module.PUBLIC_BUCKET, | |
|
qyearsley
2014/09/23 17:01:35
I'm not very familiar what with this now, but if i
phoglund_chromium
2014/09/25 11:31:58
I copied it from another page set, so I think so.
| |
| 59 serving_dirs=['third_party/webrtc/samples/js']) | 79 serving_dirs=['third_party/webrtc/samples/js']) |
| 60 | 80 |
| 61 self.AddPage(Page1(self)) | 81 self.AddPage(Page1(self)) |
| 62 self.AddPage(Page2(self)) | 82 self.AddPage(Page2(self)) |
| 83 self.AddPage(Page3(self)) | |
| OLD | NEW |