OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 title_watcher.AlsoWaitForTitle(kFailed); | 70 title_watcher.AlsoWaitForTitle(kFailed); |
71 | 71 |
72 NavigateToURL(shell(), player_gurl); | 72 NavigateToURL(shell(), player_gurl); |
73 | 73 |
74 string16 final_title = title_watcher.WaitAndGetTitle(); | 74 string16 final_title = title_watcher.WaitAndGetTitle(); |
75 EXPECT_EQ(expectation, final_title); | 75 EXPECT_EQ(expectation, final_title); |
76 | 76 |
77 if (final_title == kFailed) { | 77 if (final_title == kFailed) { |
78 std::string fail_message; | 78 std::string fail_message; |
79 EXPECT_TRUE(ExecuteJavaScriptAndExtractString( | 79 EXPECT_TRUE(ExecuteJavaScriptAndExtractString( |
80 shell()->web_contents()->GetRenderViewHost(), L"", | 80 shell()->web_contents()->GetRenderViewHost(), |
81 L"window.domAutomationController.send(failMessage);", &fail_message)); | 81 std::string(), |
| 82 "window.domAutomationController.send(failMessage);", |
| 83 &fail_message)); |
82 LOG(INFO) << "Test failed: " << fail_message; | 84 LOG(INFO) << "Test failed: " << fail_message; |
83 } | 85 } |
84 } | 86 } |
85 | 87 |
86 protected: | 88 protected: |
87 // Registers any CDM plugins not registered by default. | 89 // Registers any CDM plugins not registered by default. |
88 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 90 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
89 command_line->AppendSwitch(switches::kDisableAudio); | 91 command_line->AppendSwitch(switches::kDisableAudio); |
90 command_line->AppendSwitch(switches::kEnableEncryptedMedia); | 92 command_line->AppendSwitch(switches::kEnableEncryptedMedia); |
91 command_line->AppendSwitch(switches::kPpapiOutOfProcess); | 93 command_line->AppendSwitch(switches::kPpapiOutOfProcess); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 TestSimplePlayback("bear-320x240-av-enc_v.webm", kWebMAudioVideo, | 163 TestSimplePlayback("bear-320x240-av-enc_v.webm", kWebMAudioVideo, |
162 GetParam(), kExpected)); | 164 GetParam(), kExpected)); |
163 } | 165 } |
164 | 166 |
165 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, FrameChangeVideo) { | 167 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, FrameChangeVideo) { |
166 const string16 kExpected = ASCIIToUTF16("ENDED"); | 168 const string16 kExpected = ASCIIToUTF16("ENDED"); |
167 ASSERT_NO_FATAL_FAILURE(TestFrameSizeChange(GetParam(), kExpected)); | 169 ASSERT_NO_FATAL_FAILURE(TestFrameSizeChange(GetParam(), kExpected)); |
168 } | 170 } |
169 | 171 |
170 } // namespace content | 172 } // namespace content |
OLD | NEW |