OLD | NEW |
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 "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 base::FilePath GetSourceDir() { | 112 base::FilePath GetSourceDir() { |
113 base::FilePath source_dir; | 113 base::FilePath source_dir; |
114 PathService::Get(base::DIR_SOURCE_ROOT, &source_dir); | 114 PathService::Get(base::DIR_SOURCE_ROOT, &source_dir); |
115 return source_dir; | 115 return source_dir; |
116 } | 116 } |
117 | 117 |
118 private: | 118 private: |
119 base::ProcessHandle dev_appserver_; | 119 base::ProcessHandle dev_appserver_; |
120 }; | 120 }; |
121 | 121 |
122 IN_PROC_BROWSER_TEST_F(WebrtcApprtcBrowserTest, MANUAL_WorksOnApprtc) { | 122 #if defined(OS_WIN) |
| 123 #define MAYBE_MANUAL_WorksOnApprtc DISABLED_MANUAL_WorksOnApprtc |
| 124 #else |
| 125 #define MAYBE_MANUAL_WorksOnApprtc MANUAL_WorksOnApprtc |
| 126 #endif |
| 127 |
| 128 IN_PROC_BROWSER_TEST_F(WebrtcApprtcBrowserTest, MAYBE_MANUAL_WorksOnApprtc) { |
123 ASSERT_TRUE(LaunchApprtcInstanceOnLocalhost()); | 129 ASSERT_TRUE(LaunchApprtcInstanceOnLocalhost()); |
124 while (!LocalApprtcInstanceIsUp()) | 130 while (!LocalApprtcInstanceIsUp()) |
125 LOG(INFO) << "Waiting for AppRTC to come up..."; | 131 LOG(INFO) << "Waiting for AppRTC to come up..."; |
126 | 132 |
127 GURL room_url = GURL(base::StringPrintf("localhost:9999?r=room_%d", | 133 GURL room_url = GURL(base::StringPrintf("localhost:9999?r=room_%d", |
128 base::RandInt(0, 65536))); | 134 base::RandInt(0, 65536))); |
129 | 135 |
130 chrome::AddBlankTabAt(browser(), -1, true); | 136 chrome::AddBlankTabAt(browser(), -1, true); |
131 content::WebContents* left_tab = OpenPageAndAcceptUserMedia(room_url); | 137 content::WebContents* left_tab = OpenPageAndAcceptUserMedia(room_url); |
132 // TODO(phoglund): Remove when this bug gets fixed: | 138 // TODO(phoglund): Remove when this bug gets fixed: |
133 // http://code.google.com/p/webrtc/issues/detail?id=1742 | 139 // http://code.google.com/p/webrtc/issues/detail?id=1742 |
134 SleepInJavascript(left_tab, 5000); | 140 SleepInJavascript(left_tab, 5000); |
135 chrome::AddBlankTabAt(browser(), -1, true); | 141 chrome::AddBlankTabAt(browser(), -1, true); |
136 content::WebContents* right_tab = OpenPageAndAcceptUserMedia(room_url); | 142 content::WebContents* right_tab = OpenPageAndAcceptUserMedia(room_url); |
137 | 143 |
138 ASSERT_TRUE(WaitForCallToComeUp(left_tab)); | 144 ASSERT_TRUE(WaitForCallToComeUp(left_tab)); |
139 ASSERT_TRUE(WaitForCallToComeUp(right_tab)); | 145 ASSERT_TRUE(WaitForCallToComeUp(right_tab)); |
140 | 146 |
141 ASSERT_TRUE(StopApprtcInstance()); | 147 ASSERT_TRUE(StopApprtcInstance()); |
142 } | 148 } |
OLD | NEW |