From 851a213733669cf42f38b5b1dc406496fe36cce6 Mon Sep 17 00:00:00 2001 From: "nirnimesh@chromium.org" Date: Sat, 15 Oct 2011 07:45:41 +0000 Subject: Fix pyauto functional tests on chromeos When the unittest module loads TestCases, it loads all attributes that begin with 'test', even the ones that are not functions. Fix it. Also, private member vars should be prefixed by _. TBR=rohitbm@chromium.org R=rohitbm@chromium.org BUG= TEST=desktopui_PyAutoFunctionalTests runs on chromeos Review URL: http://codereview.chromium.org/8302022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105650 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/test/functional/netflix.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'chrome/test') diff --git a/chrome/test/functional/netflix.py b/chrome/test/functional/netflix.py index 6ef720f..ca57b2a 100644 --- a/chrome/test/functional/netflix.py +++ b/chrome/test/functional/netflix.py @@ -13,12 +13,12 @@ class NetflixTest(pyauto.PyUITest): """Test case for Netflix player""" # Netflix player states - is_playing = '4' + _is_playing = '4' - title_homepage = 'http://movies.netflix.com/WiHome' - signout_page = 'https://account.netflix.com/Logout' + _title_homepage = 'http://movies.netflix.com/WiHome' + _signout_page = 'https://account.netflix.com/Logout' # 30 Rock - test_title = 'http://movies.netflix.com/WiPlayer?'+ \ + _test_title = 'http://movies.netflix.com/WiPlayer?'+ \ 'movieid=70136124&trkid=2361637&t=30+Rock' def tearDown(self): @@ -72,7 +72,7 @@ class NetflixTest(pyauto.PyUITest): def _SignOut(self): """Sing out from Netflix Login""" - self.NavigateToURL(self.signout_page) + self.NavigateToURL(self._signout_page) def _LoginAndStartPlaying(self): """Login and start playing the video""" @@ -81,15 +81,15 @@ class NetflixTest(pyauto.PyUITest): self._LoginToNetflix() self.assertTrue(self.WaitUntil( lambda:self.GetActiveTabURL().spec(), - expect_retval=self.title_homepage), + expect_retval=self._title_homepage), msg='Login to Netflix failed') - self.NavigateToURL(self.test_title) + self.NavigateToURL(self._test_title) self._HandleInfobars() self.assertTrue(self.WaitUntil( lambda: self.ExecuteJavascript(""" player_status = nrdp.video.readyState; window.domAutomationController.send(player_status + ''); - """), expect_retval=self.is_playing), + """), expect_retval=self._is_playing), msg='Player did not start playing the title') def testPlayerLoadsAndPlays(self): -- cgit v1.1