Index: functional/youtube.py |
=================================================================== |
--- functional/youtube.py (revision 112101) |
+++ functional/youtube.py (working copy) |
@@ -121,11 +121,15 @@ |
expect_retval=self._pyauto.is_playing), |
msg='Player did not enter the playing state') |
- def PlayVideoAndAssert(self): |
- """Start video and assert the playing state.""" |
+ def PlayVideoAndAssert(self, youtube_video='zuzaxlddWbk'): |
+ """Start video and assert the playing state. |
+ |
+ By default test uses http://www.youtube.com/watch?v=zuzaxlddWbki . |
dennis_jeffrey
2011/12/01 02:44:56
remove the space right before the '.' at the end o
rohitbm
2011/12/03 02:20:58
Done.
|
+ """ |
dennis_jeffrey
2011/12/01 02:44:56
Add an "Args:" section to this docstring:
Args:
rohitbm
2011/12/03 02:20:58
Done.
|
self._pyauto.assertTrue(self._pyauto.IsFlashPluginEnabled(), |
msg='From here Flash plugin is disabled or not available') |
- url = self._pyauto.GetHttpURLForDataPath('media', 'youtube.html') |
+ url = self._pyauto.GetHttpURLForDataPath('media', |
+ 'youtube.html?video=' + youtube_video) |
dennis_jeffrey
2011/12/01 02:44:56
move both parameters to the second line:
url = se
rohitbm
2011/12/03 02:20:58
Done.
|
self._pyauto.NavigateToURL(url) |
self._pyauto.assertTrue(self._pyauto.WaitUntilPlayerReady(), |
msg='Failed to load YouTube player') |