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

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

Issue 667713006: Implement automatic load of composed/embedded automation trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Created 6 years, 1 month 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/path_service.h" 6 #include "base/path_service.h"
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "chrome/browser/extensions/api/automation_internal/automation_util.h" 8 #include "chrome/browser/extensions/api/automation_internal/automation_util.h"
9 #include "chrome/browser/extensions/chrome_extension_function.h" 9 #include "chrome/browser/extensions/chrome_extension_function.h"
10 #include "chrome/browser/extensions/extension_apitest.h" 10 #include "chrome/browser/extensions/extension_apitest.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 "desktop_not_supported.html")) << message_; 165 "desktop_not_supported.html")) << message_;
166 } 166 }
167 #endif 167 #endif
168 168
169 IN_PROC_BROWSER_TEST_F(AutomationApiTest, CloseTab) { 169 IN_PROC_BROWSER_TEST_F(AutomationApiTest, CloseTab) {
170 StartEmbeddedTestServer(); 170 StartEmbeddedTestServer();
171 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "close_tab.html")) 171 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "close_tab.html"))
172 << message_; 172 << message_;
173 } 173 }
174 174
175 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopLoadTabs) {
176 ASSERT_TRUE(RunExtensionSubtest("automation/tests/desktop", "load_tabs.html"))
177 << message_;
178 }
179
175 static const int kPid = 1; 180 static const int kPid = 1;
176 static const int kTab0Rid = 1; 181 static const int kTab0Rid = 1;
177 static const int kTab1Rid = 2; 182 static const int kTab1Rid = 2;
178 183
179 using content::BrowserContext; 184 using content::BrowserContext;
180 185
181 typedef ui::AXTreeSerializer<const ui::AXNode*> TreeSerializer; 186 typedef ui::AXTreeSerializer<const ui::AXNode*> TreeSerializer;
182 typedef ui::AXTreeSource<const ui::AXNode*> TreeSource; 187 typedef ui::AXTreeSource<const ui::AXNode*> TreeSource;
183 188
184 #define AX_EVENT_ASSERT_EQUAL ui::AX_EVENT_LOAD_COMPLETE 189 #define AX_EVENT_ASSERT_EQUAL ui::AX_EVENT_LOAD_COMPLETE
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 "automationInternal.enableTab", 496 "automationInternal.enableTab",
492 FakeAutomationInternalEnableTabFunctionFactory)); 497 FakeAutomationInternalEnableTabFunctionFactory));
493 ASSERT_TRUE(extensions::ExtensionFunctionDispatcher::OverrideFunction( 498 ASSERT_TRUE(extensions::ExtensionFunctionDispatcher::OverrideFunction(
494 "automationInternal.performAction", 499 "automationInternal.performAction",
495 FakeAutomationInternalPerformActionFunctionFactory)); 500 FakeAutomationInternalPerformActionFunctionFactory));
496 ASSERT_TRUE(RunExtensionSubtest("automation/tests/generated", 501 ASSERT_TRUE(RunExtensionSubtest("automation/tests/generated",
497 "generated_trees.html")) << message_; 502 "generated_trees.html")) << message_;
498 } 503 }
499 504
500 } // namespace extensions 505 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698