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

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

Issue 2738893002: Add flag for enabling/disabling video fullscreen detection (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
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/core/html/HTMLVideoElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLMediaElementEventListenersTest.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElementEventListenersTest.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElementEventListenersTest.cpp
index 2d525dc9c88896bf2f6421657d4b35037d4b0716..c1505c696312bbcb4125a6083efbe17586fa8b19 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElementEventListenersTest.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElementEventListenersTest.cpp
@@ -11,6 +11,7 @@
#include "core/html/shadow/MediaControls.h"
#include "core/loader/EmptyClients.h"
#include "core/testing/DummyPageHolder.h"
+#include "platform/RuntimeEnabledFeatures.h"
#include "platform/UserGestureIndicator.h"
#include "platform/testing/EmptyWebMediaPlayer.h"
#include "platform/testing/UnitTestHelpers.h"
@@ -131,6 +132,11 @@ TEST_F(HTMLMediaElementEventListenersTest,
TEST_F(HTMLMediaElementEventListenersTest,
FullscreenDetectorTimerCancelledOnContextDestroy) {
+ bool originalVideoFullscreenDetectionEnabled =
+ RuntimeEnabledFeatures::videoFullscreenDetectionEnabled();
+
+ RuntimeEnabledFeatures::setVideoFullscreenDetectionEnabled(true);
+
EXPECT_EQ(video(), nullptr);
document().body()->setInnerHTML("<body><video></video</body>");
video()->setSrc("http://example.com");
@@ -170,6 +176,9 @@ TEST_F(HTMLMediaElementEventListenersTest,
// Should only notify the false value when ExecutionContext is destroyed.
EXPECT_EQ(1u, observedResults.size());
EXPECT_FALSE(observedResults[0]);
+
+ RuntimeEnabledFeatures::setVideoFullscreenDetectionEnabled(
+ originalVideoFullscreenDetectionEnabled);
}
} // namespace blink
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/core/html/HTMLVideoElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698