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

Side by Side Diff: content/renderer/media/android/media_info_loader_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
« no previous file with comments | « content/public/renderer/render_view.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "content/renderer/media/android/media_info_loader.h" 9 #include "content/renderer/media/android/media_info_loader.h"
10 #include "content/test/mock_webframeclient.h" 10 #include "content/test/mock_webframeclient.h"
(...skipping 22 matching lines...) Expand all
33 static const char kHttpRedirectToSameDomainUrl2[] = "http://test/ing2"; 33 static const char kHttpRedirectToSameDomainUrl2[] = "http://test/ing2";
34 static const char kHttpRedirectToDifferentDomainUrl1[] = "http://test2"; 34 static const char kHttpRedirectToDifferentDomainUrl1[] = "http://test2";
35 static const char kHttpDataUrl[] = "data:audio/wav;base64,UklGRhwMAABXQVZFZm10"; 35 static const char kHttpDataUrl[] = "data:audio/wav;base64,UklGRhwMAABXQVZFZm10";
36 36
37 static const int kHttpOK = 200; 37 static const int kHttpOK = 200;
38 static const int kHttpNotFound = 404; 38 static const int kHttpNotFound = 404;
39 39
40 class MediaInfoLoaderTest : public testing::Test { 40 class MediaInfoLoaderTest : public testing::Test {
41 public: 41 public:
42 MediaInfoLoaderTest() 42 MediaInfoLoaderTest()
43 : view_(WebView::create(NULL)), 43 : view_(WebView::create(nullptr, blink::WebPageVisibilityStateVisible)),
44 frame_(WebLocalFrame::create(blink::WebTreeScopeType::Document, 44 frame_(WebLocalFrame::create(blink::WebTreeScopeType::Document,
45 &client_)) { 45 &client_)) {
46 view_->setMainFrame(frame_); 46 view_->setMainFrame(frame_);
47 } 47 }
48 48
49 virtual ~MediaInfoLoaderTest() { 49 virtual ~MediaInfoLoaderTest() {
50 view_->close(); 50 view_->close();
51 frame_->close(); 51 frame_->close();
52 } 52 }
53 53
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 } 198 }
199 199
200 TEST_F(MediaInfoLoaderTest, CORSAccessCheckFailed) { 200 TEST_F(MediaInfoLoaderTest, CORSAccessCheckFailed) {
201 Initialize(kHttpUrl, blink::WebMediaPlayer::CORSModeUseCredentials); 201 Initialize(kHttpUrl, blink::WebMediaPlayer::CORSModeUseCredentials);
202 Start(); 202 Start();
203 SendResponse(kHttpNotFound, MediaInfoLoader::kFailed); 203 SendResponse(kHttpNotFound, MediaInfoLoader::kFailed);
204 EXPECT_FALSE(loader_->DidPassCORSAccessCheck()); 204 EXPECT_FALSE(loader_->DidPassCORSAccessCheck());
205 } 205 }
206 206
207 } // namespace content 207 } // namespace content
OLDNEW
« no previous file with comments | « content/public/renderer/render_view.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698