Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: chrome/test/functional/webrtc_brutality_test.py

Issue 10837235: Fixed tab closing code after framework update. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import pyauto_functional 6 import pyauto_functional
7 import webrtc_test_base 7 import webrtc_test_base
8 8
9 9
10 class WebrtcBrutalityTest(webrtc_test_base.WebrtcTestBase): 10 class WebrtcBrutalityTest(webrtc_test_base.WebrtcTestBase):
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 self.NavigateToURL(url) 50 self.NavigateToURL(url)
51 51
52 self.GetUserMedia(tab_index=0, action='allow') 52 self.GetUserMedia(tab_index=0, action='allow')
53 self.ReloadTab(tab_index=0) 53 self.ReloadTab(tab_index=0)
54 54
55 def testClosingTabAfterGetUserMedia(self): 55 def testClosingTabAfterGetUserMedia(self):
56 """Tests closing the tab right after a getUserMedia call.""" 56 """Tests closing the tab right after a getUserMedia call."""
57 url = self.GetFileURLForDataPath('webrtc', 'webrtc_jsep_test.html') 57 url = self.GetFileURLForDataPath('webrtc', 'webrtc_jsep_test.html')
58 self.NavigateToURL(url) 58 self.NavigateToURL(url)
59 59
60 tab = self.GetBrowserWindow(0).GetTab(0)
61 self._GetUserMediaWithoutTakingAction(tab_index=0) 60 self._GetUserMediaWithoutTakingAction(tab_index=0)
62 tab.Close() 61 self.CloseTab(tab_index=0)
63 62
64 def testSuccessfulGetUserMediaAndThenClose(self): 63 def testSuccessfulGetUserMediaAndThenClose(self):
65 """Waits for WebRTC to respond, and closes the tab.""" 64 """Waits for WebRTC to respond, and closes the tab."""
66 url = self.GetFileURLForDataPath('webrtc', 'webrtc_jsep_test.html') 65 url = self.GetFileURLForDataPath('webrtc', 'webrtc_jsep_test.html')
67 self.NavigateToURL(url) 66 self.NavigateToURL(url)
68 67
69 tab = self.GetBrowserWindow(0).GetTab(0)
70 self.GetUserMedia(tab_index=0, action='allow') 68 self.GetUserMedia(tab_index=0, action='allow')
71 tab.Close() 69 self.CloseTab(tab_index=0)
72 70
73 def _GetUserMediaWithoutTakingAction(self, tab_index): 71 def _GetUserMediaWithoutTakingAction(self, tab_index):
74 self.assertEquals('ok-requested', self.ExecuteJavascript( 72 self.assertEquals('ok-requested', self.ExecuteJavascript(
75 'getUserMedia(true, true)', tab_index=0)) 73 'getUserMedia(true, true)', tab_index=0))
76 74
77 75
78 if __name__ == '__main__': 76 if __name__ == '__main__':
79 pyauto_functional.Main() 77 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698