Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: third_party/WebKit/Source/core/html/HTMLVideoElementTest.cpp

Issue 2729613007: Fixing a crash in MediaCustomControlsFullscreenDetector when the page is destroyed (Closed)
Patch Set: rebased Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLVideoElementTest.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLVideoElementTest.cpp b/third_party/WebKit/Source/core/html/HTMLVideoElementTest.cpp
index 61b0910ba793a3e00bc3ec863779c2af28712e46..6992bddfdbb81e87e0273c5f01b18e24537bcc13 100644
--- a/third_party/WebKit/Source/core/html/HTMLVideoElementTest.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLVideoElementTest.cpp
@@ -11,8 +11,8 @@
#include "core/testing/DummyPageHolder.h"
#include "platform/UserGestureIndicator.h"
#include "platform/network/NetworkStateNotifier.h"
+#include "platform/testing/EmptyWebMediaPlayer.h"
#include "platform/testing/UnitTestHelpers.h"
-#include "public/platform/WebMediaPlayer.h"
#include "public/platform/WebSize.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -22,43 +22,6 @@ namespace blink {
namespace {
-class EmptyWebMediaPlayer : public WebMediaPlayer {
- public:
- void load(LoadType, const WebMediaPlayerSource&, CORSMode) override{};
- void play() override{};
- void pause() override{};
- bool supportsSave() const override { return false; };
- void seek(double seconds) override{};
- void setRate(double) override{};
- void setVolume(double) override{};
- WebTimeRanges buffered() const override { return WebTimeRanges(); };
- WebTimeRanges seekable() const override { return WebTimeRanges(); };
- void setSinkId(const WebString& sinkId,
- const WebSecurityOrigin&,
- WebSetSinkIdCallbacks*) override{};
- bool hasVideo() const override { return false; };
- bool hasAudio() const override { return false; };
- WebSize naturalSize() const override { return WebSize(0, 0); };
- bool paused() const override { return false; };
- bool seeking() const override { return false; };
- double duration() const override { return 0.0; };
- double currentTime() const override { return 0.0; };
- NetworkState getNetworkState() const override { return NetworkStateEmpty; };
- ReadyState getReadyState() const override { return ReadyStateHaveNothing; };
- WebString getErrorMessage() override { return WebString(); };
- bool didLoadingProgress() override { return false; };
- bool hasSingleSecurityOrigin() const override { return true; };
- bool didPassCORSAccessCheck() const override { return true; };
- double mediaTimeForTimeValue(double timeValue) const override {
- return timeValue;
- };
- unsigned decodedFrameCount() const override { return 0; };
- unsigned droppedFrameCount() const override { return 0; };
- size_t audioDecodedByteCount() const override { return 0; };
- size_t videoDecodedByteCount() const override { return 0; };
- void paint(WebCanvas*, const WebRect&, PaintFlags&) override{};
-};
-
class MockWebMediaPlayer : public EmptyWebMediaPlayer {
public:
MOCK_METHOD1(setBufferingStrategy, void(BufferingStrategy));

Powered by Google App Engine
This is Rietveld 408576698