/external/chromium-trace/catapult/telemetry/telemetry/testing/ |
D | simple_mock_unittest.py | 12 mock = simple_mock.MockObject() 13 mock.ExpectCall('foo') 15 mock.foo() 18 mock = simple_mock.MockObject() 19 mock.ExpectCall('foo').WillReturn(7) 21 ret = mock.foo() 25 mock = simple_mock.MockObject() 26 mock.ExpectCall('foo').WithArgs(3, 4) 28 mock.foo(3, 4) 31 mock = simple_mock.MockObject() [all …]
|
/external/gmock/test/ |
D | gmock_link_test.h | 243 Mock mock; in TEST() local 245 EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Return()); in TEST() 246 mock.VoidFromString(NULL); in TEST() 251 Mock mock; in TEST() local 254 EXPECT_CALL(mock, StringFromString(_)).WillOnce(Return(&ch)); in TEST() 255 mock.StringFromString(NULL); in TEST() 260 Mock mock; in TEST() local 262 EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Return()); in TEST() 263 mock.VoidFromString(NULL); in TEST() 268 Mock mock; in TEST() local [all …]
|
D | gmock-generated-function-mockers_test.cc | 406 MockStack<int> mock; in TEST() local 408 EXPECT_CALL(mock, GetSize()) in TEST() 412 EXPECT_CALL(mock, Push(_)); in TEST() 414 EXPECT_CALL(mock, GetTop()) in TEST() 416 EXPECT_CALL(mock, Pop()) in TEST() 419 EXPECT_EQ(0, mock.GetSize()); in TEST() 420 mock.Push(5); in TEST() 421 EXPECT_EQ(1, mock.GetSize()); in TEST() 422 EXPECT_EQ(5, mock.GetTop()); in TEST() 423 mock.Pop(); in TEST() [all …]
|
/external/google-breakpad/src/testing/test/ |
D | gmock_link_test.h | 243 Mock mock; in TEST() local 245 EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Return()); in TEST() 246 mock.VoidFromString(NULL); in TEST() 251 Mock mock; in TEST() local 254 EXPECT_CALL(mock, StringFromString(_)).WillOnce(Return(&ch)); in TEST() 255 mock.StringFromString(NULL); in TEST() 260 Mock mock; in TEST() local 262 EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Return()); in TEST() 263 mock.VoidFromString(NULL); in TEST() 268 Mock mock; in TEST() local [all …]
|
D | gmock-generated-function-mockers_test.cc | 371 MockStack<int> mock; in TEST() local 373 EXPECT_CALL(mock, GetSize()) in TEST() 377 EXPECT_CALL(mock, Push(_)); in TEST() 379 EXPECT_CALL(mock, GetTop()) in TEST() 381 EXPECT_CALL(mock, Pop()) in TEST() 384 EXPECT_EQ(0, mock.GetSize()); in TEST() 385 mock.Push(5); in TEST() 386 EXPECT_EQ(1, mock.GetSize()); in TEST() 387 EXPECT_EQ(5, mock.GetTop()); in TEST() 388 mock.Pop(); in TEST() [all …]
|
/external/guava/guava-tests/test/com/google/common/cache/ |
D | ForwardingLoadingCacheTest.java | 38 private LoadingCache<String, Boolean> mock; field in ForwardingLoadingCacheTest 48 mock = createMock(LoadingCache.class); in setUp() 51 return mock; in setUp() 57 expect(mock.get("key")).andReturn(Boolean.TRUE); in testGet() 58 replay(mock); in testGet() 60 verify(mock); in testGet() 64 expect(mock.getUnchecked("key")).andReturn(Boolean.TRUE); in testGetUnchecked() 65 replay(mock); in testGetUnchecked() 67 verify(mock); in testGetUnchecked() 71 expect(mock.getAll(ImmutableList.of("key"))).andReturn(ImmutableMap.of("key", Boolean.TRUE)); in testGetAll() [all …]
|
D | ForwardingCacheTest.java | 38 private Cache<String, Boolean> mock; field in ForwardingCacheTest 48 mock = createMock(Cache.class); in setUp() 51 return mock; in setUp() 57 expect(mock.getIfPresent("key")).andReturn(Boolean.TRUE); in testGetIfPresent() 58 replay(mock); in testGetIfPresent() 60 verify(mock); in testGetIfPresent() 64 expect(mock.getAllPresent(ImmutableList.of("key"))) in testGetAllPresent() 66 replay(mock); in testGetAllPresent() 69 verify(mock); in testGetAllPresent() 73 mock.invalidate("key"); in testInvalidate() [all …]
|
/external/chromium-trace/catapult/dashboard/dashboard/ |
D | update_bug_with_results_test.py | 10 import mock 148 @mock.patch('apiclient.discovery.build', mock.MagicMock()) 149 @mock.patch.object(utils, 'TickMonitoringCustomMetric', mock.MagicMock()) 180 @mock.patch( 182 mock.MagicMock(side_effect=_MockFetch)) 183 @mock.patch.object( 185 mock.MagicMock()) 211 @mock.patch( 213 mock.MagicMock(side_effect=_MockFetch)) 214 @mock.patch.object( [all …]
|
D | file_bug_test.py | 8 import mock 62 file_bug.issue_tracker_service = mock.MagicMock() 136 @mock.patch( 138 mock.MagicMock(return_value='chromeperf.appspot.com')) 139 @mock.patch.object( 141 mock.MagicMock(return_value={'issue_id': 123, 'issue_url': 'foo.com'})) 158 @mock.patch.object( 160 mock.MagicMock(return_value=[])) 161 @mock.patch.object( 163 mock.MagicMock(return_value={'issue_id': 123, 'issue_url': 'foo.com'})) [all …]
|
D | buildbucket_service_test.py | 9 import mock 61 @mock.patch('oauth2client.client.SignedJwtAssertionCredentials', 62 mock.MagicMock()) 63 @mock.patch('httplib2.Http', mock.MagicMock()) 67 with mock.patch('apiclient.discovery.build', mock.MagicMock( 82 @mock.patch('oauth2client.client.SignedJwtAssertionCredentials', 83 mock.MagicMock()) 84 @mock.patch('httplib2.Http', mock.MagicMock()) 88 with mock.patch('apiclient.discovery.build', mock.MagicMock(
|
D | issue_tracker_service_test.py | 6 import mock 15 @mock.patch('issue_tracker_service.discovery.build', mock.MagicMock()) 20 service._MakeCommentRequest = mock.Mock() 28 service._MakeCommentRequest = mock.Mock() 34 service._MakeCommentRequest = mock.Mock() 52 service._MakeCommentRequest = mock.Mock() 65 @mock.patch('logging.error') 68 service._ExecuteRequest = mock.Mock(return_value=None) 75 service._ExecuteRequest = mock.Mock(return_value={'id': 333}) 82 service._ExecuteRequest = mock.Mock(return_value={}) [all …]
|
/external/libchrome/base/ |
D | gmock_unittest.cc | 68 MockSampleClass mock; in TEST() local 70 EXPECT_CALL(mock, ReturnSomething()) in TEST() 74 EXPECT_EQ(1, mock.ReturnSomething()); in TEST() 75 EXPECT_EQ(2, mock.ReturnSomething()); in TEST() 76 EXPECT_EQ(3, mock.ReturnSomething()); in TEST() 78 EXPECT_CALL(mock, ReturnNothingConstly()).Times(2); in TEST() 79 mock.ReturnNothingConstly(); in TEST() 80 mock.ReturnNothingConstly(); in TEST() 85 MockSampleClass mock; in TEST() local 87 EXPECT_CALL(mock, OutputParam(_)) in TEST() [all …]
|
/external/mockito/src/org/mockito/internal/util/ |
D | MockUtil.java | 14 import org.mockito.mock.MockCreationSettings; 15 import org.mockito.mock.MockName; 32 T mock = mockMaker.createMock(settings, mockHandler); in createMock() local 36 new LenientCopyTool().copyToMock(spiedInstance, mock); in createMock() 39 return mock; in createMock() 42 public <T> void resetMock(T mock) { in resetMock() argument 43 InternalMockHandler oldHandler = (InternalMockHandler) getMockHandler(mock); in resetMock() 47 mockMaker.resetMock(mock, newHandler, settings); in resetMock() 50 public <T> InternalMockHandler<T> getMockHandler(T mock) { in getMockHandler() argument 51 if (mock == null) { in getMockHandler() [all …]
|
/external/chromium-trace/catapult/telemetry/telemetry/internal/util/ |
D | binary_manager_unittest.py | 10 import mock 22 @mock.patch( 24 @mock.patch( 33 mock.call.base_config.BaseConfig( 35 mock.call.base_config.BaseConfig( 41 @mock.patch( 43 @mock.patch( 52 expected_calls = [mock.call(binary_manager.TELEMETRY_PROJECT_CONFIG), 53 mock.call(binary_manager.CHROME_BINARY_CONFIG), 54 mock.call(environment_config)] [all …]
|
/external/chromium-trace/catapult/devil/devil/android/ |
D | md5sum_test.py | 14 import mock # pylint: disable=import-error 29 mock.patch('devil.devil_env._Environment.FetchPath', 30 mock.Mock(side_effect=lambda a, device=None: mocked_attrs[a])), 31 mock.patch('os.path.exists', 32 new=mock.Mock(return_value=True)), 43 mock_get_cmd_output = mock.Mock( 45 with mock.patch('devil.utils.cmd_helper.GetCmdOutput', 57 mock_get_cmd_output = mock.Mock( 60 with mock.patch('devil.utils.cmd_helper.GetCmdOutput', 76 mock_get_cmd_output = mock.Mock( [all …]
|
D | fastboot_utils_test.py | 24 import mock # pylint: disable=import-error 43 self.file = mock.MagicMock(spec=file) 58 fastbooter = mock.Mock(spec=fastboot.Fastboot) 59 fastbooter.__str__ = mock.Mock(return_value=test_serial) 65 device = mock.Mock(spec=device_utils.DeviceUtils) 66 device.__str__ = mock.Mock(return_value=test_serial) 67 device.product_board = mock.Mock(return_value=_BOARD) 68 device.adb = mock.Mock() 99 @mock.patch('time.sleep', mock.Mock()) 125 self.call.fastboot._device.WaitUntilFullyBooted(timeout=mock.ANY)): [all …]
|
D | logcat_monitor_test.py | 17 import mock # pylint: disable=import-error 22 test_adb.Logcat = mock.Mock(return_value=(l for l in raw_logcat)) 65 @mock.patch('time.sleep', mock.Mock()) 80 @mock.patch('time.sleep', mock.Mock()) 91 @mock.patch('time.sleep', mock.Mock()) 106 test_adb.Logcat = mock.Mock(return_value=LogGenerator()) 116 @mock.patch('time.sleep', mock.Mock()) 140 @mock.patch('time.sleep', mock.Mock()) 152 @mock.patch('time.sleep', mock.Mock()) 167 @mock.patch('time.sleep', mock.Mock()) [all …]
|
/external/webrtc/webrtc/modules/audio_processing/ |
D | audio_processing_impl_unittest.cc | 37 MockInitialize mock(config); in TEST() local 38 ON_CALL(mock, InitializeLocked()) in TEST() 39 .WillByDefault(Invoke(&mock, &MockInitialize::RealInitializeLocked)); in TEST() 41 EXPECT_CALL(mock, InitializeLocked()).Times(1); in TEST() 42 mock.Initialize(); in TEST() 48 EXPECT_CALL(mock, InitializeLocked()) in TEST() 50 EXPECT_NOERR(mock.ProcessStream(&frame)); in TEST() 51 EXPECT_NOERR(mock.AnalyzeReverseStream(&frame)); in TEST() 55 EXPECT_CALL(mock, InitializeLocked()) in TEST() 57 EXPECT_NOERR(mock.ProcessStream(&frame)); in TEST() [all …]
|
/external/chromium-trace/catapult/third_party/gsutil/third_party/boto/tests/unit/glacier/ |
D | test_vault.py | 24 from tests.compat import mock, unittest 26 ANY = mock.ANY 35 self.size_patch = mock.patch('os.path.getsize') 37 self.api = mock.Mock() 40 self.mock_open = mock.mock_open() 47 @mock.patch('boto.glacier.vault.compute_hashes_from_fileobj', 53 with mock.patch('boto.glacier.vault.open', self.mock_open, 60 mock.ANY, mock.ANY, 'my description') 64 self.vault.create_archive_writer = mock.Mock() 68 with mock.patch('boto.glacier.vault.open', self.mock_open, [all …]
|
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
D | WrappingExecutorServiceTest.java | 48 MockExecutor mock = new MockExecutor(); in testDelegations() local 49 TestExecutor testExecutor = new TestExecutor(mock); in testDelegations() 51 mock.assertLastMethodCalled("awaitTermination"); in testDelegations() 53 mock.assertLastMethodCalled("isTerminated"); in testDelegations() 55 mock.assertLastMethodCalled("isShutdown"); in testDelegations() 57 mock.assertLastMethodCalled("shutdown"); in testDelegations() 59 mock.assertLastMethodCalled("shutdownNow"); in testDelegations() 64 MockExecutor mock = new MockExecutor(); in testExecute() local 65 TestExecutor testExecutor = new TestExecutor(mock); in testExecute() 67 mock.assertLastMethodCalled("execute"); in testExecute() [all …]
|
/external/chromium-trace/catapult/dependency_manager/dependency_manager/ |
D | dependency_manager_unittest.py | 8 import mock 44 base_config_mock = mock.MagicMock(spec=dependency_manager.BaseConfig) 51 base_config_mock = mock.MagicMock(spec=dependency_manager.BaseConfig) 52 dep_info = mock.MagicMock(spec=dependency_manager.DependencyInfo) 65 base_config_mock = mock.MagicMock(spec=dependency_manager.BaseConfig) 69 dep_info1 = mock.MagicMock(spec=dependency_manager.DependencyInfo) 72 dep_info2 = mock.MagicMock(spec=dependency_manager.DependencyInfo) 86 base_config_mock = mock.MagicMock(spec=dependency_manager.BaseConfig) 91 dep_info1 = mock.MagicMock(spec=dependency_manager.DependencyInfo) 94 dep_info2 = mock.MagicMock(spec=dependency_manager.DependencyInfo) [all …]
|
/external/dexmaker/src/mockito/java/com/google/dexmaker/mockito/ |
D | DexmakerMockMaker.java | 27 import org.mockito.mock.MockCreationSettings; 50 T mock = (T) Proxy.newProxyInstance(contextClassLoader, classesToMock, in createMock() local 52 return mock; in createMock() 60 T mock = unsafeAllocator.newInstance(proxyClass); in createMock() local 63 handlerField.set(mock, invocationHandler); in createMock() 64 return mock; in createMock() 73 public void resetMock(Object mock, MockHandler newHandler, MockCreationSettings settings) { in resetMock() argument 74 InvocationHandlerAdapter adapter = getInvocationHandlerAdapter(mock); in resetMock() 78 public MockHandler getHandler(Object mock) { in getHandler() argument 79 InvocationHandlerAdapter adapter = getInvocationHandlerAdapter(mock); in getHandler() [all …]
|
/external/chromium-trace/catapult/third_party/gsutil/third_party/apitools/apitools/base/py/testing/ |
D | mock_test.py | 7 from apitools.base.py.testing import mock 14 with mock.Client(fusiontables.FusiontablesV1) as client_class: 18 with self.assertRaises(mock.UnexpectedRequestException): 22 with mock.Client(fusiontables.FusiontablesV1) as client_class: 31 with mock.Client(fusiontables.FusiontablesV1) as client_class: 39 with mock.Client(fusiontables.FusiontablesV1) as client_class: 43 with self.assertRaises(mock.UnexpectedRequestException): 45 with self.assertRaises(mock.UnexpectedRequestException): 49 with mock.Client(fusiontables.FusiontablesV1) as client_class: 53 with self.assertRaises(mock.UnexpectedRequestException): [all …]
|
/external/mockito/src/org/mockito/internal/ |
D | MockitoCore.java | 29 import org.mockito.mock.MockCreationSettings; 47 public <T> T mock(Class<T> typeToMock, MockSettings settings) { in mock() method in MockitoCore 55 T mock = mockUtil.createMock(creationSettings); in mock() local 56 mockingProgress.mockingStarted(mock, typeToMock); in mock() 57 return mock; in mock() 79 public <T> T verify(T mock, VerificationMode mode) { in verify() argument 80 if (mock == null) { in verify() 82 } else if (!mockUtil.isMock(mock)) { in verify() 83 reporter.notAMockPassedToVerify(mock.getClass()); in verify() 85 mockingProgress.verificationStarted(new MockAwareVerificationMode(mock, mode)); in verify() [all …]
|
/external/mockito/src/org/mockito/ |
D | Mockito.java | 1119 public static <T> T mock(Class<T> classToMock) { in mock() method in Mockito 1120 return mock(classToMock, withSettings().defaultAnswer(RETURNS_DEFAULTS)); in mock() 1138 public static <T> T mock(Class<T> classToMock, String name) { in mock() method in Mockito 1139 return mock(classToMock, withSettings() in mock() 1192 public static <T> T mock(Class<T> classToMock, ReturnValues returnValues) { in mock() method in Mockito 1193 …return mock(classToMock, withSettings().defaultAnswer(new AnswerReturnValuesAdapter(returnValues))… in mock() 1215 public static <T> T mock(Class<T> classToMock, Answer defaultAnswer) { in mock() method in Mockito 1216 return mock(classToMock, withSettings().defaultAnswer(defaultAnswer)); in mock() 1242 public static <T> T mock(Class<T> classToMock, MockSettings mockSettings) { in mock() method in Mockito 1243 return MOCKITO_CORE.mock(classToMock, mockSettings); in mock() [all …]
|