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

Side by Side Diff: media/blink/resource_multibuffer_data_provider_unittest.cc

Issue 2738133002: Provide an overload to WebView::create that does not require a WebViewClient. (Closed)
Patch Set: Add a derived WebViewClient and use it when no client is passed. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/blink/resource_multibuffer_data_provider.h" 5 #include "media/blink/resource_multibuffer_data_provider.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 request.httpHeaderField( 60 request.httpHeaderField(
61 WebString::fromUTF8(net::HttpRequestHeaders::kAcceptEncoding)) 61 WebString::fromUTF8(net::HttpRequestHeaders::kAcceptEncoding))
62 .utf8(); 62 .utf8();
63 return (value.find("identity;q=1") != std::string::npos) && 63 return (value.find("identity;q=1") != std::string::npos) &&
64 (value.find("*;q=0") != std::string::npos); 64 (value.find("*;q=0") != std::string::npos);
65 } 65 }
66 66
67 class ResourceMultiBufferDataProviderTest : public testing::Test { 67 class ResourceMultiBufferDataProviderTest : public testing::Test {
68 public: 68 public:
69 ResourceMultiBufferDataProviderTest() 69 ResourceMultiBufferDataProviderTest()
70 : view_(WebView::create(nullptr, blink::WebPageVisibilityStateVisible)) { 70 : view_(WebView::create(blink::WebPageVisibilityStateVisible)) {
71 WebLocalFrame* frame = WebLocalFrame::create( 71 WebLocalFrame* frame = WebLocalFrame::create(
72 blink::WebTreeScopeType::Document, &client_, nullptr, nullptr); 72 blink::WebTreeScopeType::Document, &client_, nullptr, nullptr);
73 view_->setMainFrame(frame); 73 view_->setMainFrame(frame);
74 url_index_.reset(new UrlIndex(frame, 0)); 74 url_index_.reset(new UrlIndex(frame, 0));
75 75
76 for (int i = 0; i < kDataSize; ++i) { 76 for (int i = 0; i < kDataSize; ++i) {
77 data_[i] = i; 77 data_[i] = i;
78 } 78 }
79 } 79 }
80 80
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 TEST_F(ResourceMultiBufferDataProviderTest, TestRedirects) { 323 TEST_F(ResourceMultiBufferDataProviderTest, TestRedirects) {
324 // Test redirect. 324 // Test redirect.
325 Initialize(kHttpUrl, 0); 325 Initialize(kHttpUrl, 0);
326 Start(); 326 Start();
327 Redirect(kHttpRedirect); 327 Redirect(kHttpRedirect);
328 FullResponse(1024); 328 FullResponse(1024);
329 StopWhenLoad(); 329 StopWhenLoad();
330 } 330 }
331 331
332 } // namespace media 332 } // namespace media
OLDNEW
« 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