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

Unified Diff: media/blink/resource_multibuffer_data_provider_unittest.cc

Issue 2389493002: Revert of Require WebLocalFrame to be created with a non-null client (Closed)
Patch Set: Created 4 years, 3 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 | « media/blink/multibuffer_data_source_unittest.cc ('k') | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/resource_multibuffer_data_provider_unittest.cc
diff --git a/media/blink/resource_multibuffer_data_provider_unittest.cc b/media/blink/resource_multibuffer_data_provider_unittest.cc
index fcfbeba7bade92de119bbce0ddd46f4183c54086..518fc5e861fa8e6a951e6301df3630fa8c3dfebf 100644
--- a/media/blink/resource_multibuffer_data_provider_unittest.cc
+++ b/media/blink/resource_multibuffer_data_provider_unittest.cc
@@ -17,6 +17,7 @@
#include "base/strings/stringprintf.h"
#include "media/base/media_log.h"
#include "media/base/seekable_buffer.h"
+#include "media/blink/mock_webframeclient.h"
#include "media/blink/mock_weburlloader.h"
#include "media/blink/url_index.h"
#include "net/base/net_errors.h"
@@ -26,7 +27,6 @@
#include "third_party/WebKit/public/platform/WebURLError.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
#include "third_party/WebKit/public/platform/WebURLResponse.h"
-#include "third_party/WebKit/public/web/WebFrameClient.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebView.h"
@@ -71,11 +71,11 @@
class ResourceMultiBufferDataProviderTest : public testing::Test {
public:
ResourceMultiBufferDataProviderTest()
- : view_(WebView::create(nullptr, blink::WebPageVisibilityStateVisible)) {
- WebLocalFrame* frame =
- WebLocalFrame::create(blink::WebTreeScopeType::Document, &client_);
- view_->setMainFrame(frame);
- url_index_.reset(new UrlIndex(frame, 0));
+ : view_(WebView::create(nullptr, blink::WebPageVisibilityStateVisible)),
+ frame_(WebLocalFrame::create(blink::WebTreeScopeType::Document,
+ &client_)) {
+ view_->setMainFrame(frame_);
+ url_index_.reset(new UrlIndex(frame_, 0));
for (int i = 0; i < kDataSize; ++i) {
data_[i] = i;
@@ -84,6 +84,7 @@
virtual ~ResourceMultiBufferDataProviderTest() {
view_->close();
+ frame_->close();
}
void Initialize(const char* url, int first_position) {
@@ -233,8 +234,9 @@
ResourceMultiBufferDataProvider* loader_;
NiceMock<MockWebURLLoader>* url_loader_;
- blink::WebFrameClient client_;
+ MockWebFrameClient client_;
WebView* view_;
+ WebLocalFrame* frame_;
base::MessageLoop message_loop_;
« no previous file with comments | « media/blink/multibuffer_data_source_unittest.cc ('k') | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698