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

Side by Side Diff: tools/telemetry/telemetry/page/page_set_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 tempfile 5 import tempfile
6 import unittest 6 import unittest
7 7
8 from telemetry import page_set 8 from telemetry.page import page_set
9 9
10 simple_archive_info = """ 10 simple_archive_info = """
11 { 11 {
12 "archives": { 12 "archives": {
13 "data_01.wpr": ["http://www.foo.com/"], 13 "data_01.wpr": ["http://www.foo.com/"],
14 "data_02.wpr": ["http://www.bar.com/"] 14 "data_02.wpr": ["http://www.bar.com/"]
15 } 15 }
16 } 16 }
17 """ 17 """
18 18
(...skipping 19 matching lines...) Expand all
38 f2.flush() 38 f2.flush()
39 ps = page_set.PageSet.FromFile(f2.name) 39 ps = page_set.PageSet.FromFile(f2.name)
40 40
41 self.assertEquals('hello', ps.description) 41 self.assertEquals('hello', ps.description)
42 self.assertEquals(archive_data_file, ps.archive_data_file) 42 self.assertEquals(archive_data_file, ps.archive_data_file)
43 self.assertEquals(2, len(ps.pages)) 43 self.assertEquals(2, len(ps.pages))
44 self.assertEquals('http://www.foo.com/', ps.pages[0].url) 44 self.assertEquals('http://www.foo.com/', ps.pages[0].url)
45 self.assertEquals('http://www.bar.com/', ps.pages[1].url) 45 self.assertEquals('http://www.bar.com/', ps.pages[1].url)
46 self.assertEquals('data_01.wpr', os.path.basename(ps.pages[0].archive_path)) 46 self.assertEquals('data_01.wpr', os.path.basename(ps.pages[0].archive_path))
47 self.assertEquals('data_02.wpr', os.path.basename(ps.pages[1].archive_path)) 47 self.assertEquals('data_02.wpr', os.path.basename(ps.pages[1].archive_path))
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/page/page_set_archive_info_unittest.py ('k') | tools/telemetry/telemetry/page/page_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698