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

Side by Side Diff: tools/telemetry/telemetry/unittest/tab_test_case.py

Issue 167683004: Fixes for MemoryCacheHTTPServerTest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigate
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « tools/telemetry/telemetry/unittest/navigate_test.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 import os
4 import unittest 5 import unittest
5 6
6 from telemetry.core import browser_finder 7 from telemetry.core import browser_finder
7 from telemetry.unittest import navigate_test 8 from telemetry.core import util
8 from telemetry.unittest import options_for_unittests 9 from telemetry.unittest import options_for_unittests
9 10
10 class TabTestCase(unittest.TestCase): 11 class TabTestCase(unittest.TestCase):
11 def __init__(self, *args): 12 def __init__(self, *args):
12 self._extra_browser_args = [] 13 self._extra_browser_args = []
13 self.test_file_path = None 14 self.test_file_path = None
14 super(TabTestCase, self).__init__(*args) 15 super(TabTestCase, self).__init__(*args)
15 16
16 def setUp(self): 17 def setUp(self):
17 self._browser = None 18 self._browser = None
(...skipping 25 matching lines...) Expand all
43 44
44 def CustomizeBrowserOptions(self, options): 45 def CustomizeBrowserOptions(self, options):
45 """Override to add test-specific options to the BrowserOptions object""" 46 """Override to add test-specific options to the BrowserOptions object"""
46 pass 47 pass
47 48
48 def Navigate(self, filename, script_to_evaluate_on_commit=None): 49 def Navigate(self, filename, script_to_evaluate_on_commit=None):
49 """Navigates |tab| to |filename| in the unittest data directory. 50 """Navigates |tab| to |filename| in the unittest data directory.
50 51
51 Also sets up http server to point to the unittest data directory. 52 Also sets up http server to point to the unittest data directory.
52 """ 53 """
53 self.test_file_path = navigate_test.NavigateToTestFile( 54 self._browser.SetHTTPServerDirectories(util.GetUnittestDataDir())
54 self._tab, filename, script_to_evaluate_on_commit) 55 self.test_file_path = os.path.join(util.GetUnittestDataDir(), filename)
56 self._tab.Navigate(self._browser.http_server.UrlOf(self.test_file_path),
57 script_to_evaluate_on_commit)
58 self._tab.WaitForDocumentReadyStateToBeComplete()
OLDNEW
« 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