| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "base/win/windows_version.h" | 8 #include "base/win/windows_version.h" |
| 9 #include "content/browser/media/media_browsertest.h" | 9 #include "content/browser/media/media_browsertest.h" |
| 10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
| 11 #include "content/public/test/browser_test_utils.h" | 11 #include "content/public/test/browser_test_utils.h" |
| 12 #include "content/shell/browser/shell.h" | 12 #include "content/shell/browser/shell.h" |
| 13 | 13 |
| 14 // Available key systems. | 14 // Available key systems. |
| 15 static const char kClearKeyKeySystem[] = "webkit-org.w3.clearkey"; | 15 static const char kClearKeyKeySystem[] = "webkit-org.w3.clearkey"; |
| 16 | 16 |
| 17 // Supported media types. | 17 // Supported media types. |
| 18 static const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\""; | 18 static const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\""; |
| 19 static const char kWebMVideoOnly[] = "video/webm; codecs=\"vp8\""; | 19 static const char kWebMVideoOnly[] = "video/webm; codecs=\"vp8\""; |
| 20 static const char kWebMAudioVideo[] = "video/webm; codecs=\"vorbis, vp8\""; | 20 static const char kWebMAudioVideo[] = "video/webm; codecs=\"vorbis, vp8\""; |
| 21 static const char kMP4AudioOnly[] = "audio/mp4; codecs=\"mp4a.40.2\""; | |
| 22 static const char kMP4VideoOnly[] = "video/mp4; codecs=\"avc1.4D4041\""; | |
| 23 | 21 |
| 24 // EME-specific test results and errors. | 22 // EME-specific test results and errors. |
| 25 static const char kEmeGkrException[] = "GENERATE_KEY_REQUEST_EXCEPTION"; | 23 static const char kEmeGkrException[] = "GENERATE_KEY_REQUEST_EXCEPTION"; |
| 26 static const char kEmeKeyError[] = "KEYERROR"; | 24 static const char kEmeKeyError[] = "KEYERROR"; |
| 27 | 25 |
| 28 // The type of video src used to load media. | 26 // The type of video src used to load media. |
| 29 enum SrcType { | 27 enum SrcType { |
| 30 SRC, | 28 SRC, |
| 31 MSE | 29 MSE |
| 32 }; | 30 }; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 } | 139 } |
| 142 | 140 |
| 143 // TODO(shadi): Do we need both this and InvalidKeySystem? | 141 // TODO(shadi): Do we need both this and InvalidKeySystem? |
| 144 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, UnknownKeySystemThrowsException) { | 142 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, UnknownKeySystemThrowsException) { |
| 145 RunEncryptedMediaTest("encrypted_media_player.html", "bear-a-enc_a.webm", | 143 RunEncryptedMediaTest("encrypted_media_player.html", "bear-a-enc_a.webm", |
| 146 kWebMAudioOnly, "com.example.foo", SRC, | 144 kWebMAudioOnly, "com.example.foo", SRC, |
| 147 kEmeGkrException); | 145 kEmeGkrException); |
| 148 } | 146 } |
| 149 | 147 |
| 150 } // namespace content | 148 } // namespace content |
| OLD | NEW |