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

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

Issue 655273005: Implement AutomationNode.querySelector(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Address comments 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, Query) {
176 StartEmbeddedTestServer();
177 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "query.html"))
178 << message_;
179 }
180
175 static const int kPid = 1; 181 static const int kPid = 1;
176 static const int kTab0Rid = 1; 182 static const int kTab0Rid = 1;
177 static const int kTab1Rid = 2; 183 static const int kTab1Rid = 2;
178 184
179 using content::BrowserContext; 185 using content::BrowserContext;
180 186
181 typedef ui::AXTreeSerializer<const ui::AXNode*> TreeSerializer; 187 typedef ui::AXTreeSerializer<const ui::AXNode*> TreeSerializer;
182 typedef ui::AXTreeSource<const ui::AXNode*> TreeSource; 188 typedef ui::AXTreeSource<const ui::AXNode*> TreeSource;
183 189
184 #define AX_EVENT_ASSERT_EQUAL ui::AX_EVENT_LOAD_COMPLETE 190 #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", 497 "automationInternal.enableTab",
492 FakeAutomationInternalEnableTabFunctionFactory)); 498 FakeAutomationInternalEnableTabFunctionFactory));
493 ASSERT_TRUE(extensions::ExtensionFunctionDispatcher::OverrideFunction( 499 ASSERT_TRUE(extensions::ExtensionFunctionDispatcher::OverrideFunction(
494 "automationInternal.performAction", 500 "automationInternal.performAction",
495 FakeAutomationInternalPerformActionFunctionFactory)); 501 FakeAutomationInternalPerformActionFunctionFactory));
496 ASSERT_TRUE(RunExtensionSubtest("automation/tests/generated", 502 ASSERT_TRUE(RunExtensionSubtest("automation/tests/generated",
497 "generated_trees.html")) << message_; 503 "generated_trees.html")) << message_;
498 } 504 }
499 505
500 } // namespace extensions 506 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698