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/files/file_enumerator.h" | 6 #include "base/files/file_enumerator.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/process/launch.h" | 8 #include "base/process/launch.h" |
9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 EXPECT_FALSE(command_line->HasSwitch(switches::kUseFakeUIForMediaStream)); | 54 EXPECT_FALSE(command_line->HasSwitch(switches::kUseFakeUIForMediaStream)); |
55 | 55 |
56 // The video playback will not work without a GPU, so force its use here. | 56 // The video playback will not work without a GPU, so force its use here. |
57 command_line->AppendSwitch(switches::kUseGpuInTests); | 57 command_line->AppendSwitch(switches::kUseGpuInTests); |
58 CommandLine::ForCurrentProcess()->AppendSwitch( | 58 CommandLine::ForCurrentProcess()->AppendSwitch( |
59 switches::kUseFakeDeviceForMediaStream); | 59 switches::kUseFakeDeviceForMediaStream); |
60 } | 60 } |
61 | 61 |
62 virtual void TearDown() OVERRIDE { | 62 virtual void TearDown() OVERRIDE { |
63 // Kill any processes we may have brought up. | 63 // Kill any processes we may have brought up. |
| 64 // TODO(phoglund): Temporarily disabling on win to debug |
| 65 // test hang-on-shutdown. |
| 66 LOG(INFO) << "Entering TearDown"; |
| 67 #if !defined(OS_WIN) |
64 if (dev_appserver_ != base::kNullProcessHandle) | 68 if (dev_appserver_ != base::kNullProcessHandle) |
65 base::KillProcess(dev_appserver_, 0, false); | 69 base::KillProcess(dev_appserver_, 0, false); |
| 70 #endif |
66 // TODO(phoglund): Find some way to shut down Firefox cleanly on Windows. | 71 // TODO(phoglund): Find some way to shut down Firefox cleanly on Windows. |
67 if (firefox_ != base::kNullProcessHandle) | 72 if (firefox_ != base::kNullProcessHandle) |
68 base::KillProcess(firefox_, 0, false); | 73 base::KillProcess(firefox_, 0, false); |
| 74 LOG(INFO) << "Exiting TearDown"; |
69 } | 75 } |
70 | 76 |
71 protected: | 77 protected: |
72 bool LaunchApprtcInstanceOnLocalhost() { | 78 bool LaunchApprtcInstanceOnLocalhost() { |
73 base::FilePath appengine_dev_appserver = | 79 base::FilePath appengine_dev_appserver = |
74 GetSourceDir().Append( | 80 GetSourceDir().Append( |
75 FILE_PATH_LITERAL("../google_appengine/dev_appserver.py")); | 81 FILE_PATH_LITERAL("../google_appengine/dev_appserver.py")); |
76 if (!base::PathExists(appengine_dev_appserver)) { | 82 if (!base::PathExists(appengine_dev_appserver)) { |
77 LOG(ERROR) << "Missing appengine sdk at " << | 83 LOG(ERROR) << "Missing appengine sdk at " << |
78 appengine_dev_appserver.value() << ". " << kAdviseOnGclientSolution; | 84 appengine_dev_appserver.value() << ". " << kAdviseOnGclientSolution; |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 base::RandInt(0, 65536))); | 316 base::RandInt(0, 65536))); |
311 content::WebContents* chrome_tab = OpenPageAndAcceptUserMedia(room_url); | 317 content::WebContents* chrome_tab = OpenPageAndAcceptUserMedia(room_url); |
312 | 318 |
313 ASSERT_TRUE(LaunchFirefoxWithUrl(room_url)); | 319 ASSERT_TRUE(LaunchFirefoxWithUrl(room_url)); |
314 | 320 |
315 ASSERT_TRUE(WaitForCallToComeUp(chrome_tab)); | 321 ASSERT_TRUE(WaitForCallToComeUp(chrome_tab)); |
316 | 322 |
317 // Ensure Firefox manages to send video our way. | 323 // Ensure Firefox manages to send video our way. |
318 ASSERT_TRUE(DetectRemoteVideoPlaying(chrome_tab)); | 324 ASSERT_TRUE(DetectRemoteVideoPlaying(chrome_tab)); |
319 } | 325 } |
OLD | NEW |