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

Side by Side Diff: tools/telemetry/telemetry/unittest/navigate_test.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
OLDNEW
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import os
6
7 from telemetry.core import util
8
9 def NavigateToTestFile(tab, filename, script_to_evaluate_on_commit=None):
10 """Navigates |tab| to |filename| in the unittest data directory.
11
12 Also sets up http server to point to the unittest data directory.
13 """
14 tab.browser.SetHTTPServerDirectories(util.GetUnittestDataDir())
15 path = os.path.join(util.GetUnittestDataDir(), filename)
16 tab.Navigate(tab.browser.http_server.UrlOf(path),
17 script_to_evaluate_on_commit)
18 tab.WaitForDocumentReadyStateToBeComplete()
19 return path
20
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698