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

Unified Diff: content/shell/webkit_test_runner.cc

Issue 13159005: Enable media stream layout test with content_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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
« content/shell/webkit_test_runner.h ('K') | « content/shell/webkit_test_runner.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/webkit_test_runner.cc
===================================================================
--- content/shell/webkit_test_runner.cc (revision 191708)
+++ content/shell/webkit_test_runner.cc (working copy)
@@ -58,6 +58,8 @@
#include "webkit/glue/glue_serialize.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webpreferences.h"
+#include "webkit/support/test_media_stream_client.h"
+#include "webkit/support/webkit_support.h"
jochen (gone - plz use gerrit) 2013/04/02 07:02:21 content/ must not depend on webkit/support. You c
wjia(left Chromium) 2013/04/03 00:44:04 Done.
using WebKit::Platform;
using WebKit::WebArrayBufferView;
@@ -68,6 +70,8 @@
using WebKit::WebFrame;
using WebKit::WebGamepads;
using WebKit::WebHistoryItem;
+using WebKit::WebMediaPlayer;
+using WebKit::WebMediaPlayerClient;
using WebKit::WebPoint;
using WebKit::WebRect;
using WebKit::WebSize;
@@ -489,6 +493,20 @@
history->swap(result);
}
+WebMediaPlayer* WebKitTestRunner::createWebMediaPlayer(
+ WebFrame* frame, const WebURL& url, WebMediaPlayerClient* client)
+{
+#if ENABLE_WEBRTC
+ if (!test_media_stream_client_.get())
+ test_media_stream_client_.reset(
+ new webkit_support::TestMediaStreamClient());
+ return webkit_support::CreateMediaPlayer(frame, url, client,
+ test_media_stream_client_.get());
+#else
+ return webkit_support::CreateMediaPlayer(frame, url, client);
+#endif // ENABLE_WEBRTC
+}
+
// RenderViewObserver --------------------------------------------------------
void WebKitTestRunner::DidClearWindowObject(WebFrame* frame) {
« content/shell/webkit_test_runner.h ('K') | « content/shell/webkit_test_runner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698