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

Unified Diff: telemetry/telemetry/internal/actions/play_unittest.py

Issue 2453073002: [Telemetry] Move from telemetry WaitFor to py_utils WaitFor (Closed)
Patch Set: [Telemetry] Move from telemetry WaitFor to py_utils WaitFor Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: telemetry/telemetry/internal/actions/play_unittest.py
diff --git a/telemetry/telemetry/internal/actions/play_unittest.py b/telemetry/telemetry/internal/actions/play_unittest.py
index 20bf8d2caef9d69c8716fdcaef53fae385f5b616..c497cf9915c91335ad64bbb89b940ae241cc1a31 100644
--- a/telemetry/telemetry/internal/actions/play_unittest.py
+++ b/telemetry/telemetry/internal/actions/play_unittest.py
@@ -2,11 +2,13 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-from telemetry.core import exceptions
from telemetry import decorators
from telemetry.internal.actions import play
from telemetry.testing import tab_test_case
+import py_utils
+
+
AUDIO_1_PLAYING_CHECK = 'window.__hasEventCompleted("#audio_1", "playing");'
VIDEO_1_PLAYING_CHECK = 'window.__hasEventCompleted("#video_1", "playing");'
VIDEO_1_ENDED_CHECK = 'window.__hasEventCompleted("#video_1", "ended");'
@@ -68,7 +70,7 @@ class PlayActionTest(tab_test_case.TabTestCase):
action.WillRunAction(self._tab)
self._tab.EvaluateJavaScript('document.getElementById("video_1").src = ""')
self.assertFalse(self._tab.EvaluateJavaScript(VIDEO_1_PLAYING_CHECK))
- self.assertRaises(exceptions.TimeoutException, action.RunAction, self._tab)
+ self.assertRaises(py_utils.TimeoutException, action.RunAction, self._tab)
@decorators.Disabled('android', 'linux') # crbug.com/418577
def testPlayWaitForEnded(self):
@@ -105,6 +107,6 @@ class PlayActionTest(tab_test_case.TabTestCase):
# Assert video not playing before running action.
self.assertFalse(self._tab.EvaluateJavaScript(VIDEO_1_PLAYING_CHECK))
self.assertFalse(self._tab.EvaluateJavaScript(VIDEO_1_ENDED_CHECK))
- self.assertRaises(exceptions.TimeoutException, action.RunAction, self._tab)
+ self.assertRaises(py_utils.TimeoutException, action.RunAction, self._tab)
# Assert video did not end.
self.assertFalse(self._tab.EvaluateJavaScript(VIDEO_1_ENDED_CHECK))
« no previous file with comments | « telemetry/telemetry/internal/actions/media_action.py ('k') | telemetry/telemetry/internal/actions/repaint_continuously.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698