| 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 # pylint: disable=W0401,W0614 | 4 # pylint: disable=W0401,W0614 |
| 5 from telemetry.page.actions.all_page_actions import * | 5 from telemetry.page.actions.all_page_actions import * |
| 6 from telemetry.page import page as page_module | 6 from telemetry.page import page as page_module |
| 7 from telemetry.page import page_set as page_set_module | 7 from telemetry.page import page_set as page_set_module |
| 8 | 8 |
| 9 | 9 |
| 10 class WebrtcCasesPage(page_module.Page): | 10 class WebrtcCasesPage(page_module.Page): |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 super(Page1, self).__init__( | 21 super(Page1, self).__init__( |
| 22 url='file://webrtc/local-video.html', | 22 url='file://webrtc/local-video.html', |
| 23 page_set=page_set) | 23 page_set=page_set) |
| 24 | 24 |
| 25 def RunWebrtc(self, action_runner): | 25 def RunWebrtc(self, action_runner): |
| 26 action_runner.NavigateToPage(self) | 26 action_runner.NavigateToPage(self) |
| 27 action_runner.RunAction(WaitAction( | 27 action_runner.RunAction(WaitAction( |
| 28 { | 28 { |
| 29 'seconds': 10 | 29 'seconds': 10 |
| 30 })) | 30 })) |
| 31 action_runner.RunAction(JavascriptAction( | 31 action_runner.ExecuteJavaScript('checkForErrors();') |
| 32 { | |
| 33 'expression': 'checkForErrors();' | |
| 34 })) | |
| 35 | 32 |
| 36 | 33 |
| 37 class Page2(WebrtcCasesPage): | 34 class Page2(WebrtcCasesPage): |
| 38 | 35 |
| 39 """ Why: Loopback video call using the PeerConnection API. """ | 36 """ Why: Loopback video call using the PeerConnection API. """ |
| 40 | 37 |
| 41 def __init__(self, page_set): | 38 def __init__(self, page_set): |
| 42 super(Page2, self).__init__( | 39 super(Page2, self).__init__( |
| 43 url='file://third_party/webrtc/samples/js/demos/html/pc1.html', | 40 url='file://third_party/webrtc/samples/js/demos/html/pc1.html', |
| 44 page_set=page_set) | 41 page_set=page_set) |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 class WebrtcCasesPageSet(page_set_module.PageSet): | 88 class WebrtcCasesPageSet(page_set_module.PageSet): |
| 92 | 89 |
| 93 """ WebRTC tests for Real-time audio and video communication. """ | 90 """ WebRTC tests for Real-time audio and video communication. """ |
| 94 | 91 |
| 95 def __init__(self): | 92 def __init__(self): |
| 96 super(WebrtcCasesPageSet, self).__init__( | 93 super(WebrtcCasesPageSet, self).__init__( |
| 97 serving_dirs=['third_party/webrtc/samples/js']) | 94 serving_dirs=['third_party/webrtc/samples/js']) |
| 98 | 95 |
| 99 self.AddPage(Page1(self)) | 96 self.AddPage(Page1(self)) |
| 100 self.AddPage(Page2(self)) | 97 self.AddPage(Page2(self)) |
| OLD | NEW |