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

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: . Created 3 years, 10 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 0d438b606b352c7bd68d93f3e0ccd85fa0b41d7d..86f3faf7920dd35a0a92c5804f9ef1fb02b3a105 100644
--- a/third_party/WebKit/Source/core/html/HTMLVideoElementTest.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLVideoElementTest.cpp
@@ -4,61 +4,24 @@
#include "core/html/HTMLVideoElement.h"
+#include <memory>
#include "core/dom/Document.h"
#include "core/dom/DocumentUserGestureToken.h"
#include "core/loader/EmptyClients.h"
#include "core/page/NetworkStateNotifier.h"
#include "core/testing/DummyPageHolder.h"
#include "platform/UserGestureIndicator.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"
#include "wtf/PtrUtil.h"
-#include <memory>
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