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/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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // test extension respectively: see | 224 // test extension respectively: see |
225 // c/t/data/extensions/api_test/automation/tests/generated/generated_trees.js | 225 // c/t/data/extensions/api_test/automation/tests/generated/generated_trees.js |
226 class TreeSerializationState { | 226 class TreeSerializationState { |
227 public: | 227 public: |
228 TreeSerializationState() | 228 TreeSerializationState() |
229 #ifdef NDEBUG | 229 #ifdef NDEBUG |
230 : tree_size(3), | 230 : tree_size(3), |
231 #else | 231 #else |
232 : tree_size(2), | 232 : tree_size(2), |
233 #endif | 233 #endif |
234 generator(tree_size), | 234 generator(tree_size, true), |
235 num_trees(generator.UniqueTreeCount()), | 235 num_trees(generator.UniqueTreeCount()), |
236 tree0_version(0), | 236 tree0_version(0), |
237 tree1_version(0) { | 237 tree1_version(0) { |
238 } | 238 } |
239 | 239 |
240 // Serializes tree and sends it as an accessibility event to the extension. | 240 // Serializes tree and sends it as an accessibility event to the extension. |
241 void SendDataForTree(const ui::AXTree* tree, | 241 void SendDataForTree(const ui::AXTree* tree, |
242 TreeSerializer* serializer, | 242 TreeSerializer* serializer, |
243 int routing_id, | 243 int routing_id, |
244 BrowserContext* browser_context) { | 244 BrowserContext* browser_context) { |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 "automationInternal.enableTab", | 518 "automationInternal.enableTab", |
519 FakeAutomationInternalEnableTabFunctionFactory)); | 519 FakeAutomationInternalEnableTabFunctionFactory)); |
520 ASSERT_TRUE(extensions::ExtensionFunctionDispatcher::OverrideFunction( | 520 ASSERT_TRUE(extensions::ExtensionFunctionDispatcher::OverrideFunction( |
521 "automationInternal.performAction", | 521 "automationInternal.performAction", |
522 FakeAutomationInternalPerformActionFunctionFactory)); | 522 FakeAutomationInternalPerformActionFunctionFactory)); |
523 ASSERT_TRUE(RunExtensionSubtest("automation/tests/generated", | 523 ASSERT_TRUE(RunExtensionSubtest("automation/tests/generated", |
524 "generated_trees.html")) << message_; | 524 "generated_trees.html")) << message_; |
525 } | 525 } |
526 | 526 |
527 } // namespace extensions | 527 } // namespace extensions |
OLD | NEW |