Revert of Reland of crrev.com/1100173002 (Add a WinHeap dump provider to the memory...
[chromium-blink-merge.git] / tools / profile_chrome / chrome_startup_controller_unittest.py
blob8d2d743583918df97ade8fd4354968f5df32be60
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.
5 import os
6 import json
8 from profile_chrome import chrome_startup_controller
9 from profile_chrome import controllers_unittest
12 class ChromeControllerTest(controllers_unittest.BaseControllerTest):
13 def testTracing(self):
14 controller = chrome_startup_controller.ChromeStartupTracingController(
15 self.device, self.package_info, False, 'https://www.google.com')
17 interval = 1
18 try:
19 controller.StartTracing(interval)
20 finally:
21 controller.StopTracing()
23 result = controller.PullTrace()
24 try:
25 with open(result) as f:
26 json.loads(f.read())
27 finally:
28 os.remove(result)