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

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

Issue 1738563002: Remove //tools/profile_chrome from Chromium repo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
(Empty)
1 # Copyright 2014 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_controller
9 from profile_chrome import controllers_unittest
10
11
12 class ChromeControllerTest(controllers_unittest.BaseControllerTest):
13 def testGetCategories(self):
14 categories = \
15 chrome_controller.ChromeTracingController.GetCategories(
16 self.device, self.package_info)
17
18 self.assertEquals(len(categories), 2)
19 self.assertTrue(categories[0])
20 self.assertTrue(categories[1])
21
22 def testTracing(self):
23 categories = '*'
24 ring_buffer = False
25 controller = chrome_controller.ChromeTracingController(self.device,
26 self.package_info,
27 categories,
28 ring_buffer)
29
30 interval = 1
31 try:
32 controller.StartTracing(interval)
33 finally:
34 controller.StopTracing()
35
36 result = controller.PullTrace()
37 try:
38 with open(result) as f:
39 json.loads(f.read())
40 finally:
41 os.remove(result)
OLDNEW
« no previous file with comments | « tools/profile_chrome/chrome_controller.py ('k') | tools/profile_chrome/chrome_startup_controller.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698