| OLD | NEW |
| 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/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 7 #include "content/renderer/media/android/media_info_loader.h" | 8 #include "content/renderer/media/android/media_info_loader.h" |
| 8 #include "content/test/mock_webframeclient.h" | 9 #include "content/test/mock_webframeclient.h" |
| 9 #include "content/test/mock_weburlloader.h" | 10 #include "content/test/mock_weburlloader.h" |
| 10 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" | 11 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" |
| 11 #include "third_party/WebKit/public/platform/WebURLError.h" | 12 #include "third_party/WebKit/public/platform/WebURLError.h" |
| 12 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 13 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 13 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 14 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
| 14 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 15 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 15 #include "third_party/WebKit/public/web/WebView.h" | 16 #include "third_party/WebKit/public/web/WebView.h" |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 } | 197 } |
| 197 | 198 |
| 198 TEST_F(MediaInfoLoaderTest, CORSAccessCheckFailed) { | 199 TEST_F(MediaInfoLoaderTest, CORSAccessCheckFailed) { |
| 199 Initialize(kHttpUrl, blink::WebMediaPlayer::CORSModeUseCredentials); | 200 Initialize(kHttpUrl, blink::WebMediaPlayer::CORSModeUseCredentials); |
| 200 Start(); | 201 Start(); |
| 201 SendResponse(kHttpNotFound, MediaInfoLoader::kFailed); | 202 SendResponse(kHttpNotFound, MediaInfoLoader::kFailed); |
| 202 EXPECT_FALSE(loader_->DidPassCORSAccessCheck()); | 203 EXPECT_FALSE(loader_->DidPassCORSAccessCheck()); |
| 203 } | 204 } |
| 204 | 205 |
| 205 } // namespace content | 206 } // namespace content |
| OLD | NEW |