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

Side by Side Diff: content/browser/accessibility/dump_accessibility_tree_browsertest.cc

Issue 9939011: Add an accessibility mode for editable text fields only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments and rebased. Created 8 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 }; 82 };
83 83
84 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, 84 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
85 PlatformTreeDifferenceTest) { 85 PlatformTreeDifferenceTest) {
86 RenderWidgetHostViewPort* host_view = static_cast<RenderWidgetHostViewPort*>( 86 RenderWidgetHostViewPort* host_view = static_cast<RenderWidgetHostViewPort*>(
87 browser()->GetSelectedWebContents()->GetRenderWidgetHostView()); 87 browser()->GetSelectedWebContents()->GetRenderWidgetHostView());
88 RenderWidgetHost* host = host_view->GetRenderWidgetHost(); 88 RenderWidgetHost* host = host_view->GetRenderWidgetHost();
89 RenderViewHostImpl* view_host = 89 RenderViewHostImpl* view_host =
90 static_cast<RenderViewHostImpl*>(RenderWidgetHostImpl::From(host)); 90 static_cast<RenderViewHostImpl*>(RenderWidgetHostImpl::From(host));
91 view_host->set_save_accessibility_tree_for_testing(true); 91 view_host->set_save_accessibility_tree_for_testing(true);
92 view_host->EnableRendererAccessibility(); 92 view_host->SetAccessibilityMode(AccessibilityModeComplete);
93 93
94 // Setup test paths. 94 // Setup test paths.
95 FilePath dir_test_data; 95 FilePath dir_test_data;
96 EXPECT_TRUE(PathService::Get(content::DIR_TEST_DATA, &dir_test_data)); 96 EXPECT_TRUE(PathService::Get(content::DIR_TEST_DATA, &dir_test_data));
97 FilePath test_path(dir_test_data.Append(FILE_PATH_LITERAL("accessibility"))); 97 FilePath test_path(dir_test_data.Append(FILE_PATH_LITERAL("accessibility")));
98 EXPECT_TRUE(file_util::PathExists(test_path)) 98 EXPECT_TRUE(file_util::PathExists(test_path))
99 << test_path.LossyDisplayName(); 99 << test_path.LossyDisplayName();
100 100
101 // Output the test path to help anyone who encounters a failure and needs 101 // Output the test path to help anyone who encounters a failure and needs
102 // to know where to look. 102 // to know where to look.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 EXPECT_TRUE(file_util::WriteFile( 193 EXPECT_TRUE(file_util::WriteFile(
194 actual_file, actual_contents.c_str(), actual_contents.size())); 194 actual_file, actual_contents.c_str(), actual_contents.size()));
195 195
196 ADD_FAILURE() << "No expectation found. Create it by doing:\n" 196 ADD_FAILURE() << "No expectation found. Create it by doing:\n"
197 << "mv " << actual_file.LossyDisplayName() << " " 197 << "mv " << actual_file.LossyDisplayName() << " "
198 << expected_file.LossyDisplayName(); 198 << expected_file.LossyDisplayName();
199 } 199 }
200 } while (!(html_file = file_enumerator.Next()).empty()); 200 } while (!(html_file = file_enumerator.Next()).empty());
201 } 201 }
202
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698