| Index: third_party/WebKit/Source/modules/remoteplayback/RemotePlaybackTest.cpp
|
| diff --git a/third_party/WebKit/Source/modules/remoteplayback/RemotePlaybackTest.cpp b/third_party/WebKit/Source/modules/remoteplayback/RemotePlaybackTest.cpp
|
| index 165fd753ea3e4fc6c2396dab315798220aabfa23..443cfe44c27529128b2e9db5631166ac61d49e40 100644
|
| --- a/third_party/WebKit/Source/modules/remoteplayback/RemotePlaybackTest.cpp
|
| +++ b/third_party/WebKit/Source/modules/remoteplayback/RemotePlaybackTest.cpp
|
| @@ -56,8 +56,10 @@ class RemotePlaybackTest : public ::testing::Test {
|
| remotePlayback->stateChanged(state);
|
| }
|
|
|
| - void setAvailability(RemotePlayback* remotePlayback, bool available) {
|
| - remotePlayback->availabilityChanged(available);
|
| + void setAvailability(RemotePlayback* remotePlayback,
|
| + bool routeAvailable,
|
| + bool sourceCompatible) {
|
| + remotePlayback->availabilityChanged(routeAvailable, sourceCompatible);
|
| }
|
| };
|
|
|
| @@ -69,6 +71,7 @@ TEST_F(RemotePlaybackTest, PromptCancelledRejectsWithNotAllowedError) {
|
| HTMLMediaElement* element = HTMLVideoElement::create(pageHolder->document());
|
| RemotePlayback* remotePlayback =
|
| HTMLMediaElementRemotePlayback::remote(scope.getScriptState(), *element);
|
| + setAvailability(remotePlayback, true, true);
|
|
|
| auto resolve = MockFunction::create(scope.getScriptState());
|
| auto reject = MockFunction::create(scope.getScriptState());
|
| @@ -98,6 +101,7 @@ TEST_F(RemotePlaybackTest, PromptConnectedRejectsWhenCancelled) {
|
| HTMLMediaElement* element = HTMLVideoElement::create(pageHolder->document());
|
| RemotePlayback* remotePlayback =
|
| HTMLMediaElementRemotePlayback::remote(scope.getScriptState(), *element);
|
| + setAvailability(remotePlayback, true, true);
|
|
|
| auto resolve = MockFunction::create(scope.getScriptState());
|
| auto reject = MockFunction::create(scope.getScriptState());
|
| @@ -129,6 +133,7 @@ TEST_F(RemotePlaybackTest, PromptConnectedResolvesWhenDisconnected) {
|
| HTMLMediaElement* element = HTMLVideoElement::create(pageHolder->document());
|
| RemotePlayback* remotePlayback =
|
| HTMLMediaElementRemotePlayback::remote(scope.getScriptState(), *element);
|
| + setAvailability(remotePlayback, true, true);
|
|
|
| auto resolve = MockFunction::create(scope.getScriptState());
|
| auto reject = MockFunction::create(scope.getScriptState());
|
| @@ -202,6 +207,7 @@ TEST_F(RemotePlaybackTest,
|
| HTMLMediaElement* element = HTMLVideoElement::create(pageHolder->document());
|
| RemotePlayback* remotePlayback =
|
| HTMLMediaElementRemotePlayback::remote(scope.getScriptState(), *element);
|
| + setAvailability(remotePlayback, true, true);
|
|
|
| MockFunction* resolve = MockFunction::create(scope.getScriptState());
|
| MockFunction* reject = MockFunction::create(scope.getScriptState());
|
| @@ -253,7 +259,7 @@ TEST_F(RemotePlaybackTest, DisableRemotePlaybackCancelsAvailabilityCallbacks) {
|
|
|
| HTMLMediaElementRemotePlayback::setBooleanAttribute(
|
| HTMLNames::disableremoteplaybackAttr, *element, true);
|
| - setAvailability(remotePlayback, true);
|
| + setAvailability(remotePlayback, true, true);
|
|
|
| // Runs pending promises.
|
| v8::MicrotasksScope::PerformCheckpoint(scope.isolate());
|
|
|