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

Side by Side Diff: tools/telemetry/telemetry/page/page_set_archive_info_unittest.py

Issue 12278015: [Telemetry] Reorganize everything. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-add shebangs. Created 7 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 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 import os 4 import os
5 import shutil 5 import shutil
6 import tempfile 6 import tempfile
7 import unittest 7 import unittest
8 8
9 from telemetry import page_set_archive_info 9 from telemetry.page import page_set_archive_info
10 10
11 class MockPage(object): 11 class MockPage(object):
12 def __init__(self, url): 12 def __init__(self, url):
13 self.url = url 13 self.url = url
14 14
15 url1 = 'http://www.foo.com/' 15 url1 = 'http://www.foo.com/'
16 url2 = 'http://www.bar.com/' 16 url2 = 'http://www.bar.com/'
17 url3 = 'http://www.baz.com/' 17 url3 = 'http://www.baz.com/'
18 recording1 = 'data_001.wpr' 18 recording1 = 'data_001.wpr'
19 recording2 = 'data_002.wpr' 19 recording2 = 'data_002.wpr'
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 self.assertTrue(os.path.exists(os.path.join(self.tmp_dir, new_recording))) 137 self.assertTrue(os.path.exists(os.path.join(self.tmp_dir, new_recording)))
138 self.assertFalse(os.path.exists( 138 self.assertFalse(os.path.exists(
139 os.path.join(self.tmp_dir, new_temp_recording))) 139 os.path.join(self.tmp_dir, new_temp_recording)))
140 140
141 # Check that the archive info was written correctly. 141 # Check that the archive info was written correctly.
142 self.assertTrue(os.path.exists(self.page_set_archive_info_file)) 142 self.assertTrue(os.path.exists(self.page_set_archive_info_file))
143 read_archive_info = page_set_archive_info.PageSetArchiveInfo.FromFile( 143 read_archive_info = page_set_archive_info.PageSetArchiveInfo.FromFile(
144 self.page_set_archive_info_file, '/tmp/pageset.json') 144 self.page_set_archive_info_file, '/tmp/pageset.json')
145 self.assertEquals(new_recording, 145 self.assertEquals(new_recording,
146 read_archive_info.WprFilePathForPage(page1)) 146 read_archive_info.WprFilePathForPage(page1))
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/page/page_set_archive_info.py ('k') | tools/telemetry/telemetry/page/page_set_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698