diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-02-13 15:05:36 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-02-14 10:33:47 +0000 |
commit | e684a3455bcc29a6e3e66a004e352dea4e1141e7 (patch) | |
tree | d55b4003bde34d7d05f558f02cfd82b2a66a7aac /chromium/third_party/blink/renderer/modules/remoteplayback/remote_playback_test.cc | |
parent | 2b94bfe47ccb6c08047959d1c26e392919550e86 (diff) | |
download | qtwebengine-chromium-e684a3455bcc29a6e3e66a004e352dea4e1141e7.tar.gz |
BASELINE: Update Chromium to 72.0.3626.110 and Ninja to 1.9.0
Change-Id: Ic57220b00ecc929a893c91f5cc552f5d3e99e922
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/modules/remoteplayback/remote_playback_test.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/modules/remoteplayback/remote_playback_test.cc | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/chromium/third_party/blink/renderer/modules/remoteplayback/remote_playback_test.cc b/chromium/third_party/blink/renderer/modules/remoteplayback/remote_playback_test.cc index f283e8f2561..4c000cc6816 100644 --- a/chromium/third_party/blink/renderer/modules/remoteplayback/remote_playback_test.cc +++ b/chromium/third_party/blink/renderer/modules/remoteplayback/remote_playback_test.cc @@ -47,7 +47,7 @@ class MockEventListenerForRemotePlayback : public EventListener { return this == &other; } - MOCK_METHOD2(handleEvent, void(ExecutionContext* executionContext, Event*)); + MOCK_METHOD2(Invoke, void(ExecutionContext* executionContext, Event*)); }; class MockPresentationController final : public PresentationController { @@ -199,17 +199,16 @@ TEST_F(RemotePlaybackTest, StateChangeEvents) { auto* disconnect_handler = new testing::StrictMock<MockEventListenerForRemotePlayback>(); - remote_playback->addEventListener(EventTypeNames::connecting, + remote_playback->addEventListener(event_type_names::kConnecting, connecting_handler); - remote_playback->addEventListener(EventTypeNames::connect, connect_handler); - remote_playback->addEventListener(EventTypeNames::disconnect, + remote_playback->addEventListener(event_type_names::kConnect, + connect_handler); + remote_playback->addEventListener(event_type_names::kDisconnect, disconnect_handler); - EXPECT_CALL(*connecting_handler, handleEvent(testing::_, testing::_)) - .Times(1); - EXPECT_CALL(*connect_handler, handleEvent(testing::_, testing::_)).Times(1); - EXPECT_CALL(*disconnect_handler, handleEvent(testing::_, testing::_)) - .Times(1); + EXPECT_CALL(*connecting_handler, Invoke(testing::_, testing::_)).Times(1); + EXPECT_CALL(*connect_handler, Invoke(testing::_, testing::_)).Times(1); + EXPECT_CALL(*disconnect_handler, Invoke(testing::_, testing::_)).Times(1); SetState(remote_playback, WebRemotePlaybackState::kConnecting); SetState(remote_playback, WebRemotePlaybackState::kConnecting); @@ -248,7 +247,7 @@ TEST_F(RemotePlaybackTest, remote_playback->prompt(scope.GetScriptState()) .Then(resolve->Bind(), reject->Bind()); HTMLMediaElementRemotePlayback::SetBooleanAttribute( - HTMLNames::disableremoteplaybackAttr, *element, true); + html_names::kDisableremoteplaybackAttr, *element, true); // Runs pending promises. v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate()); @@ -289,7 +288,7 @@ TEST_F(RemotePlaybackTest, DisableRemotePlaybackCancelsAvailabilityCallbacks) { .Then(resolve->Bind(), reject->Bind()); HTMLMediaElementRemotePlayback::SetBooleanAttribute( - HTMLNames::disableremoteplaybackAttr, *element, true); + html_names::kDisableremoteplaybackAttr, *element, true); // Runs pending promises. v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate()); @@ -386,7 +385,7 @@ TEST_F(RemotePlaybackTest, IsListening) { LocalFrame& frame = page_holder->GetFrame(); MockPresentationController* mock_controller = - new MockPresentationController(frame); + MakeGarbageCollected<MockPresentationController>(frame); Supplement<LocalFrame>::ProvideTo( frame, static_cast<PresentationController*>(mock_controller)); |