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

Unified Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 1417683004: Media controls refer to less magic state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cl feedback. Created 5 years, 2 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/testing/Internals.cpp
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index d124861ed419e3e543b309228fa97fa55e802566..0f39f0a9bc7dfc44352d6f2ef33dfc5f1051713b 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -2561,4 +2561,12 @@ double Internals::monotonicTimeToZeroBasedDocumentTime(double platformTime, Exce
return document->loader()->timing().monotonicTimeToZeroBasedDocumentTime(platformTime);
}
+void Internals::setMediaElementNetworkState(HTMLMediaElement* mediaElement, int32_t state)
+{
+ ASSERT(mediaElement);
+ ASSERT(state >= HTMLMediaElement::NetworkState::NETWORK_EMPTY);
+ ASSERT(state <= HTMLMediaElement::NetworkState::NETWORK_NO_SOURCE);
+ mediaElement->setNetworkState(static_cast<WebMediaPlayer::NetworkState>(state));
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698