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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 test_data_dir_.AppendASCII("automation/tests/basic"); | 82 test_data_dir_.AppendASCII("automation/tests/basic"); |
83 ExtensionTestMessageListener got_tree(kGotTree, false /* no reply */); | 83 ExtensionTestMessageListener got_tree(kGotTree, false /* no reply */); |
84 LoadExtension(extension_path); | 84 LoadExtension(extension_path); |
85 ASSERT_TRUE(got_tree.WaitUntilSatisfied()); | 85 ASSERT_TRUE(got_tree.WaitUntilSatisfied()); |
86 | 86 |
87 ASSERT_FALSE(tab->IsFullAccessibilityModeForTesting()); | 87 ASSERT_FALSE(tab->IsFullAccessibilityModeForTesting()); |
88 ASSERT_TRUE(tab->IsTreeOnlyAccessibilityModeForTesting()); | 88 ASSERT_TRUE(tab->IsTreeOnlyAccessibilityModeForTesting()); |
89 } | 89 } |
90 | 90 |
91 #if defined(ADDRESS_SANITIZER) | 91 #if defined(ADDRESS_SANITIZER) |
92 #define Maybe_SanityCheck DISABLED_SanityCheck | 92 #define Maybe_SanityCheck SanityCheck |
93 #else | 93 #else |
94 #define Maybe_SanityCheck SanityCheck | 94 #define Maybe_SanityCheck SanityCheck |
95 #endif | 95 #endif |
96 IN_PROC_BROWSER_TEST_F(AutomationApiTest, Maybe_SanityCheck) { | 96 IN_PROC_BROWSER_TEST_F(AutomationApiTest, Maybe_SanityCheck) { |
97 StartEmbeddedTestServer(); | 97 StartEmbeddedTestServer(); |
98 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "sanity_check.html")) | 98 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "sanity_check.html")) |
99 << message_; | 99 << message_; |
100 } | 100 } |
101 | 101 |
102 IN_PROC_BROWSER_TEST_F(AutomationApiTest, Unit) { | 102 IN_PROC_BROWSER_TEST_F(AutomationApiTest, Unit) { |
103 ASSERT_TRUE(RunExtensionSubtest("automation/tests/unit", "unit.html")) | 103 ASSERT_TRUE(RunExtensionSubtest("automation/tests/unit", "unit.html")) |
104 << message_; | 104 << message_; |
105 } | 105 } |
106 | 106 |
107 // Test is failing on ASAN bots, crbug.com/379927 | 107 // Test is failing on ASAN bots, crbug.com/379927 |
108 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DISABLED_GetTreeByTabId) { | 108 IN_PROC_BROWSER_TEST_F(AutomationApiTest, GetTreeByTabId) { |
109 StartEmbeddedTestServer(); | 109 StartEmbeddedTestServer(); |
110 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "tab_id.html")) | 110 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "tab_id.html")) |
111 << message_; | 111 << message_; |
112 } | 112 } |
113 | 113 |
114 #if defined(OS_LINUX) && defined(ADDRESS_SANITIZER) | 114 #if defined(OS_LINUX) && defined(ADDRESS_SANITIZER) |
115 // Failing on Linux ASan bot: http://crbug.com/391279 | 115 // Failing on Linux ASan bot: http://crbug.com/391279 |
116 #define MAYBE_Events DISABLED_Events | 116 #define MAYBE_Events Events |
117 #else | 117 #else |
118 #define MAYBE_Events Events | 118 #define MAYBE_Events Events |
119 #endif | 119 #endif |
120 | 120 |
121 IN_PROC_BROWSER_TEST_F(AutomationApiTest, MAYBE_Events) { | 121 IN_PROC_BROWSER_TEST_F(AutomationApiTest, MAYBE_Events) { |
122 StartEmbeddedTestServer(); | 122 StartEmbeddedTestServer(); |
123 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "events.html")) | 123 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "events.html")) |
124 << message_; | 124 << message_; |
125 } | 125 } |
126 | 126 |
127 #if defined(OS_LINUX) && defined(ADDRESS_SANITIZER) | 127 #if defined(OS_LINUX) && defined(ADDRESS_SANITIZER) |
128 // Timing out on linux ASan bot: http://crbug.com/385701 | 128 // Timing out on linux ASan bot: http://crbug.com/385701 |
129 #define MAYBE_Actions DISABLED_Actions | 129 #define MAYBE_Actions Actions |
130 #else | 130 #else |
131 #define MAYBE_Actions Actions | 131 #define MAYBE_Actions Actions |
132 #endif | 132 #endif |
133 | 133 |
134 IN_PROC_BROWSER_TEST_F(AutomationApiTest, MAYBE_Actions) { | 134 IN_PROC_BROWSER_TEST_F(AutomationApiTest, MAYBE_Actions) { |
135 StartEmbeddedTestServer(); | 135 StartEmbeddedTestServer(); |
136 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "actions.html")) | 136 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "actions.html")) |
137 << message_; | 137 << message_; |
138 } | 138 } |
139 | 139 |
140 #if defined(ADDRESS_SANITIZER) | 140 #if defined(ADDRESS_SANITIZER) |
141 #define Maybe_Location DISABLED_Location | 141 #define Maybe_Location Location |
142 #else | 142 #else |
143 #define Maybe_Location Location | 143 #define Maybe_Location Location |
144 #endif | 144 #endif |
145 IN_PROC_BROWSER_TEST_F(AutomationApiTest, Maybe_Location) { | 145 IN_PROC_BROWSER_TEST_F(AutomationApiTest, Maybe_Location) { |
146 StartEmbeddedTestServer(); | 146 StartEmbeddedTestServer(); |
147 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "location.html")) | 147 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "location.html")) |
148 << message_; | 148 << message_; |
149 } | 149 } |
150 | 150 |
151 IN_PROC_BROWSER_TEST_F(AutomationApiTest, TabsAutomationBooleanPermissions) { | 151 IN_PROC_BROWSER_TEST_F(AutomationApiTest, TabsAutomationBooleanPermissions) { |
152 StartEmbeddedTestServer(); | 152 StartEmbeddedTestServer(); |
153 ASSERT_TRUE(RunExtensionSubtest( | 153 ASSERT_TRUE(RunExtensionSubtest( |
154 "automation/tests/tabs_automation_boolean", "permissions.html")) | 154 "automation/tests/tabs_automation_boolean", "permissions.html")) |
155 << message_; | 155 << message_; |
156 } | 156 } |
157 | 157 |
158 // See crbug.com/384673 | 158 // See crbug.com/384673 |
159 #if defined(ADDRESS_SANITIZER) || defined(OS_CHROMEOS) || defined(OS_LINUX) | 159 #if defined(ADDRESS_SANITIZER) || defined(OS_CHROMEOS) || defined(OS_LINUX) |
160 #define Maybe_TabsAutomationBooleanActions DISABLED_TabsAutomationBooleanActions | 160 #define Maybe_TabsAutomationBooleanActions TabsAutomationBooleanActions |
161 #else | 161 #else |
162 #define Maybe_TabsAutomationBooleanActions TabsAutomationBooleanActions | 162 #define Maybe_TabsAutomationBooleanActions TabsAutomationBooleanActions |
163 #endif | 163 #endif |
164 IN_PROC_BROWSER_TEST_F(AutomationApiTest, Maybe_TabsAutomationBooleanActions) { | 164 IN_PROC_BROWSER_TEST_F(AutomationApiTest, Maybe_TabsAutomationBooleanActions) { |
165 StartEmbeddedTestServer(); | 165 StartEmbeddedTestServer(); |
166 ASSERT_TRUE(RunExtensionSubtest( | 166 ASSERT_TRUE(RunExtensionSubtest( |
167 "automation/tests/tabs_automation_boolean", "actions.html")) | 167 "automation/tests/tabs_automation_boolean", "actions.html")) |
168 << message_; | 168 << message_; |
169 } | 169 } |
170 | 170 |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 "automationInternal.enableTab", | 521 "automationInternal.enableTab", |
522 FakeAutomationInternalEnableTabFunctionFactory)); | 522 FakeAutomationInternalEnableTabFunctionFactory)); |
523 ASSERT_TRUE(extensions::ExtensionFunctionDispatcher::OverrideFunction( | 523 ASSERT_TRUE(extensions::ExtensionFunctionDispatcher::OverrideFunction( |
524 "automationInternal.performAction", | 524 "automationInternal.performAction", |
525 FakeAutomationInternalPerformActionFunctionFactory)); | 525 FakeAutomationInternalPerformActionFunctionFactory)); |
526 ASSERT_TRUE(RunExtensionSubtest("automation/tests/generated", | 526 ASSERT_TRUE(RunExtensionSubtest("automation/tests/generated", |
527 "generated_trees.html")) << message_; | 527 "generated_trees.html")) << message_; |
528 } | 528 } |
529 | 529 |
530 } // namespace extensions | 530 } // namespace extensions |
OLD | NEW |