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

Unified Diff: tools/telemetry/telemetry/page/page_unittest.py

Issue 946473002: Move base_dir to user_story_set, remove file_path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/page/page_unittest.py
diff --git a/tools/telemetry/telemetry/page/page_unittest.py b/tools/telemetry/telemetry/page/page_unittest.py
index 4a855089a29351f8b9f11317062c3ea38cf092f2..58b95a5ee41b4344d8bacb39372245d788a1710f 100644
--- a/tools/telemetry/telemetry/page/page_unittest.py
+++ b/tools/telemetry/telemetry/page/page_unittest.py
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import inspect
import os
import unittest
@@ -52,9 +53,11 @@ class TestPage(unittest.TestCase):
pages)
def testGetUrlBaseDirAndFileForUrlBaseDir(self):
- ps = page_set.PageSet(file_path='basedir/', serving_dirs=['../somedir/'])
+ base_dir = os.path.dirname(__file__)
+ file_path = os.path.dirname(base_dir) + '/otherdir/file.html'
+ ps = page_set.PageSet(file_path=base_dir, serving_dirs=['../somedir/'])
ps.AddUserStory(page.Page('file://../otherdir/file.html', ps, ps.base_dir))
- self.assertPathEqual(ps[0].file_path, 'otherdir/file.html')
+ self.assertPathEqual(ps[0].file_path, file_path)
def testDisplayUrlForHttp(self):
ps = page_set.PageSet(file_path=os.path.dirname(__file__))
« no previous file with comments | « tools/telemetry/telemetry/page/page_set.py ('k') | tools/telemetry/telemetry/unittest_util/page_set_smoke_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698