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/files/file_path.h" | 5 #include "base/files/file_path.h" |
6 #include "base/location.h" | 6 #include "base/location.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 "automation/tests/tabs_automation_hosts", "permissions.html")) | 152 "automation/tests/tabs_automation_hosts", "permissions.html")) |
153 << message_; | 153 << message_; |
154 } | 154 } |
155 | 155 |
156 #if defined(USE_AURA) | 156 #if defined(USE_AURA) |
157 IN_PROC_BROWSER_TEST_F(AutomationApiTest, Desktop) { | 157 IN_PROC_BROWSER_TEST_F(AutomationApiTest, Desktop) { |
158 ASSERT_TRUE(RunExtensionSubtest("automation/tests/desktop", "desktop.html")) | 158 ASSERT_TRUE(RunExtensionSubtest("automation/tests/desktop", "desktop.html")) |
159 << message_; | 159 << message_; |
160 } | 160 } |
161 | 161 |
| 162 #if defined(OS_CHROMEOS) |
| 163 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopInitialFocus) { |
| 164 ASSERT_TRUE( |
| 165 RunExtensionSubtest("automation/tests/desktop", "initial_focus.html")) |
| 166 << message_; |
| 167 } |
| 168 |
| 169 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopFocusWeb) { |
| 170 ASSERT_TRUE( |
| 171 RunExtensionSubtest("automation/tests/desktop", "focus_web.html")) |
| 172 << message_; |
| 173 } |
| 174 |
| 175 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopFocusViews) { |
| 176 AutomationManagerAura::GetInstance()->Enable(browser()->profile()); |
| 177 // Trigger the shelf subtree to be computed. |
| 178 ash::Shell::GetInstance()->accelerator_controller()->PerformActionIfEnabled( |
| 179 ash::FOCUS_SHELF); |
| 180 |
| 181 ASSERT_TRUE( |
| 182 RunExtensionSubtest("automation/tests/desktop", "focus_views.html")) |
| 183 << message_; |
| 184 } |
| 185 #endif |
| 186 |
162 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopNotRequested) { | 187 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopNotRequested) { |
163 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", | 188 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", |
164 "desktop_not_requested.html")) << message_; | 189 "desktop_not_requested.html")) << message_; |
165 } | 190 } |
166 | 191 |
167 #if defined(OS_CHROMEOS) | 192 #if defined(OS_CHROMEOS) |
168 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopActions) { | 193 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopActions) { |
169 AutomationManagerAura::GetInstance()->Enable(browser()->profile()); | 194 AutomationManagerAura::GetInstance()->Enable(browser()->profile()); |
170 // Trigger the shelf subtree to be computed. | 195 // Trigger the shelf subtree to be computed. |
171 ash::Shell::GetInstance()->accelerator_controller()->PerformActionIfEnabled( | 196 ash::Shell::GetInstance()->accelerator_controller()->PerformActionIfEnabled( |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 } | 246 } |
222 | 247 |
223 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DocumentSelection) { | 248 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DocumentSelection) { |
224 StartEmbeddedTestServer(); | 249 StartEmbeddedTestServer(); |
225 ASSERT_TRUE( | 250 ASSERT_TRUE( |
226 RunExtensionSubtest("automation/tests/tabs", "document_selection.html")) | 251 RunExtensionSubtest("automation/tests/tabs", "document_selection.html")) |
227 << message_; | 252 << message_; |
228 } | 253 } |
229 | 254 |
230 } // namespace extensions | 255 } // namespace extensions |
OLD | NEW |