OLD | NEW |
1 # Copyright 2012 The Chromium Authors. All rights reserved. | 1 # Copyright 2012 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 """Provides stubs for os, sys and subprocess for testing | 5 """Provides stubs for os, sys and subprocess for testing |
6 | 6 |
7 This test allows one to test code that itself uses os, sys, and subprocess. | 7 This test allows one to test code that itself uses os, sys, and subprocess. |
8 """ | 8 """ |
9 | 9 |
10 import os | 10 import os |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 | 348 |
349 @staticmethod | 349 @staticmethod |
350 def expanduser(path): | 350 def expanduser(path): |
351 return os.path.expanduser(path) | 351 return os.path.expanduser(path) |
352 | 352 |
353 @staticmethod | 353 @staticmethod |
354 def dirname(path): | 354 def dirname(path): |
355 return os.path.dirname(path) | 355 return os.path.dirname(path) |
356 | 356 |
357 @staticmethod | 357 @staticmethod |
| 358 def realpath(path): |
| 359 return os.path.realpath(path) |
| 360 |
| 361 @staticmethod |
| 362 def split(path): |
| 363 return os.path.split(path) |
| 364 |
| 365 @staticmethod |
358 def splitext(path): | 366 def splitext(path): |
359 return os.path.splitext(path) | 367 return os.path.splitext(path) |
360 | 368 |
361 @staticmethod | 369 @staticmethod |
362 def splitdrive(path): | 370 def splitdrive(path): |
363 return os.path.splitdrive(path) | 371 return os.path.splitdrive(path) |
364 | 372 |
365 X_OK = os.X_OK | 373 X_OK = os.X_OK |
366 | 374 |
367 sep = os.sep | 375 sep = os.sep |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 elif device_id == 'failure': | 485 elif device_id == 'failure': |
478 raise Exception('Test exception.') | 486 raise Exception('Test exception.') |
479 | 487 |
480 def install_cert(self, overwrite_cert=False): | 488 def install_cert(self, overwrite_cert=False): |
481 pass | 489 pass |
482 | 490 |
483 class PlatformSettingsStub(object): | 491 class PlatformSettingsStub(object): |
484 @staticmethod | 492 @staticmethod |
485 def HasSniSupport(): | 493 def HasSniSupport(): |
486 return True | 494 return True |
OLD | NEW |