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

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: 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 }; 76 };
77 77
78 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, 78 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
79 PlatformTreeDifferenceTest) { 79 PlatformTreeDifferenceTest) {
80 RenderWidgetHostViewPort* host_view = static_cast<RenderWidgetHostViewPort*>( 80 RenderWidgetHostViewPort* host_view = static_cast<RenderWidgetHostViewPort*>(
81 browser()->GetSelectedWebContents()->GetRenderWidgetHostView()); 81 browser()->GetSelectedWebContents()->GetRenderWidgetHostView());
82 RenderWidgetHost* host = host_view->GetRenderWidgetHost(); 82 RenderWidgetHost* host = host_view->GetRenderWidgetHost();
83 RenderViewHostImpl* view_host = 83 RenderViewHostImpl* view_host =
84 static_cast<RenderViewHostImpl*>(RenderWidgetHostImpl::From(host)); 84 static_cast<RenderViewHostImpl*>(RenderWidgetHostImpl::From(host));
85 view_host->set_save_accessibility_tree_for_testing(true); 85 view_host->set_save_accessibility_tree_for_testing(true);
86 view_host->EnableRendererAccessibility(); 86 view_host->SetAccessibilityMode(AccessibilityModeComplete);
87 87
88 // Setup test paths. 88 // Setup test paths.
89 FilePath dir_test_data; 89 FilePath dir_test_data;
90 EXPECT_TRUE(PathService::Get(content::DIR_TEST_DATA, &dir_test_data)); 90 EXPECT_TRUE(PathService::Get(content::DIR_TEST_DATA, &dir_test_data));
91 FilePath test_path(dir_test_data.Append(FILE_PATH_LITERAL("accessibility"))); 91 FilePath test_path(dir_test_data.Append(FILE_PATH_LITERAL("accessibility")));
92 EXPECT_TRUE(file_util::PathExists(test_path)) 92 EXPECT_TRUE(file_util::PathExists(test_path))
93 << test_path.LossyDisplayName(); 93 << test_path.LossyDisplayName();
94 94
95 // Output the test path to help anyone who encounters a failure and needs 95 // Output the test path to help anyone who encounters a failure and needs
96 // to know where to look. 96 // to know where to look.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 EXPECT_TRUE(file_util::WriteFile( 158 EXPECT_TRUE(file_util::WriteFile(
159 actual_file, actual_contents.c_str(), actual_contents.size())); 159 actual_file, actual_contents.c_str(), actual_contents.size()));
160 160
161 ADD_FAILURE() << "No expectation found. Create it by doing:\n" 161 ADD_FAILURE() << "No expectation found. Create it by doing:\n"
162 << "mv " << actual_file.LossyDisplayName() << " " 162 << "mv " << actual_file.LossyDisplayName() << " "
163 << expected_file.LossyDisplayName(); 163 << expected_file.LossyDisplayName();
164 } 164 }
165 } while (!(html_file = file_enumerator.Next()).empty()); 165 } while (!(html_file = file_enumerator.Next()).empty());
166 } 166 }
167
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698