| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "components/guest_view/browser/guest_view_manager.h" | 8 #include "components/guest_view/browser/guest_view_manager.h" |
| 9 #include "components/guest_view/browser/guest_view_manager_factory.h" | 9 #include "components/guest_view/browser/guest_view_manager_factory.h" |
| 10 #include "components/guest_view/browser/test_guest_view_manager.h" | 10 #include "components/guest_view/browser/test_guest_view_manager.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 content::ExecuteScript(embedder_web_contents_, | 139 content::ExecuteScript(embedder_web_contents_, |
| 140 base::StringPrintf("runTest('%s', '%s')", | 140 base::StringPrintf("runTest('%s', '%s')", |
| 141 test_name.c_str(), | 141 test_name.c_str(), |
| 142 app_embedded->id().c_str()))) | 142 app_embedded->id().c_str()))) |
| 143 << "Unable to start test."; | 143 << "Unable to start test."; |
| 144 ASSERT_TRUE(done_listener.WaitUntilSatisfied()); | 144 ASSERT_TRUE(done_listener.WaitUntilSatisfied()); |
| 145 } | 145 } |
| 146 | 146 |
| 147 void SetUpCommandLine(base::CommandLine* command_line) override { | 147 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 148 AppShellTest::SetUpCommandLine(command_line); | 148 AppShellTest::SetUpCommandLine(command_line); |
| 149 // This switch ensures that there will always be at least one media device, |
| 150 // even on machines without physical devices. This is required by tests that |
| 151 // request permission to use media devices. |
| 152 command_line->AppendSwitch("use-fake-device-for-media-stream"); |
| 149 | 153 |
| 150 bool use_cross_process_frames_for_guests = GetParam(); | 154 bool use_cross_process_frames_for_guests = GetParam(); |
| 151 if (use_cross_process_frames_for_guests) { | 155 if (use_cross_process_frames_for_guests) { |
| 152 command_line->AppendSwitchASCII( | 156 command_line->AppendSwitchASCII( |
| 153 switches::kEnableFeatures, | 157 switches::kEnableFeatures, |
| 154 ::features::kGuestViewCrossProcessFrames.name); | 158 ::features::kGuestViewCrossProcessFrames.name); |
| 155 } else { | 159 } else { |
| 156 command_line->AppendSwitchASCII( | 160 command_line->AppendSwitchASCII( |
| 157 switches::kDisableFeatures, | 161 switches::kDisableFeatures, |
| 158 ::features::kGuestViewCrossProcessFrames.name); | 162 ::features::kGuestViewCrossProcessFrames.name); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 #endif | 213 #endif |
| 210 // Tests that <appview> is able to navigate to another installed app. | 214 // Tests that <appview> is able to navigate to another installed app. |
| 211 IN_PROC_BROWSER_TEST_P(AppViewTest, | 215 IN_PROC_BROWSER_TEST_P(AppViewTest, |
| 212 MAYBE_TestAppViewWithUndefinedDataShouldSucceed) { | 216 MAYBE_TestAppViewWithUndefinedDataShouldSucceed) { |
| 213 RunTest("testAppViewWithUndefinedDataShouldSucceed", | 217 RunTest("testAppViewWithUndefinedDataShouldSucceed", |
| 214 "app_view/apitest", | 218 "app_view/apitest", |
| 215 "app_view/apitest/skeleton"); | 219 "app_view/apitest/skeleton"); |
| 216 } | 220 } |
| 217 | 221 |
| 218 } // namespace extensions | 222 } // namespace extensions |
| OLD | NEW |