| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "modules/mediasession/MediaSession.h" | 5 #include "modules/mediasession/MediaSession.h" |
| 6 | 6 |
| 7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/testing/DummyPageHolder.h" | 8 #include "core/testing/DummyPageHolder.h" |
| 9 #include "modules/mediasession/MediaMetadata.h" | 9 #include "modules/mediasession/MediaMetadata.h" |
| 10 #include "modules/mediasession/MediaMetadataInit.h" | 10 #include "modules/mediasession/MediaMetadataInit.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 EXPECT_EQ(nullptr, mediaSession->metadata()); | 84 EXPECT_EQ(nullptr, mediaSession->metadata()); |
| 85 } | 85 } |
| 86 | 86 |
| 87 TEST_F(MediaSessionTest, SetMetadata_NotNull) | 87 TEST_F(MediaSessionTest, SetMetadata_NotNull) |
| 88 { | 88 { |
| 89 MockWebMediaSession* mockWebMediaSession = new MockWebMediaSession; | 89 MockWebMediaSession* mockWebMediaSession = new MockWebMediaSession; |
| 90 MediaSession* mediaSession = createMediaSession(mockWebMediaSession); | 90 MediaSession* mediaSession = createMediaSession(mockWebMediaSession); |
| 91 | 91 |
| 92 EXPECT_CALL(*mockWebMediaSession, setMetadata(testing::NotNull())); | 92 EXPECT_CALL(*mockWebMediaSession, setMetadata(testing::NotNull())); |
| 93 mediaSession->setMetadata(MediaMetadata::create(MediaMetadataInit())); | 93 mediaSession->setMetadata(MediaMetadata::create(&document(), MediaMetadataIn
it())); |
| 94 | 94 |
| 95 EXPECT_NE(nullptr, mediaSession->metadata()); | 95 EXPECT_NE(nullptr, mediaSession->metadata()); |
| 96 } | 96 } |
| 97 | 97 |
| 98 } // namespace | 98 } // namespace |
| 99 } // namespace blink | 99 } // namespace blink |
| OLD | NEW |