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(), | 80 shell()->web_contents()->GetRenderViewHost(), L"", |
81 std::string(), | 81 L"window.domAutomationController.send(failMessage);", &fail_message)); |
82 "window.domAutomationController.send(failMessage);", | |
83 &fail_message)); | |
84 LOG(INFO) << "Test failed: " << fail_message; | 82 LOG(INFO) << "Test failed: " << fail_message; |
85 } | 83 } |
86 } | 84 } |
87 | 85 |
88 protected: | 86 protected: |
89 // Registers any CDM plugins not registered by default. | 87 // Registers any CDM plugins not registered by default. |
90 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 88 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
91 command_line->AppendSwitch(switches::kDisableAudio); | 89 command_line->AppendSwitch(switches::kDisableAudio); |
92 command_line->AppendSwitch(switches::kEnableEncryptedMedia); | 90 command_line->AppendSwitch(switches::kEnableEncryptedMedia); |
93 command_line->AppendSwitch(switches::kPpapiOutOfProcess); | 91 command_line->AppendSwitch(switches::kPpapiOutOfProcess); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 TestSimplePlayback("bear-320x240-av-enc_v.webm", kWebMAudioVideo, | 161 TestSimplePlayback("bear-320x240-av-enc_v.webm", kWebMAudioVideo, |
164 GetParam(), kExpected)); | 162 GetParam(), kExpected)); |
165 } | 163 } |
166 | 164 |
167 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, FrameChangeVideo) { | 165 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, FrameChangeVideo) { |
168 const string16 kExpected = ASCIIToUTF16("ENDED"); | 166 const string16 kExpected = ASCIIToUTF16("ENDED"); |
169 ASSERT_NO_FATAL_FAILURE(TestFrameSizeChange(GetParam(), kExpected)); | 167 ASSERT_NO_FATAL_FAILURE(TestFrameSizeChange(GetParam(), kExpected)); |
170 } | 168 } |
171 | 169 |
172 } // namespace content | 170 } // namespace content |
OLD | NEW |