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/perf/metrics/speedindex_unittest.py

Issue 332213003: Move telemetry/core/timeline and timeline_data to telemetry/timeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « tools/perf/metrics/network_unittest.py ('k') | tools/perf/metrics/timeline_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 # These tests access private methods in the speedindex module. 5 # These tests access private methods in the speedindex module.
6 # pylint: disable=W0212 6 # pylint: disable=W0212
7 7
8 import json 8 import json
9 import os 9 import os
10 import unittest 10 import unittest
11 11
12 from telemetry.core import bitmap 12 from telemetry.core import bitmap
13 from telemetry.core.backends.chrome import inspector_timeline_data 13 from telemetry.timeline import inspector_timeline_data
14 from telemetry.core.timeline import model 14 from telemetry.timeline import model
15 from metrics import speedindex 15 from metrics import speedindex
16 16
17 # Sample timeline data in the json format provided by devtools. 17 # Sample timeline data in the json format provided by devtools.
18 # The sample events will be used in several tests below. 18 # The sample events will be used in several tests below.
19 _TEST_DIR = os.path.join(os.path.dirname(__file__), 'unittest_data') 19 _TEST_DIR = os.path.join(os.path.dirname(__file__), 'unittest_data')
20 _SAMPLE_DATA = json.load(open(os.path.join(_TEST_DIR, 'sample_timeline.json'))) 20 _SAMPLE_DATA = json.load(open(os.path.join(_TEST_DIR, 'sample_timeline.json')))
21 _SAMPLE_TIMELINE_DATA = inspector_timeline_data.InspectorTimelineData( 21 _SAMPLE_TIMELINE_DATA = inspector_timeline_data.InspectorTimelineData(
22 _SAMPLE_DATA) 22 _SAMPLE_DATA)
23 _SAMPLE_EVENTS = model.TimelineModel( 23 _SAMPLE_EVENTS = model.TimelineModel(
24 timeline_data=_SAMPLE_TIMELINE_DATA).GetAllEvents() 24 timeline_data=_SAMPLE_TIMELINE_DATA).GetAllEvents()
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 def test2ch(self): 225 def test2ch(self):
226 # Page: http://2ch.net/ 226 # Page: http://2ch.net/
227 # This page has several paint events, including nested paint events. 227 # This page has several paint events, including nested paint events.
228 self._TestJsonTimelineExpectation( 228 self._TestJsonTimelineExpectation(
229 '2ch_repeat_timeline.json', (997, 650), 674.58) 229 '2ch_repeat_timeline.json', (997, 650), 674.58)
230 230
231 231
232 if __name__ == "__main__": 232 if __name__ == "__main__":
233 unittest.main() 233 unittest.main()
OLDNEW
« no previous file with comments | « tools/perf/metrics/network_unittest.py ('k') | tools/perf/metrics/timeline_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698