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

Side by Side Diff: tools/telemetry/telemetry/page/actions/navigate_unittest.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 unified diff | Download patch
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 from telemetry.core import util
6 from telemetry.page import page as page_module 5 from telemetry.page import page as page_module
7 from telemetry.page.actions import navigate 6 from telemetry.page.actions import navigate
8 from telemetry.unittest import tab_test_case 7 from telemetry.unittest import tab_test_case
9 from telemetry.unittest import test
10 8
11 9
12 class NavigateActionTest(tab_test_case.TabTestCase): 10 class NavigateActionTest(tab_test_case.TabTestCase):
13 def CreatePageFromUnittestDataDir(self, filename): 11 def CreatePageFromUnittestDataDir(self, filename):
14 self._browser.SetHTTPServerDirectories(util.GetUnittestDataDir()) 12 self.Navigate(filename)
15 return page_module.Page( 13 return page_module.Page(
16 self._browser.http_server.UrlOf(filename), 14 self._browser.http_server.UrlOf(self.test_file_path),
17 None # In this test, we don't need a page set. 15 None # In this test, we don't need a page set.
18 ) 16 )
19 17
20 @test.Disabled('chromeos')
21 def testNavigateAction(self): 18 def testNavigateAction(self):
22 self._browser.SetHTTPServerDirectories(util.GetUnittestDataDir())
23
24 page = self.CreatePageFromUnittestDataDir('blank.html') 19 page = self.CreatePageFromUnittestDataDir('blank.html')
25 i = navigate.NavigateAction() 20 i = navigate.NavigateAction()
26 i.RunAction(page, self._tab, None) 21 i.RunAction(page, self._tab, None)
27 self.assertEquals( 22 self.assertEquals(
28 self._tab.EvaluateJavaScript('document.location.pathname;'), 23 self._tab.EvaluateJavaScript('document.location.pathname;'),
29 '/blank.html') 24 '/blank.html')
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/page/actions/loop_unittest.py ('k') | tools/telemetry/telemetry/page/actions/play_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698