| Index: tools/telemetry/telemetry/page/actions/loop_unittest.py
|
| diff --git a/tools/telemetry/telemetry/page/actions/loop_unittest.py b/tools/telemetry/telemetry/page/actions/loop_unittest.py
|
| index 8a6c52dd6178c79359361bf1e41949dd2b77e525..3d8c8f632141566200cb7e0d219008aa9afdcfe2 100644
|
| --- a/tools/telemetry/telemetry/page/actions/loop_unittest.py
|
| +++ b/tools/telemetry/telemetry/page/actions/loop_unittest.py
|
| @@ -21,8 +21,7 @@ class LoopActionTest(tab_test_case.TabTestCase):
|
| @decorators.Disabled('android')
|
| def testLoopWithNoSelector(self):
|
| """Tests that with no selector Loop action loops first media element."""
|
| - data = {'selector': '#video_1', 'loop_count': 2}
|
| - action = loop.LoopAction(data)
|
| + action = loop.LoopAction(loop_count=2, selector='#video_1')
|
| action.WillRunAction(self._tab)
|
| action.RunAction(self._tab)
|
| # Assert only first video has played.
|
| @@ -32,8 +31,7 @@ class LoopActionTest(tab_test_case.TabTestCase):
|
| @decorators.Disabled('android')
|
| def testLoopWithAllSelector(self):
|
| """Tests that Loop action loops all video elements with selector='all'."""
|
| - data = {'selector': 'all', 'loop_count': 2}
|
| - action = loop.LoopAction(data)
|
| + action = loop.LoopAction(loop_count=2, selector='all')
|
| action.WillRunAction(self._tab)
|
| # Both videos not playing before running action.
|
| self.assertFalse(self._tab.EvaluateJavaScript(VIDEO_1_LOOP_CHECK))
|
| @@ -46,18 +44,8 @@ class LoopActionTest(tab_test_case.TabTestCase):
|
| @decorators.Disabled('android')
|
| def testLoopWaitForLoopTimeout(self):
|
| """Tests that wait_for_loop timeout_in_secondss if video does not loop."""
|
| - data = {'selector': '#video_1',
|
| - 'wait_timeout_in_seconds': 1,
|
| - 'loop_count': 2}
|
| - action = loop.LoopAction(data)
|
| + action = loop.LoopAction(loop_count=2, selector='#video_1',
|
| + timeout_in_seconds=1)
|
| action.WillRunAction(self._tab)
|
| self.assertFalse(self._tab.EvaluateJavaScript(VIDEO_1_LOOP_CHECK))
|
| self.assertRaises(util.TimeoutException, action.RunAction, self._tab)
|
| -
|
| - @decorators.Disabled('android')
|
| - def testLoopWithoutLoopCount(self):
|
| - """Tests that loop action fails with no loop count."""
|
| - data = {}
|
| - action = loop.LoopAction(data)
|
| - action.WillRunAction(self._tab)
|
| - self.assertRaises(AssertionError, action.RunAction, self._tab)
|
|
|