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

Side by Side Diff: trunk/src/chrome/browser/media/chrome_webrtc_apprtc_browsertest.cc

Issue 217553002: Revert 260213 "Relanding Switched main WebRTC browser tests to u..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/process/launch.h" 7 #include "base/process/launch.h"
8 #include "base/rand_util.h" 8 #include "base/rand_util.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/win/windows_version.h" 10 #include "base/win/windows_version.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 &result)) 112 &result))
113 return false; 113 return false;
114 114
115 return result == kTitlePageOfAppEngineAdminPage; 115 return result == kTitlePageOfAppEngineAdminPage;
116 } 116 }
117 117
118 bool WaitForCallToComeUp(content::WebContents* tab_contents) { 118 bool WaitForCallToComeUp(content::WebContents* tab_contents) {
119 // Apprtc will set remoteVideo.style.opacity to 1 when the call comes up. 119 // Apprtc will set remoteVideo.style.opacity to 1 when the call comes up.
120 std::string javascript = 120 std::string javascript =
121 "window.domAutomationController.send(remoteVideo.style.opacity)"; 121 "window.domAutomationController.send(remoteVideo.style.opacity)";
122 return test::PollingWaitUntil(javascript, "1", tab_contents); 122 return PollingWaitUntil(javascript, "1", tab_contents);
123 } 123 }
124 124
125 bool EvalInJavascriptFile(content::WebContents* tab_contents, 125 bool EvalInJavascriptFile(content::WebContents* tab_contents,
126 const base::FilePath& path) { 126 const base::FilePath& path) {
127 std::string javascript; 127 std::string javascript;
128 if (!ReadFileToString(path, &javascript)) { 128 if (!ReadFileToString(path, &javascript)) {
129 LOG(ERROR) << "Missing javascript code at " << path.value() << "."; 129 LOG(ERROR) << "Missing javascript code at " << path.value() << ".";
130 return false; 130 return false;
131 } 131 }
132 132
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 base::RandInt(0, 65536))); 241 base::RandInt(0, 65536)));
242 content::WebContents* chrome_tab = OpenPageAndAcceptUserMedia(room_url); 242 content::WebContents* chrome_tab = OpenPageAndAcceptUserMedia(room_url);
243 243
244 ASSERT_TRUE(LaunchFirefoxWithUrl(room_url)); 244 ASSERT_TRUE(LaunchFirefoxWithUrl(room_url));
245 245
246 ASSERT_TRUE(WaitForCallToComeUp(chrome_tab)); 246 ASSERT_TRUE(WaitForCallToComeUp(chrome_tab));
247 247
248 // Ensure Firefox manages to send video our way. 248 // Ensure Firefox manages to send video our way.
249 ASSERT_TRUE(DetectRemoteVideoPlaying(chrome_tab)); 249 ASSERT_TRUE(DetectRemoteVideoPlaying(chrome_tab));
250 } 250 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698