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

Unified Diff: tools/telemetry/telemetry/unittest/tab_test_case.py

Issue 151003003: Fix navigation to unittest files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert changes in memory_cache_http_unittest.py Created 6 years, 10 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
« no previous file with comments | « tools/telemetry/telemetry/unittest/navigate_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/unittest/tab_test_case.py
diff --git a/tools/telemetry/telemetry/unittest/tab_test_case.py b/tools/telemetry/telemetry/unittest/tab_test_case.py
index a3e3278371b62e05fc0c0fe8281e6e2101b50abe..054d3de4a8e1fe605c08d6302f1e631f7af4a51b 100644
--- a/tools/telemetry/telemetry/unittest/tab_test_case.py
+++ b/tools/telemetry/telemetry/unittest/tab_test_case.py
@@ -4,11 +4,13 @@
import unittest
from telemetry.core import browser_finder
+from telemetry.unittest import navigate_test
from telemetry.unittest import options_for_unittests
class TabTestCase(unittest.TestCase):
def __init__(self, *args):
self._extra_browser_args = []
+ self.test_file_path = None
super(TabTestCase, self).__init__(*args)
def setUp(self):
@@ -44,3 +46,11 @@ class TabTestCase(unittest.TestCase):
def CustomizeBrowserOptions(self, options):
"""Override to add test-specific options to the BrowserOptions object"""
pass
+
+ def Navigate(self, filename, script_to_evaluate_on_commit=None):
+ """Navigates |tab| to |filename| in the unittest data directory.
+
+ Also sets up http server to point to the unittest data directory.
+ """
+ self.test_file_path = navigate_test.NavigateToTestFile(
+ self._tab, filename, script_to_evaluate_on_commit)
« no previous file with comments | « tools/telemetry/telemetry/unittest/navigate_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698