Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: chrome/browser/extensions/api/automation/automation_apitest.cc

Issue 1589623002: Keep track of accessibility focus across windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopInitialFocus) {
163 ASSERT_TRUE(
164 RunExtensionSubtest("automation/tests/desktop", "initial_focus.html"))
165 << message_;
166 }
167
168 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopFocusWeb) {
David Tseng 2016/01/28 02:00:56 Should this work on all platforms?
dmazzoni 2016/01/30 00:02:41 Yes, this should work on all Aura platforms.
169 ASSERT_TRUE(
170 RunExtensionSubtest("automation/tests/desktop", "focus_web.html"))
171 << message_;
172 }
173
174 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopFocusViews) {
175 AutomationManagerAura::GetInstance()->Enable(browser()->profile());
176 // Trigger the shelf subtree to be computed.
177 ash::Shell::GetInstance()->accelerator_controller()->PerformActionIfEnabled(
178 ash::FOCUS_SHELF);
179
180 ASSERT_TRUE(
181 RunExtensionSubtest("automation/tests/desktop", "focus_views.html"))
182 << message_;
183 }
184
162 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopNotRequested) { 185 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopNotRequested) {
163 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", 186 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs",
164 "desktop_not_requested.html")) << message_; 187 "desktop_not_requested.html")) << message_;
165 } 188 }
166 189
167 #if defined(OS_CHROMEOS) 190 #if defined(OS_CHROMEOS)
168 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopActions) { 191 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopActions) {
169 AutomationManagerAura::GetInstance()->Enable(browser()->profile()); 192 AutomationManagerAura::GetInstance()->Enable(browser()->profile());
170 // Trigger the shelf subtree to be computed. 193 // Trigger the shelf subtree to be computed.
171 ash::Shell::GetInstance()->accelerator_controller()->PerformActionIfEnabled( 194 ash::Shell::GetInstance()->accelerator_controller()->PerformActionIfEnabled(
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 } 244 }
222 245
223 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DocumentSelection) { 246 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DocumentSelection) {
224 StartEmbeddedTestServer(); 247 StartEmbeddedTestServer();
225 ASSERT_TRUE( 248 ASSERT_TRUE(
226 RunExtensionSubtest("automation/tests/tabs", "document_selection.html")) 249 RunExtensionSubtest("automation/tests/tabs", "document_selection.html"))
227 << message_; 250 << message_;
228 } 251 }
229 252
230 } // namespace extensions 253 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698