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

Unified Diff: chrome/test/functional/netflix.py

Issue 8677013: Fix bug preventing pyauto suite CHROMEOS_PERF from running on ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/netflix.py
diff --git a/chrome/test/functional/netflix.py b/chrome/test/functional/netflix.py
index 7ce1d3b29304d6e7365c0cf00ef3d491f0709aa7..0299884ce6a22c131458a9254a6dc6c543919aac 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):
« 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