/external/chromium_org/tools/telemetry/telemetry/unittest/ |
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/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_org/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_org/third_party/webrtc/modules/audio_processing/ |
D | audio_processing_impl_unittest.cc | 35 MockInitialize mock(config); in TEST() local 36 ON_CALL(mock, InitializeLocked()) in TEST() 37 .WillByDefault(Invoke(&mock, &MockInitialize::RealInitializeLocked)); in TEST() 39 EXPECT_CALL(mock, InitializeLocked()).Times(1); in TEST() 40 mock.Initialize(); in TEST() 46 EXPECT_CALL(mock, InitializeLocked()) in TEST() 48 EXPECT_NOERR(mock.ProcessStream(&frame)); in TEST() 49 EXPECT_NOERR(mock.AnalyzeReverseStream(&frame)); in TEST() 53 EXPECT_CALL(mock, InitializeLocked()) in TEST() 55 EXPECT_NOERR(mock.ProcessStream(&frame)); in TEST() [all …]
|
/external/chromium_org/chrome/browser/download/ |
D | download_query_unittest.cc | 57 EXPECT_CALL(mock(mocks_.size() - 1), GetId()).WillRepeatedly(Return( in CreateMocks() 62 content::MockDownloadItem& mock(int index) { return *mocks_[index]; } in mock() function in DownloadQueryTest 183 EXPECT_CALL(mock(0), GetBrowserContext()).WillRepeatedly(Return( in TEST_F() 185 EXPECT_CALL(mock(1), GetBrowserContext()).WillRepeatedly(Return( in TEST_F() 188 EXPECT_CALL(mock(0), GetTargetFilePath()).WillRepeatedly(ReturnRef( in TEST_F() 191 EXPECT_CALL(mock(1), GetTargetFilePath()).WillRepeatedly(ReturnRef( in TEST_F() 194 EXPECT_CALL(mock(0), GetOriginalUrl()).WillRepeatedly(ReturnRef(fail_url)); in TEST_F() 195 EXPECT_CALL(mock(1), GetOriginalUrl()).WillRepeatedly(ReturnRef(fail_url)); in TEST_F() 204 EXPECT_CALL(mock(0), GetBrowserContext()).WillRepeatedly(Return( in TEST_F() 206 EXPECT_CALL(mock(1), GetBrowserContext()).WillRepeatedly(Return( in TEST_F() [all …]
|
/external/chromium_org/chrome/browser/ui/passwords/ |
D | manage_passwords_ui_controller_unittest.cc | 82 ManagePasswordsIconMock mock; in TEST_F() local 83 controller()->UpdateIconAndBubbleState(&mock); in TEST_F() 84 EXPECT_EQ(password_manager::ui::INACTIVE_STATE, mock.state()); in TEST_F() 97 ManagePasswordsIconMock mock; in TEST_F() local 98 controller()->UpdateIconAndBubbleState(&mock); in TEST_F() 99 EXPECT_EQ(password_manager::ui::MANAGE_STATE, mock.state()); in TEST_F() 118 ManagePasswordsIconMock mock; in TEST_F() local 119 controller()->UpdateIconAndBubbleState(&mock); in TEST_F() 120 EXPECT_EQ(password_manager::ui::PENDING_PASSWORD_STATE, mock.state()); in TEST_F() 130 ManagePasswordsIconMock mock; in TEST_F() local [all …]
|
/external/chromium_org/native_client_sdk/src/tests/nacl_io_test/ |
D | kernel_wrap_test.cc | 125 EXPECT_CALL(mock, open(_, _)) in SetUp() 131 ASSERT_EQ(0, ki_init(&mock)); in SetUp() 136 ON_CALL(mock, write(_, _, _)) in SetUp() 138 EXPECT_CALL(mock, write(_, _, _)).Times(AnyNumber()); in SetUp() 147 MockKernelProxy mock; member in __anon2f6b808d0111::KernelWrapTest 165 EXPECT_CALL(mock, access(kDummyConstChar, kDummyInt)) .WillOnce(Return(0)); in TEST_F() 168 EXPECT_CALL(mock, access(kDummyConstChar, kDummyInt)) in TEST_F() 176 EXPECT_CALL(mock, chdir(kDummyConstChar)).WillOnce(Return(0)); in TEST_F() 179 EXPECT_CALL(mock, chdir(kDummyConstChar)) in TEST_F() 186 EXPECT_CALL(mock, chmod(kDummyConstChar, kDummyMode)) in TEST_F() [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/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 …]
|
/external/chromium-trace/trace-viewer/third_party/pywebsocket/src/test/ |
D | test_handshake_draft75.py | 41 from test import mock 369 conn = mock.MockConn('') 371 return mock.MockRequest( 401 mock.MockDispatcher()) 415 mock.MockDispatcher()) 424 mock.MockDispatcher()) 434 mock.MockDispatcher()) 443 mock.MockDispatcher()) 452 mock.MockDispatcher()) 462 mock.MockDispatcher()) [all …]
|
D | test_handshake_hybi00.py | 42 from test import mock 320 conn = mock.MockConn(data) 322 return mock.MockRequest( 352 mock.MockDispatcher()) 364 mock.MockDispatcher()) 374 mock.MockDispatcher()) 383 mock.MockDispatcher()) 393 mock.MockDispatcher()) 402 mock.MockDispatcher()) 411 mock.MockDispatcher()) [all …]
|
D | test_dispatch.py | 43 from test import mock 149 request = mock.MockRequest() 165 request = mock.MockRequest() 173 request = mock.MockRequest(connection=mock.MockConn('\xff\x00')) 181 request = mock.MockRequest(connection=mock.MockConn('\xff\x00')) 189 request = mock.MockRequest(connection=mock.MockConn('\xff\x00')) 197 request = mock.MockRequest(connection=mock.MockConn('\xff\x00')) 209 request = mock.MockRequest(connection=mock.MockConn('')) 222 request = mock.MockRequest(connection=mock.MockConn('')) 234 request = mock.MockRequest()
|
/external/mockito/src/org/mockito/internal/util/collections/ |
D | HashCodeAndEqualsSafeSet.java | 62 public boolean contains(Object mock) { in contains() argument 63 return backingHashSet.contains(HashCodeAndEqualsMockWrapper.of(mock)); in contains() 66 public boolean add(Object mock) { in add() argument 67 return backingHashSet.add(HashCodeAndEqualsMockWrapper.of(mock)); in add() 70 public boolean remove(Object mock) { in remove() argument 71 return backingHashSet.remove(HashCodeAndEqualsMockWrapper.of(mock)); in remove() 134 for (Object mock : mocks) { in asWrappedMocks() 135 assert ! (mock instanceof HashCodeAndEqualsMockWrapper) : "WRONG"; in asWrappedMocks() 136 hashSet.add(HashCodeAndEqualsMockWrapper.of(mock)); in asWrappedMocks() 152 for (Object mock : objects) { in of() [all …]
|
/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/ |
D | CursorWrapperTest.java | 30 mockCursor = mock(Cursor.class); in ForwardVerifier() 56 v.verifyForward("copyStringToBuffer", 1, mock(CharArrayBuffer.class)); in testCursorMethodsAreForwarded() 86 v.verifyForward("registerContentObserver", mock(ContentObserver.class)); in testCursorMethodsAreForwarded() 87 v.verifyForward("registerDataSetObserver", mock(DataSetObserver.class)); in testCursorMethodsAreForwarded() 89 v.verifyForward("respond", mock(Bundle.class)); in testCursorMethodsAreForwarded() 90 v.verifyForward("setNotificationUri", mock(ContentResolver.class), mock(Uri.class)); in testCursorMethodsAreForwarded() 91 v.verifyForward("unregisterContentObserver", mock(ContentObserver.class)); in testCursorMethodsAreForwarded() 92 v.verifyForward("unregisterDataSetObserver", mock(DataSetObserver.class)); in testCursorMethodsAreForwarded() 98 Cursor mockCursor = mock(Cursor.class); in getWrappedCursor()
|
/external/chromium_org/native_client_sdk/src/tools/tests/ |
D | sel_ldr_test.py | 21 import mock 26 with mock.patch('sys.stderr'): 30 with mock.patch('subprocess.call') as call: 31 with mock.patch('os.path.exists'): 32 with mock.patch('os.path.isfile'): 33 with mock.patch('create_nmf.ParseElfHeader') as parse_header: 35 with mock.patch('getos.GetPlatform') as get_platform:
|
D | getos_test.py | 19 import mock 39 self.patch1 = mock.patch.dict('os.environ', 42 self.patch2 = mock.patch.object(oshelpers, 'FindExeInPath', 52 with mock.patch.dict('os.environ', {'NACL_SDK_ROOT': 'dummy'}): 72 with mock.patch.dict('os.environ', {'CHROME_PATH': '/dummy/file'}): 88 with mock.patch.dict('os.environ', {'CHROME_PATH': mock_location}): 89 with mock.patch('os.path.exists') as mock_exists: 101 with mock.patch('getos.GetChromePath') as mock_chrome_path: 110 self.patch = mock.patch.dict('os.environ',
|
/external/mockito/src/org/mockito/internal/invocation/ |
D | InvocationImpl.java | 31 private final Object mock; field in InvocationImpl 43 …public InvocationImpl(Object mock, MockitoMethod mockitoMethod, Object[] args, int sequenceNumber,… in InvocationImpl() argument 45 this.mock = mock; in InvocationImpl() 54 return mock; in getMock() 80 …return this.mock.equals(other.mock) && this.method.equals(other.method) && this.equalArguments(oth… in equals() 108 return realMethod.invoke(mock, rawArguments); in callRealMethod()
|
/external/mockito/src/org/mockito/internal/verification/ |
D | MockAwareVerificationMode.java | 12 private final Object mock; field in MockAwareVerificationMode 15 public MockAwareVerificationMode(Object mock, VerificationMode mode) { in MockAwareVerificationMode() argument 16 this.mock = mock; in MockAwareVerificationMode() 25 return mock; in getMock()
|
/external/easymock/src/org/easymock/internal/ |
D | Invocation.java | 33 private final Object mock; field in Invocation 42 public Invocation(Object mock, Method method, Object[] args) { in Invocation() argument 43 this.mock = mock; in Invocation() 77 return mock; in getMock() 95 return this.mock.equals(other.mock) && this.method.equals(other.method) in equals() 136 return this.mock.equals(actual.mock) in matches() 147 String mockName = mock.toString(); in getMockAndMethodName() 149 if (toStringIsDefined(mock) && isJavaIdentifier(mockName)) { in getMockAndMethodName()
|
/external/chromium_org/third_party/pymock/ |
D | README.chromium | 1 Name: mock 2 URL: http://pypi.python.org/pypi/mock 8 Python mock library, currently used by native_client_sdk. This is the 9 same mock library that is now part of python 3.3 where it is know as 10 unittest.mock.
|
/external/mockito/src/org/mockito/internal/creation/ |
D | CglibMockMaker.java | 12 import org.mockito.mock.MockCreationSettings; 36 public void resetMock(Object mock, MockHandler newHandler, MockCreationSettings settings) { in resetMock() argument 37 ((Factory) mock).setCallback(0, new MethodInterceptorFilter(cast(newHandler), settings)); in resetMock() 40 public MockHandler getHandler(Object mock) { in getHandler() argument 41 if (!(mock instanceof Factory)) { in getHandler() 44 Factory factory = (Factory) mock; in getHandler()
|
/external/easymock/src/org/easymock/ |
D | EasyMock.java | 1546 for (Object mock : mocks) { in replay() 1547 getControl(mock).replay(); in replay() 1559 for (Object mock : mocks) { in reset() 1560 getControl(mock).reset(); in reset() 1573 for (Object mock : mocks) { in resetToNice() 1574 getControl(mock).resetToNice(); in resetToNice() 1587 for (Object mock : mocks) { in resetToDefault() 1588 getControl(mock).resetToDefault(); in resetToDefault() 1601 for (Object mock : mocks) { in resetToStrict() 1602 getControl(mock).resetToStrict(); in resetToStrict() [all …]
|