summaryrefslogtreecommitdiffstats
path: root/chrome/test/functional
diff options
context:
space:
mode:
authordennisjeffrey@chromium.org <dennisjeffrey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-23 19:48:34 +0000
committerdennisjeffrey@chromium.org <dennisjeffrey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-23 19:48:34 +0000
commitdad5753f242da16d8e72d8759303e35f320d8e95 (patch)
treecf4cc4b147f431df8c1c58c90965f957a04dd239 /chrome/test/functional
parent29ad10c9c8e43ddab0a8a14ea04a550e8ddfad01 (diff)
downloadchromium_src-dad5753f242da16d8e72d8759303e35f320d8e95.zip
chromium_src-dad5753f242da16d8e72d8759303e35f320d8e95.tar.gz
chromium_src-dad5753f242da16d8e72d8759303e35f320d8e95.tar.bz2
Fix bug preventing pyauto suite CHROMEOS_PERF from running on ChromeOS.
A string class variable in netflix.py is named starting with the substring 'test', which is being interpreted as a test case when pauto is invoked with suite CHROMEOS_PERF (since that suite runs perf.py on ChromeOS, which in turn imports from netflix.py). This CL changes the name of that class variable to avoid this problem, and also includes a few minor, related edits. BUG=None TEST=None Review URL: http://codereview.chromium.org/8677013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111391 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/functional')
-rw-r--r--chrome/test/functional/netflix.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/chrome/test/functional/netflix.py b/chrome/test/functional/netflix.py
index 7ce1d3b..0299884 100644
--- a/chrome/test/functional/netflix.py
+++ b/chrome/test/functional/netflix.py
@@ -16,13 +16,13 @@ class NetflixTestHelper():
"""
# Netflix player states.
- is_playing = '4'
+ IS_PLAYING = '4'
- title_homepage = 'http://movies.netflix.com/WiHome'
- signout_page = 'https://account.netflix.com/Logout'
- # 30 Rock
- test_title = 'http://movies.netflix.com/WiPlayer?'+ \
- 'movieid=70136124&trkid=2361637&t=30+Rock'
+ TITLE_HOMEPAGE = 'http://movies.netflix.com/WiHome'
+ SIGNOUT_PAGE = 'https://account.netflix.com/Logout'
+ # 30 Rock.
+ VIDEO_URL = 'http://movies.netflix.com/WiPlayer?' + \
+ 'movieid=70136124&trkid=2361637&t=30+Rock'
_pyauto = None
def __init__(self, pyauto):
@@ -97,7 +97,7 @@ class NetflixTestHelper():
def _SignOut(self):
"""Sing out from Netflix Login."""
- self._pyauto.NavigateToURL(self._pyauto.signout_page)
+ self._pyauto.NavigateToURL(self.SIGNOUT_PAGE)
def _LoginAndStartPlaying(self):
"""Login and start playing the video."""
@@ -106,15 +106,15 @@ class NetflixTestHelper():
self._pyauto._LoginToNetflix()
self._pyauto.assertTrue(self._pyauto.WaitUntil(
lambda:self._pyauto.GetActiveTabURL().spec(),
- expect_retval=self._pyauto.title_homepage),
+ expect_retval=self.TITLE_HOMEPAGE),
msg='Login to Netflix failed.')
- self._pyauto.NavigateToURL(self._pyauto.test_title)
+ self._pyauto.NavigateToURL(self.VIDEO_URL)
self._pyauto._HandleInfobars()
self._pyauto.assertTrue(self._pyauto.WaitUntil(
lambda: self._pyauto.ExecuteJavascript("""
player_status = nrdp.video.readyState;
window.domAutomationController.send(player_status + '');
- """), expect_retval=self._pyauto.is_playing),
+ """), expect_retval=self.IS_PLAYING),
msg='Player did not start playing the title.')
class NetflixTest(pyauto.PyUITest, NetflixTestHelper):