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

Unified Diff: tools/telemetry/telemetry/core/tab_unittest.py

Issue 22989006: [telemetry] Change many relative paths to use util.Get*Dir(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/core/tab_unittest.py
diff --git a/tools/telemetry/telemetry/core/tab_unittest.py b/tools/telemetry/telemetry/core/tab_unittest.py
index 156c935a7879887b6711b1dfc1aff710d94cb234..7c356bfd5704d1494b93750d4efa28e528fe7e49 100644
--- a/tools/telemetry/telemetry/core/tab_unittest.py
+++ b/tools/telemetry/telemetry/core/tab_unittest.py
@@ -1,8 +1,8 @@
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+
import logging
-import os
import time
from telemetry.core import util
@@ -19,16 +19,12 @@ def _IsDocumentVisible(tab):
class TabTest(tab_test_case.TabTestCase):
def testNavigateAndWaitToForCompleteState(self):
- unittest_data_dir = os.path.join(os.path.dirname(__file__),
- '..', '..', 'unittest_data')
- self._browser.SetHTTPServerDirectories(unittest_data_dir)
+ self._browser.SetHTTPServerDirectories(util.GetUnittestDataDir())
self._tab.Navigate(self._browser.http_server.UrlOf('blank.html'))
self._tab.WaitForDocumentReadyStateToBeComplete()
def testNavigateAndWaitToForInteractiveState(self):
- unittest_data_dir = os.path.join(os.path.dirname(__file__),
- '..', '..', 'unittest_data')
- self._browser.SetHTTPServerDirectories(unittest_data_dir)
+ self._browser.SetHTTPServerDirectories(util.GetUnittestDataDir())
self._tab.Navigate(self._browser.http_server.UrlOf('blank.html'))
self._tab.WaitForDocumentReadyStateToBeInteractiveOrBetter()
@@ -64,9 +60,7 @@ class GpuTabTest(tab_test_case.TabTestCase):
logging.warning('Browser does not support screenshots, skipping test.')
return
- unittest_data_dir = os.path.join(os.path.dirname(__file__),
- '..', '..', 'unittest_data')
- self._browser.SetHTTPServerDirectories(unittest_data_dir)
+ self._browser.SetHTTPServerDirectories(util.GetUnittestDataDir())
self._tab.Navigate(
self._browser.http_server.UrlOf('green_rect.html'))
self._tab.WaitForDocumentReadyStateToBeComplete()
« no previous file with comments | « tools/telemetry/telemetry/core/profile_types.py ('k') | tools/telemetry/telemetry/core/temporary_http_server_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698