| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright 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 | 4 |
| 5 import os | 5 import os |
| 6 import unittest | 6 import unittest |
| 7 | 7 |
| 8 from telemetry.core import browser_finder | 8 from telemetry.core import browser_finder |
| 9 from telemetry.core import util | 9 from telemetry.core import util |
| 10 from telemetry.unittest import options_for_unittests | 10 from telemetry.unittest import options_for_unittests |
| 11 | 11 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 def Navigate(self, filename, script_to_evaluate_on_commit=None): | 52 def Navigate(self, filename, script_to_evaluate_on_commit=None): |
| 53 """Navigates |tab| to |filename| in the unittest data directory. | 53 """Navigates |tab| to |filename| in the unittest data directory. |
| 54 | 54 |
| 55 Also sets up http server to point to the unittest data directory. | 55 Also sets up http server to point to the unittest data directory. |
| 56 """ | 56 """ |
| 57 self._browser.SetHTTPServerDirectories(util.GetUnittestDataDir()) | 57 self._browser.SetHTTPServerDirectories(util.GetUnittestDataDir()) |
| 58 self.test_file_path = os.path.join(util.GetUnittestDataDir(), filename) | 58 self.test_file_path = os.path.join(util.GetUnittestDataDir(), filename) |
| 59 self.test_url = self._browser.http_server.UrlOf(self.test_file_path) | 59 self.test_url = self._browser.http_server.UrlOf(self.test_file_path) |
| 60 self._tab.Navigate(self.test_url, script_to_evaluate_on_commit) | 60 self._tab.Navigate(self.test_url, script_to_evaluate_on_commit) |
| 61 self._tab.WaitForDocumentReadyStateToBeComplete() | 61 self._tab.WaitForDocumentReadyStateToBeComplete() |
| OLD | NEW |