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

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

Issue 1991273003: Fire visibilityChange event on out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 static const int kDataSize = 32 << 10; 216 static const int kDataSize = 32 << 10;
217 217
218 static const char kHttpUrl[] = "http://localhost/foo.webm"; 218 static const char kHttpUrl[] = "http://localhost/foo.webm";
219 static const char kFileUrl[] = "file:///tmp/bar.webm"; 219 static const char kFileUrl[] = "file:///tmp/bar.webm";
220 static const char kHttpDifferentPathUrl[] = "http://localhost/bar.webm"; 220 static const char kHttpDifferentPathUrl[] = "http://localhost/bar.webm";
221 static const char kHttpDifferentOriginUrl[] = "http://127.0.0.1/foo.webm"; 221 static const char kHttpDifferentOriginUrl[] = "http://127.0.0.1/foo.webm";
222 222
223 class MultibufferDataSourceTest : public testing::Test { 223 class MultibufferDataSourceTest : public testing::Test {
224 public: 224 public:
225 MultibufferDataSourceTest() 225 MultibufferDataSourceTest()
226 : view_(WebView::create(NULL)), 226 : view_(WebView::create(nullptr, blink::WebPageVisibilityStateVisible)),
227 frame_( 227 frame_(
228 WebLocalFrame::create(blink::WebTreeScopeType::Document, &client_)), 228 WebLocalFrame::create(blink::WebTreeScopeType::Document, &client_)),
229 preload_(MultibufferDataSource::AUTO), 229 preload_(MultibufferDataSource::AUTO),
230 url_index_(make_linked_ptr(new TestUrlIndex(frame_))) { 230 url_index_(make_linked_ptr(new TestUrlIndex(frame_))) {
231 view_->setMainFrame(frame_); 231 view_->setMainFrame(frame_);
232 } 232 }
233 233
234 virtual ~MultibufferDataSourceTest() { 234 virtual ~MultibufferDataSourceTest() {
235 view_->close(); 235 view_->close();
236 frame_->close(); 236 frame_->close();
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1419 EXPECT_CALL(host_, AddBufferedByteRange(0, kDataSize * 2)); 1419 EXPECT_CALL(host_, AddBufferedByteRange(0, kDataSize * 2));
1420 FinishLoading(); 1420 FinishLoading();
1421 1421
1422 // Done loading, now we should know the length. 1422 // Done loading, now we should know the length.
1423 EXPECT_TRUE(data_source_->GetSize(&len)); 1423 EXPECT_TRUE(data_source_->GetSize(&len));
1424 EXPECT_EQ(kDataSize, len); 1424 EXPECT_EQ(kDataSize, len);
1425 Stop(); 1425 Stop();
1426 } 1426 }
1427 1427
1428 } // namespace media 1428 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/buffered_resource_loader_unittest.cc ('k') | media/blink/resource_multibuffer_data_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698