summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorxians@chromium.org <xians@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-13 21:07:57 +0000
committerxians@chromium.org <xians@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-13 21:07:57 +0000
commit8bb8f0ba3a190908b9e8abe1edcdb33363c0a169 (patch)
tree84ac5905c2fd3b609bcda015e1f62537b20c3abe /chrome/test
parent890b06cabb15a90ab29bb3ac5f014ab285186189 (diff)
downloadchromium_src-8bb8f0ba3a190908b9e8abe1edcdb33363c0a169.zip
chromium_src-8bb8f0ba3a190908b9e8abe1edcdb33363c0a169.tar.gz
chromium_src-8bb8f0ba3a190908b9e8abe1edcdb33363c0a169.tar.bz2
We now use the confirm infobar, which has actions like accept and cancel, instead of allow and deny.
BUG=165899 TEST=pyauto test: media_stream_infobar.py, webrtc_call.py Review URL: https://chromiumcodereview.appspot.com/11574004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172952 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rwxr-xr-xchrome/test/functional/media_stream_infobar.py16
-rwxr-xr-xchrome/test/functional/webrtc_brutality_test.py8
-rwxr-xr-xchrome/test/functional/webrtc_call.py2
-rwxr-xr-xchrome/test/functional/webrtc_test_base.py4
4 files changed, 15 insertions, 15 deletions
diff --git a/chrome/test/functional/media_stream_infobar.py b/chrome/test/functional/media_stream_infobar.py
index 548fdc1..9d6d44a 100755
--- a/chrome/test/functional/media_stream_infobar.py
+++ b/chrome/test/functional/media_stream_infobar.py
@@ -23,16 +23,16 @@ class MediaStreamInfobarTest(webrtc_test_base.WebrtcTestBase):
return pyauto.PyUITest.ExtraChromeFlags(self) + extra_flags
def testAllowingUserMedia(self):
- """Test that selecting 'allow' gives us a media stream.
+ """Test that selecting 'accept' gives us a media stream.
When the user clicks allow, the javascript should have the success callback
called with a media stream.
"""
self.assertEquals('ok-got-stream',
- self._TestGetUserMedia(with_action='allow'))
+ self._TestGetUserMedia(with_action='accept'))
def testDenyingUserMedia(self):
- """Tests that selecting 'deny' actually denies access to user media.
+ """Tests that selecting 'cancel' actually denies access to user media.
When the user clicks deny in the user media bar, the javascript should have
the error callback called with an error specification instead of the success
@@ -41,7 +41,7 @@ class MediaStreamInfobarTest(webrtc_test_base.WebrtcTestBase):
"""
# Error 1 = Permission denied
self.assertEquals('failed-with-error-1',
- self._TestGetUserMedia(with_action='deny'))
+ self._TestGetUserMedia(with_action='cancel'))
def testDismissingUserMedia(self):
"""Dismiss should be treated just like deny, which is described above."""
@@ -54,13 +54,13 @@ class MediaStreamInfobarTest(webrtc_test_base.WebrtcTestBase):
self.assertEquals('failed-with-error-1',
self._TestGetUserMedia(with_action='dismiss'))
self.assertEquals('failed-with-error-1',
- self._TestGetUserMedia(with_action='deny'))
+ self._TestGetUserMedia(with_action='cancel'))
self.assertEquals('ok-got-stream',
- self._TestGetUserMedia(with_action='allow'))
+ self._TestGetUserMedia(with_action='accept'))
self.assertEquals('failed-with-error-1',
- self._TestGetUserMedia(with_action='deny'))
+ self._TestGetUserMedia(with_action='cancel'))
self.assertEquals('ok-got-stream',
- self._TestGetUserMedia(with_action='allow'))
+ self._TestGetUserMedia(with_action='accept'))
self.assertEquals('failed-with-error-1',
self._TestGetUserMedia(with_action='dismiss'))
diff --git a/chrome/test/functional/webrtc_brutality_test.py b/chrome/test/functional/webrtc_brutality_test.py
index dd211e4..849ed76 100755
--- a/chrome/test/functional/webrtc_brutality_test.py
+++ b/chrome/test/functional/webrtc_brutality_test.py
@@ -25,7 +25,7 @@ class WebrtcBrutalityTest(webrtc_test_base.WebrtcTestBase):
for i in range(1, 100):
if i % 10 == 0:
- self.GetUserMedia(tab_index=0, action='allow')
+ self.GetUserMedia(tab_index=0, action='accept')
else:
self._GetUserMediaWithoutTakingAction(tab_index=0)
self.ReloadTab(tab_index=0)
@@ -40,7 +40,7 @@ class WebrtcBrutalityTest(webrtc_test_base.WebrtcTestBase):
for i in range(1, 100):
if i % 10 == 0:
- self.GetUserMedia(tab_index=0, action='allow')
+ self.GetUserMedia(tab_index=0, action='accept')
else:
self._GetUserMediaWithoutTakingAction(tab_index=0)
@@ -49,7 +49,7 @@ class WebrtcBrutalityTest(webrtc_test_base.WebrtcTestBase):
url = self.GetFileURLForDataPath('webrtc', 'webrtc_jsep01_test.html')
self.NavigateToURL(url)
- self.GetUserMedia(tab_index=0, action='allow')
+ self.GetUserMedia(tab_index=0, action='accept')
self.ReloadTab(tab_index=0)
def testClosingTabAfterGetUserMedia(self):
@@ -65,7 +65,7 @@ class WebrtcBrutalityTest(webrtc_test_base.WebrtcTestBase):
url = self.GetFileURLForDataPath('webrtc', 'webrtc_jsep01_test.html')
self.NavigateToURL(url)
- self.GetUserMedia(tab_index=0, action='allow')
+ self.GetUserMedia(tab_index=0, action='accept')
self.CloseTab(tab_index=0)
def _GetUserMediaWithoutTakingAction(self, tab_index):
diff --git a/chrome/test/functional/webrtc_call.py b/chrome/test/functional/webrtc_call.py
index 39b715a..64458ac 100755
--- a/chrome/test/functional/webrtc_call.py
+++ b/chrome/test/functional/webrtc_call.py
@@ -161,7 +161,7 @@ class WebrtcCallTest(webrtc_test_base.WebrtcTestBase):
self.EstablishCall(from_tab_with_index=0, to_tab_with_index=1)
self.assertEquals('failed-with-error-1',
- self.GetUserMedia(tab_index=0, action='deny'))
+ self.GetUserMedia(tab_index=0, action='cancel'))
self.assertEquals('failed-with-error-1',
self.GetUserMedia(tab_index=0, action='dismiss'))
diff --git a/chrome/test/functional/webrtc_test_base.py b/chrome/test/functional/webrtc_test_base.py
index 5b4b163..82ff117 100755
--- a/chrome/test/functional/webrtc_test_base.py
+++ b/chrome/test/functional/webrtc_test_base.py
@@ -21,13 +21,13 @@ class WebrtcTestBase(pyauto.PyUITest):
extra_flags = ['--enable-media-stream', '--enable-peer-connection']
return pyauto.PyUITest.ExtraChromeFlags(self) + extra_flags
- def GetUserMedia(self, tab_index, action='allow',
+ def GetUserMedia(self, tab_index, action='accept',
request_video=True, request_audio=True):
"""Acquires webcam or mic for one tab and returns the result.
Args:
tab_index: The tab to request user media on.
- action: The action to take on the info bar. Can be 'allow', 'deny' or
+ action: The action to take on the info bar. Can be 'accept', 'cancel' or
'dismiss'.
request_video: Whether to request video.
request_audio: Whether to request audio.