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

Side by Side Diff: tools/profile_chrome/chrome_startup_controller_unittest.py

Issue 879853002: Add a --startup option to generate combined traces for startup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Typo. Created 5 years, 11 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
(Empty)
1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import os
6 import json
7
8 from profile_chrome import chrome_startup_controller
9 from profile_chrome import controllers_unittest
10
11
12 class ChromeControllerTest(controllers_unittest.BaseControllerTest):
13 def testTracing(self):
14 categories = '*'
Sami 2015/01/28 09:21:49 These two seem to be unused?
Benoit L 2015/01/28 12:56:57 Done.
15 ring_buffer = False
16 controller = chrome_startup_controller.ChromeStartupTracingController(
17 self.device, self.package_info, False, "https://www.google.com")
Sami 2015/01/28 09:21:49 nit: single quotes please.
Benoit L 2015/01/28 12:56:57 Done.
18
19 interval = 1
20 try:
21 controller.StartTracing(interval)
22 finally:
23 controller.StopTracing()
24
25 result = controller.PullTrace()
26 try:
27 with open(result) as f:
28 json.loads(f.read())
29 finally:
30 os.remove(result)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698