Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: content/browser/encrypted_media_browsertest.cc

Issue 11753009: Simplify ExecuteJavaScript* functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update prerender_browsertest.cc. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 title_watcher.AlsoWaitForTitle(kError); 69 title_watcher.AlsoWaitForTitle(kError);
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(ExecuteScriptAndExtractString(
80 shell()->web_contents()->GetRenderViewHost(), 80 shell()->web_contents(),
81 std::string(),
82 "window.domAutomationController.send(failMessage);", 81 "window.domAutomationController.send(failMessage);",
83 &fail_message)); 82 &fail_message));
84 LOG(INFO) << "Test failed: " << fail_message; 83 LOG(INFO) << "Test failed: " << fail_message;
85 } 84 }
86 } 85 }
87 86
88 protected: 87 protected:
89 // Registers any CDM plugins not registered by default. 88 // Registers any CDM plugins not registered by default.
90 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 89 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
91 command_line->AppendSwitch(switches::kDisableAudio); 90 command_line->AppendSwitch(switches::kDisableAudio);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 TestSimplePlayback("bear-320x240-av-enc_v.webm", kWebMAudioVideo, 162 TestSimplePlayback("bear-320x240-av-enc_v.webm", kWebMAudioVideo,
164 GetParam(), kExpected)); 163 GetParam(), kExpected));
165 } 164 }
166 165
167 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, FrameChangeVideo) { 166 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, FrameChangeVideo) {
168 const string16 kExpected = ASCIIToUTF16("ENDED"); 167 const string16 kExpected = ASCIIToUTF16("ENDED");
169 ASSERT_NO_FATAL_FAILURE(TestFrameSizeChange(GetParam(), kExpected)); 168 ASSERT_NO_FATAL_FAILURE(TestFrameSizeChange(GetParam(), kExpected));
170 } 169 }
171 170
172 } // namespace content 171 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/dom_storage/dom_storage_browsertest.cc ('k') | content/browser/fileapi/file_system_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698