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/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "net/test/embedded_test_server/embedded_test_server.h" | 27 #include "net/test/embedded_test_server/embedded_test_server.h" |
28 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
29 #include "ui/accessibility/ax_node.h" | 29 #include "ui/accessibility/ax_node.h" |
30 #include "ui/accessibility/ax_serializable_tree.h" | 30 #include "ui/accessibility/ax_serializable_tree.h" |
31 #include "ui/accessibility/ax_tree.h" | 31 #include "ui/accessibility/ax_tree.h" |
32 #include "ui/accessibility/ax_tree_serializer.h" | 32 #include "ui/accessibility/ax_tree_serializer.h" |
33 #include "ui/accessibility/tree_generator.h" | 33 #include "ui/accessibility/tree_generator.h" |
34 | 34 |
35 #if defined(OS_CHROMEOS) | 35 #if defined(OS_CHROMEOS) |
36 #include "ash/common/accelerators/accelerator_controller.h" | 36 #include "ash/common/accelerators/accelerator_controller.h" |
37 #include "ash/shell.h" | 37 #include "ash/common/wm_shell.h" |
38 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" | 38 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" |
39 #endif | 39 #endif |
40 | 40 |
41 namespace extensions { | 41 namespace extensions { |
42 | 42 |
43 namespace { | 43 namespace { |
44 static const char kDomain[] = "a.com"; | 44 static const char kDomain[] = "a.com"; |
45 static const char kSitesDir[] = "automation/sites"; | 45 static const char kSitesDir[] = "automation/sites"; |
46 static const char kGotTree[] = "got_tree"; | 46 static const char kGotTree[] = "got_tree"; |
47 } // anonymous namespace | 47 } // anonymous namespace |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopFocusIframe) { | 180 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopFocusIframe) { |
181 StartEmbeddedTestServer(); | 181 StartEmbeddedTestServer(); |
182 ASSERT_TRUE( | 182 ASSERT_TRUE( |
183 RunExtensionSubtest("automation/tests/desktop", "focus_iframe.html")) | 183 RunExtensionSubtest("automation/tests/desktop", "focus_iframe.html")) |
184 << message_; | 184 << message_; |
185 } | 185 } |
186 | 186 |
187 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopFocusViews) { | 187 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopFocusViews) { |
188 AutomationManagerAura::GetInstance()->Enable(browser()->profile()); | 188 AutomationManagerAura::GetInstance()->Enable(browser()->profile()); |
189 // Trigger the shelf subtree to be computed. | 189 // Trigger the shelf subtree to be computed. |
190 ash::Shell::GetInstance()->accelerator_controller()->PerformActionIfEnabled( | 190 ash::WmShell::Get()->accelerator_controller()->PerformActionIfEnabled( |
191 ash::FOCUS_SHELF); | 191 ash::FOCUS_SHELF); |
192 | 192 |
193 ASSERT_TRUE( | 193 ASSERT_TRUE( |
194 RunExtensionSubtest("automation/tests/desktop", "focus_views.html")) | 194 RunExtensionSubtest("automation/tests/desktop", "focus_views.html")) |
195 << message_; | 195 << message_; |
196 } | 196 } |
197 #endif | 197 #endif |
198 | 198 |
199 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopNotRequested) { | 199 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopNotRequested) { |
200 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", | 200 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", |
201 "desktop_not_requested.html")) << message_; | 201 "desktop_not_requested.html")) << message_; |
202 } | 202 } |
203 | 203 |
204 #if defined(OS_CHROMEOS) | 204 #if defined(OS_CHROMEOS) |
205 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopActions) { | 205 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopActions) { |
206 AutomationManagerAura::GetInstance()->Enable(browser()->profile()); | 206 AutomationManagerAura::GetInstance()->Enable(browser()->profile()); |
207 // Trigger the shelf subtree to be computed. | 207 // Trigger the shelf subtree to be computed. |
208 ash::Shell::GetInstance()->accelerator_controller()->PerformActionIfEnabled( | 208 ash::WmShell::Get()->accelerator_controller()->PerformActionIfEnabled( |
209 ash::FOCUS_SHELF); | 209 ash::FOCUS_SHELF); |
210 | 210 |
211 ASSERT_TRUE(RunExtensionSubtest("automation/tests/desktop", "actions.html")) | 211 ASSERT_TRUE(RunExtensionSubtest("automation/tests/desktop", "actions.html")) |
212 << message_; | 212 << message_; |
213 } | 213 } |
214 | 214 |
215 // Flaky, see http://crbug.com/435449 | 215 // Flaky, see http://crbug.com/435449 |
216 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DISABLED_DesktopLoadTabs) { | 216 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DISABLED_DesktopLoadTabs) { |
217 ASSERT_TRUE(RunExtensionSubtest("automation/tests/desktop", "load_tabs.html")) | 217 ASSERT_TRUE(RunExtensionSubtest("automation/tests/desktop", "load_tabs.html")) |
218 << message_; | 218 << message_; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 } | 258 } |
259 | 259 |
260 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DocumentSelection) { | 260 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DocumentSelection) { |
261 StartEmbeddedTestServer(); | 261 StartEmbeddedTestServer(); |
262 ASSERT_TRUE( | 262 ASSERT_TRUE( |
263 RunExtensionSubtest("automation/tests/tabs", "document_selection.html")) | 263 RunExtensionSubtest("automation/tests/tabs", "document_selection.html")) |
264 << message_; | 264 << message_; |
265 } | 265 } |
266 | 266 |
267 } // namespace extensions | 267 } // namespace extensions |
OLD | NEW |