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

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

Issue 273423004: Migrate accessibility from RenderView to RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Get rid of ForEachFrameAndPendingFrame Created 6 years, 6 months 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 | Annotate | Revision Log
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/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "chrome/browser/extensions/extension_test_message_listener.h" 9 #include "chrome/browser/extensions/extension_test_message_listener.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); 59 ExtensionApiTest::SetUpInProcessBrowserTestFixture();
60 } 60 }
61 }; 61 };
62 62
63 IN_PROC_BROWSER_TEST_F(AutomationApiTest, TestRendererAccessibilityEnabled) { 63 IN_PROC_BROWSER_TEST_F(AutomationApiTest, TestRendererAccessibilityEnabled) {
64 LoadPage(); 64 LoadPage();
65 65
66 ASSERT_EQ(1, browser()->tab_strip_model()->count()); 66 ASSERT_EQ(1, browser()->tab_strip_model()->count());
67 content::WebContents* const tab = 67 content::WebContents* const tab =
68 browser()->tab_strip_model()->GetWebContentsAt(0); 68 browser()->tab_strip_model()->GetWebContentsAt(0);
69 content::RenderWidgetHost* rwh = 69 ASSERT_FALSE(tab->IsFullAccessibilityModeForTesting());
70 tab->GetRenderWidgetHostView()->GetRenderWidgetHost(); 70 ASSERT_FALSE(tab->IsTreeOnlyAccessibilityModeForTesting());
71 ASSERT_NE((content::RenderWidgetHost*)NULL, rwh)
72 << "Couldn't get RenderWidgetHost";
73 ASSERT_FALSE(rwh->IsFullAccessibilityModeForTesting());
74 ASSERT_FALSE(rwh->IsTreeOnlyAccessibilityModeForTesting());
75 71
76 base::FilePath extension_path = 72 base::FilePath extension_path =
77 test_data_dir_.AppendASCII("automation/basic"); 73 test_data_dir_.AppendASCII("automation/basic");
78 ExtensionTestMessageListener got_tree(kGotTree, false /* no reply */); 74 ExtensionTestMessageListener got_tree(kGotTree, false /* no reply */);
79 LoadExtension(extension_path); 75 LoadExtension(extension_path);
80 ASSERT_TRUE(got_tree.WaitUntilSatisfied()); 76 ASSERT_TRUE(got_tree.WaitUntilSatisfied());
81 77
82 rwh = tab->GetRenderWidgetHostView()->GetRenderWidgetHost(); 78 ASSERT_FALSE(tab->IsFullAccessibilityModeForTesting());
83 ASSERT_NE((content::RenderWidgetHost*)NULL, rwh) 79 ASSERT_TRUE(tab->IsTreeOnlyAccessibilityModeForTesting());
84 << "Couldn't get RenderWidgetHost";
85 ASSERT_FALSE(rwh->IsFullAccessibilityModeForTesting());
86 ASSERT_TRUE(rwh->IsTreeOnlyAccessibilityModeForTesting());
87 } 80 }
88 81
89 IN_PROC_BROWSER_TEST_F(AutomationApiTest, SanityCheck) { 82 IN_PROC_BROWSER_TEST_F(AutomationApiTest, SanityCheck) {
90 StartEmbeddedTestServer(); 83 StartEmbeddedTestServer();
91 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "sanity_check.html")) 84 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "sanity_check.html"))
92 << message_; 85 << message_;
93 } 86 }
94 87
95 IN_PROC_BROWSER_TEST_F(AutomationApiTest, Events) { 88 IN_PROC_BROWSER_TEST_F(AutomationApiTest, Events) {
96 LoadPage(); 89 LoadPage();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 << message_; 126 << message_;
134 } 127 }
135 #else 128 #else
136 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopNotSupported) { 129 IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopNotSupported) {
137 ASSERT_TRUE(RunExtensionSubtest("automation/tests/desktop", 130 ASSERT_TRUE(RunExtensionSubtest("automation/tests/desktop",
138 "desktop_not_supported.html")) << message_; 131 "desktop_not_supported.html")) << message_;
139 } 132 }
140 #endif 133 #endif
141 134
142 } // namespace extensions 135 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698