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

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

Issue 445793004: Fix import order with isort tool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 4 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 util 5 from telemetry.core import util
6 from telemetry.page.actions import seek 6 from telemetry.page.actions import seek
7 from telemetry.unittest import tab_test_case 7 from telemetry.unittest import tab_test_case
8 8
9
10 AUDIO_1_SEEKED_CHECK = 'window.__hasEventCompleted("#audio_1", "seeked");' 9 AUDIO_1_SEEKED_CHECK = 'window.__hasEventCompleted("#audio_1", "seeked");'
11 VIDEO_1_SEEKED_CHECK = 'window.__hasEventCompleted("#video_1", "seeked");' 10 VIDEO_1_SEEKED_CHECK = 'window.__hasEventCompleted("#video_1", "seeked");'
12 11
13 12
14 class SeekActionTest(tab_test_case.TabTestCase): 13 class SeekActionTest(tab_test_case.TabTestCase):
15 14
16 def setUp(self): 15 def setUp(self):
17 tab_test_case.TabTestCase.setUp(self) 16 tab_test_case.TabTestCase.setUp(self)
18 self.Navigate('video_test.html') 17 self.Navigate('video_test.html')
19 18
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 self.assertTrue(self._tab.EvaluateJavaScript(AUDIO_1_SEEKED_CHECK)) 52 self.assertTrue(self._tab.EvaluateJavaScript(AUDIO_1_SEEKED_CHECK))
54 53
55 def testSeekWaitForSeekTimeout(self): 54 def testSeekWaitForSeekTimeout(self):
56 """Tests that wait_for_seeked timeouts if video does not seek.""" 55 """Tests that wait_for_seeked timeouts if video does not seek."""
57 action = seek.SeekAction(seconds=1, selector='#video_1', 56 action = seek.SeekAction(seconds=1, selector='#video_1',
58 timeout_in_seconds=1) 57 timeout_in_seconds=1)
59 action.WillRunAction(self._tab) 58 action.WillRunAction(self._tab)
60 self._tab.EvaluateJavaScript('document.getElementById("video_1").src = ""') 59 self._tab.EvaluateJavaScript('document.getElementById("video_1").src = ""')
61 self.assertFalse(self._tab.EvaluateJavaScript(VIDEO_1_SEEKED_CHECK)) 60 self.assertFalse(self._tab.EvaluateJavaScript(VIDEO_1_SEEKED_CHECK))
62 self.assertRaises(util.TimeoutException, action.RunAction, self._tab) 61 self.assertRaises(util.TimeoutException, action.RunAction, self._tab)
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/page/actions/scroll_bounce.py ('k') | tools/telemetry/telemetry/page/actions/swipe.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698