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

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/port/android_unittest.py

Issue 458643003: Remove serial test support from test-webkitpy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (C) 2012 Google Inc. All rights reserved. 1 # Copyright (C) 2012 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 android.AndroidCommands._adb_command_path = None 116 android.AndroidCommands._adb_command_path = None
117 android.AndroidCommands._adb_command_path_options = ['adb'] 117 android.AndroidCommands._adb_command_path_options = ['adb']
118 118
119 def make_executive(self, device_count): 119 def make_executive(self, device_count):
120 self._mock_executive = MockAndroidDebugBridge(device_count) 120 self._mock_executive = MockAndroidDebugBridge(device_count)
121 return MockExecutive2(run_command_fn=self._mock_executive.run_command) 121 return MockExecutive2(run_command_fn=self._mock_executive.run_command)
122 122
123 def make_android_commands(self, device_count, serial): 123 def make_android_commands(self, device_count, serial):
124 return android.AndroidCommands(self.make_executive(device_count), serial , debug_logging=False) 124 return android.AndroidCommands(self.make_executive(device_count), serial , debug_logging=False)
125 125
126 # The "adb" binary with the latest version should be used.
127 def serial_test_adb_command_path(self):
Dirk Pranke 2014/08/09 00:00:11 This test has unpleasant side effects and is testi
128 executive = self.make_executive(0)
129
130 android.AndroidCommands.set_adb_command_path_options(['path1', 'path2', 'path3'])
131 self.assertEqual('path2', android.AndroidCommands.adb_command_path(execu tive, debug_logging=False))
132
133 # The used adb command should include the device's serial number, and get_se rial() should reflect this. 126 # The used adb command should include the device's serial number, and get_se rial() should reflect this.
134 def test_adb_command_and_get_serial(self): 127 def test_adb_command_and_get_serial(self):
135 android_commands = self.make_android_commands(1, '123456789ABCDEF0') 128 android_commands = self.make_android_commands(1, '123456789ABCDEF0')
136 self.assertEquals(['adb', '-s', '123456789ABCDEF0'], android_commands.ad b_command()) 129 self.assertEquals(['adb', '-s', '123456789ABCDEF0'], android_commands.ad b_command())
137 self.assertEquals('123456789ABCDEF0', android_commands.get_serial()) 130 self.assertEquals('123456789ABCDEF0', android_commands.get_serial())
138 131
139 # Running an adb command should return the command's output. 132 # Running an adb command should return the command's output.
140 def test_run_command(self): 133 def test_run_command(self):
141 android_commands = self.make_android_commands(1, '123456789ABCDEF0') 134 android_commands = self.make_android_commands(1, '123456789ABCDEF0')
142 135
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 # Tests that valid tombstone listings will return the contents of the most r ecent file. 311 # Tests that valid tombstone listings will return the contents of the most r ecent file.
319 def test_read_valid_tombstone_file(self): 312 def test_read_valid_tombstone_file(self):
320 self._mock_adb.set_tombstone_output('-rw------- 1000 1000 3604 2013-11-1 9 16:15 tombstone_00\n' + 313 self._mock_adb.set_tombstone_output('-rw------- 1000 1000 3604 2013-11-1 9 16:15 tombstone_00\n' +
321 '-rw------- 1000 1000 3604 2013-11-1 9 16:16 tombstone_10\n' + 314 '-rw------- 1000 1000 3604 2013-11-1 9 16:16 tombstone_10\n' +
322 '-rw------- 1000 1000 3604 2013-11-1 9 16:15 tombstone_02') 315 '-rw------- 1000 1000 3604 2013-11-1 9 16:15 tombstone_02')
323 stacktrace = self._driver._get_last_stacktrace() 316 stacktrace = self._driver._get_last_stacktrace()
324 317
325 self.assertEqual(0, len(self._warnings)) 318 self.assertEqual(0, len(self._warnings))
326 self.assertEqual(0, len(self._errors)) 319 self.assertEqual(0, len(self._errors))
327 self.assertEqual(ChromiumAndroidDriverTombstoneTest.EXPECTED_STACKTRACE, stacktrace) 320 self.assertEqual(ChromiumAndroidDriverTombstoneTest.EXPECTED_STACKTRACE, stacktrace)
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/common/system/executive_unittest.py ('k') | Tools/Scripts/webkitpy/test/main.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698