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

Unified Diff: chrome/browser/extensions/api/automation/automation_apitest.cc

Issue 1003283002: Enable chrome.automation.getDesktop on all aura platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/automation/automation_apitest.cc
diff --git a/chrome/browser/extensions/api/automation/automation_apitest.cc b/chrome/browser/extensions/api/automation/automation_apitest.cc
index b5e2dd302191f0022b58d5f543ad1e67c7ee9ce1..10f72ae51a941ef1e997857faef27feed1a70536 100644
--- a/chrome/browser/extensions/api/automation/automation_apitest.cc
+++ b/chrome/browser/extensions/api/automation/automation_apitest.cc
@@ -27,6 +27,12 @@
#include "ui/accessibility/ax_tree_serializer.h"
#include "ui/accessibility/tree_generator.h"
+#if defined(OS_CHROMEOS)
+#include "ash/accelerators/accelerator_controller.h"
+#include "ash/shell.h"
+#include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h"
+#endif
+
namespace extensions {
namespace {
@@ -152,6 +158,11 @@ IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopNotRequested) {
}
IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopActions) {
+ AutomationManagerAura::GetInstance()->Enable(browser()->profile());
+ // Trigger the shelf subtree to be computed.
+ ash::Shell::GetInstance()->accelerator_controller()->PerformActionIfEnabled(
+ ash::FOCUS_SHELF);
+
ASSERT_TRUE(RunExtensionSubtest("automation/tests/desktop", "actions.html"))
<< message_;
}
@@ -162,9 +173,10 @@ IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopLoadTabs) {
<< message_;
}
#else
-IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopNotSupported) {
- ASSERT_TRUE(RunExtensionSubtest("automation/tests/desktop",
- "desktop_not_supported.html")) << message_;
+IN_PROC_BROWSER_TEST_F(AutomationApiTest, LazyDesktop) {
+ ASSERT_TRUE(
+ RunExtensionSubtest("automation/tests/desktop", "lazy_desktop.html"))
+ << message_;
}
#endif

Powered by Google App Engine
This is Rietveld 408576698