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

Side by Side Diff: tools/telemetry/telemetry/internal/backends/android_command_line_backend_unittest.py

Issue 1314313004: [Android][telemetry] Update pylib imports for modules that moved into devil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
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 import logging 5 import logging
6 import unittest 6 import unittest
7 7
8 from telemetry import decorators 8 from telemetry import decorators
9 from telemetry.internal.backends import android_command_line_backend 9 from telemetry.internal.backends import android_command_line_backend
10 from telemetry.testing import options_for_unittests 10 from telemetry.testing import options_for_unittests
11 11
12 from pylib.device import device_utils 12 from devil.android import device_utils
13 13
14 14
15 class _MockBackendSettings(object): 15 class _MockBackendSettings(object):
16 pseudo_exec_name = 'chrome' 16 pseudo_exec_name = 'chrome'
17 17
18 def __init__(self, path): 18 def __init__(self, path):
19 self._path = path 19 self._path = path
20 20
21 def GetCommandLineFile(self, _): 21 def GetCommandLineFile(self, _):
22 return self._path 22 return self._path
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 return 94 return
95 cmd_file = '/data/local/tmp/test_cmd' 95 cmd_file = '/data/local/tmp/test_cmd'
96 backend_settings = _MockBackendSettings(cmd_file) 96 backend_settings = _MockBackendSettings(cmd_file)
97 startup_args = ['--some', '--test', '--args'] 97 startup_args = ['--some', '--test', '--args']
98 device.RunShellCommand(['rm', '-f', cmd_file], check_return=True) 98 device.RunShellCommand(['rm', '-f', cmd_file], check_return=True)
99 with android_command_line_backend.SetUpCommandLineFlags( 99 with android_command_line_backend.SetUpCommandLineFlags(
100 device, backend_settings, startup_args): 100 device, backend_settings, startup_args):
101 self.assertEqual('chrome --some --test --args', 101 self.assertEqual('chrome --some --test --args',
102 device.ReadFile(cmd_file).strip()) 102 device.ReadFile(cmd_file).strip())
103 self.assertFalse(device.FileExists(cmd_file)) 103 self.assertFalse(device.FileExists(cmd_file))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698