OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "content/browser/media/media_browsertest.h" | 7 #include "content/browser/media/media_browsertest.h" |
8 #include "content/public/test/browser_test_utils.h" | 8 #include "content/public/test/browser_test_utils.h" |
9 #include "content/public/test/content_browser_test_utils.h" | 9 #include "content/public/test/content_browser_test_utils.h" |
10 #include "content/shell/browser/shell.h" | 10 #include "content/shell/browser/shell.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 const char kTheoraProbably[] = ""; | 38 const char kTheoraProbably[] = ""; |
39 const char kOpusProbably[] = ""; | 39 const char kOpusProbably[] = ""; |
40 #endif // !OS_ANDROID | 40 #endif // !OS_ANDROID |
41 | 41 |
42 namespace content { | 42 namespace content { |
43 | 43 |
44 class MediaCanPlayTypeTest : public MediaBrowserTest { | 44 class MediaCanPlayTypeTest : public MediaBrowserTest { |
45 public: | 45 public: |
46 MediaCanPlayTypeTest() : url_("about:blank") { } | 46 MediaCanPlayTypeTest() : url_("about:blank") { } |
47 | 47 |
48 virtual void SetUpOnMainThread() OVERRIDE { | 48 virtual void SetUpOnMainThread() override { |
49 NavigateToURL(shell(), url_); | 49 NavigateToURL(shell(), url_); |
50 } | 50 } |
51 | 51 |
52 std::string CanPlay(const std::string& type) { | 52 std::string CanPlay(const std::string& type) { |
53 std::string command("document.createElement('video').canPlayType("); | 53 std::string command("document.createElement('video').canPlayType("); |
54 command.append(type); | 54 command.append(type); |
55 command.append(")"); | 55 command.append(")"); |
56 | 56 |
57 std::string result; | 57 std::string result; |
58 EXPECT_TRUE(ExecuteScriptAndExtractString( | 58 EXPECT_TRUE(ExecuteScriptAndExtractString( |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 CanPlay("'application/vnd.apple.mpegurl; " | 591 CanPlay("'application/vnd.apple.mpegurl; " |
592 "codecs=\"avc1.42E01E, mp4a.40\"'")); | 592 "codecs=\"avc1.42E01E, mp4a.40\"'")); |
593 EXPECT_EQ(maybeCanPlayHLS, | 593 EXPECT_EQ(maybeCanPlayHLS, |
594 CanPlay("'application/vnd.apple.mpegurl; " | 594 CanPlay("'application/vnd.apple.mpegurl; " |
595 "codecs=\"avc3.42E01E, mp4a.40\"'")); | 595 "codecs=\"avc3.42E01E, mp4a.40\"'")); |
596 | 596 |
597 TestMPEGUnacceptableCombinations("application/vnd.apple.mpegurl"); | 597 TestMPEGUnacceptableCombinations("application/vnd.apple.mpegurl"); |
598 } | 598 } |
599 | 599 |
600 } // namespace content | 600 } // namespace content |
OLD | NEW |