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

Side by Side Diff: tools/telemetry/telemetry/internal/actions/seek_unittest.py

Issue 1056133003: Move page/actions to internal/actions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add copyright header. Created 5 years, 8 months 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 unified diff | Download patch
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from telemetry.core import exceptions 5 from telemetry.core import exceptions
6 from telemetry import decorators 6 from telemetry import decorators
7 from telemetry.page.actions import seek 7 from telemetry.internal.actions import seek
8 from telemetry.unittest_util import tab_test_case 8 from telemetry.unittest_util import tab_test_case
9 9
10 AUDIO_1_SEEKED_CHECK = 'window.__hasEventCompleted("#audio_1", "seeked");' 10 AUDIO_1_SEEKED_CHECK = 'window.__hasEventCompleted("#audio_1", "seeked");'
11 VIDEO_1_SEEKED_CHECK = 'window.__hasEventCompleted("#video_1", "seeked");' 11 VIDEO_1_SEEKED_CHECK = 'window.__hasEventCompleted("#video_1", "seeked");'
12 12
13 13
14 class SeekActionTest(tab_test_case.TabTestCase): 14 class SeekActionTest(tab_test_case.TabTestCase):
15 15
16 def setUp(self): 16 def setUp(self):
17 tab_test_case.TabTestCase.setUp(self) 17 tab_test_case.TabTestCase.setUp(self)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 @decorators.Disabled('linux') # crbug.com/418577 58 @decorators.Disabled('linux') # crbug.com/418577
59 def testSeekWaitForSeekTimeout(self): 59 def testSeekWaitForSeekTimeout(self):
60 """Tests that wait_for_seeked timeouts if video does not seek.""" 60 """Tests that wait_for_seeked timeouts if video does not seek."""
61 action = seek.SeekAction(seconds=1, selector='#video_1', 61 action = seek.SeekAction(seconds=1, selector='#video_1',
62 timeout_in_seconds=0.1) 62 timeout_in_seconds=0.1)
63 action.WillRunAction(self._tab) 63 action.WillRunAction(self._tab)
64 self._tab.EvaluateJavaScript('document.getElementById("video_1").src = ""') 64 self._tab.EvaluateJavaScript('document.getElementById("video_1").src = ""')
65 self.assertFalse(self._tab.EvaluateJavaScript(VIDEO_1_SEEKED_CHECK)) 65 self.assertFalse(self._tab.EvaluateJavaScript(VIDEO_1_SEEKED_CHECK))
66 self.assertRaises(exceptions.TimeoutException, action.RunAction, self._tab) 66 self.assertRaises(exceptions.TimeoutException, action.RunAction, self._tab)
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/internal/actions/seek.py ('k') | tools/telemetry/telemetry/internal/actions/swipe.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698