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

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

Issue 2558933002: Add more fine-grained accessibility modes. (Closed)
Patch Set: Reformat enums as uppercase Created 4 years 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/automation_internal/automation_internal_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/location.h" 6 #include "base/location.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 IN_PROC_BROWSER_TEST_F(AutomationApiTest, TestRendererAccessibilityEnabled) { 77 IN_PROC_BROWSER_TEST_F(AutomationApiTest, TestRendererAccessibilityEnabled) {
78 StartEmbeddedTestServer(); 78 StartEmbeddedTestServer();
79 const GURL url = GetURLForPath(kDomain, "/index.html"); 79 const GURL url = GetURLForPath(kDomain, "/index.html");
80 ui_test_utils::NavigateToURL(browser(), url); 80 ui_test_utils::NavigateToURL(browser(), url);
81 81
82 ASSERT_EQ(1, browser()->tab_strip_model()->count()); 82 ASSERT_EQ(1, browser()->tab_strip_model()->count());
83 content::WebContents* const tab = 83 content::WebContents* const tab =
84 browser()->tab_strip_model()->GetWebContentsAt(0); 84 browser()->tab_strip_model()->GetWebContentsAt(0);
85 ASSERT_FALSE(tab->IsFullAccessibilityModeForTesting()); 85 ASSERT_FALSE(tab->IsFullAccessibilityModeForTesting());
86 ASSERT_FALSE(tab->IsTreeOnlyAccessibilityModeForTesting()); 86 ASSERT_FALSE(tab->IsWebContentsOnlyAccessibilityModeForTesting());
87 87
88 base::FilePath extension_path = 88 base::FilePath extension_path =
89 test_data_dir_.AppendASCII("automation/tests/basic"); 89 test_data_dir_.AppendASCII("automation/tests/basic");
90 ExtensionTestMessageListener got_tree(kGotTree, false /* no reply */); 90 ExtensionTestMessageListener got_tree(kGotTree, false /* no reply */);
91 LoadExtension(extension_path); 91 LoadExtension(extension_path);
92 ASSERT_TRUE(got_tree.WaitUntilSatisfied()); 92 ASSERT_TRUE(got_tree.WaitUntilSatisfied());
93 93
94 ASSERT_FALSE(tab->IsFullAccessibilityModeForTesting()); 94 ASSERT_FALSE(tab->IsFullAccessibilityModeForTesting());
95 ASSERT_TRUE(tab->IsTreeOnlyAccessibilityModeForTesting()); 95 ASSERT_TRUE(tab->IsWebContentsOnlyAccessibilityModeForTesting());
96 } 96 }
97 97
98 IN_PROC_BROWSER_TEST_F(AutomationApiTest, SanityCheck) { 98 IN_PROC_BROWSER_TEST_F(AutomationApiTest, SanityCheck) {
99 StartEmbeddedTestServer(); 99 StartEmbeddedTestServer();
100 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "sanity_check.html")) 100 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "sanity_check.html"))
101 << message_; 101 << message_;
102 } 102 }
103 103
104 IN_PROC_BROWSER_TEST_F(AutomationApiTest, GetTreeByTabId) { 104 IN_PROC_BROWSER_TEST_F(AutomationApiTest, GetTreeByTabId) {
105 StartEmbeddedTestServer(); 105 StartEmbeddedTestServer();
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 } 274 }
275 275
276 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DocumentSelection) { 276 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DocumentSelection) {
277 StartEmbeddedTestServer(); 277 StartEmbeddedTestServer();
278 ASSERT_TRUE( 278 ASSERT_TRUE(
279 RunExtensionSubtest("automation/tests/tabs", "document_selection.html")) 279 RunExtensionSubtest("automation/tests/tabs", "document_selection.html"))
280 << message_; 280 << message_;
281 } 281 }
282 282
283 } // namespace extensions 283 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/automation_internal/automation_internal_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698