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

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

Issue 10539134: TabContentsWrapper -> TabContents, part 57. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: last use Created 8 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 (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/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 23 matching lines...) Expand all
34 CrossPlatformAccessibilityBrowserTest() {} 34 CrossPlatformAccessibilityBrowserTest() {}
35 35
36 // Tell the renderer to send an accessibility tree, then wait for the 36 // Tell the renderer to send an accessibility tree, then wait for the
37 // notification that it's been received. 37 // notification that it's been received.
38 const AccessibilityNodeData& GetAccessibilityNodeDataTree( 38 const AccessibilityNodeData& GetAccessibilityNodeDataTree(
39 AccessibilityMode accessibility_mode = AccessibilityModeComplete) { 39 AccessibilityMode accessibility_mode = AccessibilityModeComplete) {
40 ui_test_utils::WindowedNotificationObserver tree_updated_observer( 40 ui_test_utils::WindowedNotificationObserver tree_updated_observer(
41 content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED, 41 content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
42 content::NotificationService::AllSources()); 42 content::NotificationService::AllSources());
43 content::RenderWidgetHostView* host_view = 43 content::RenderWidgetHostView* host_view =
44 browser()->GetSelectedWebContents()->GetRenderWidgetHostView(); 44 browser()->GetActiveWebContents()->GetRenderWidgetHostView();
45 RenderWidgetHostImpl* host = 45 RenderWidgetHostImpl* host =
46 RenderWidgetHostImpl::From(host_view->GetRenderWidgetHost()); 46 RenderWidgetHostImpl::From(host_view->GetRenderWidgetHost());
47 RenderViewHostImpl* view_host = static_cast<RenderViewHostImpl*>(host); 47 RenderViewHostImpl* view_host = static_cast<RenderViewHostImpl*>(host);
48 view_host->set_save_accessibility_tree_for_testing(true); 48 view_host->set_save_accessibility_tree_for_testing(true);
49 view_host->SetAccessibilityMode(accessibility_mode); 49 view_host->SetAccessibilityMode(accessibility_mode);
50 tree_updated_observer.Wait(); 50 tree_updated_observer.Wait();
51 return view_host->accessibility_tree_for_testing(); 51 return view_host->accessibility_tree_for_testing();
52 } 52 }
53 53
54 // Make sure each node in the tree has an unique id. 54 // Make sure each node in the tree has an unique id.
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 const AccessibilityNodeData& tree = GetAccessibilityNodeDataTree(); 464 const AccessibilityNodeData& tree = GetAccessibilityNodeDataTree();
465 465
466 ASSERT_EQ(1U, tree.children.size()); 466 ASSERT_EQ(1U, tree.children.size());
467 const AccessibilityNodeData& textbox = tree.children[0]; 467 const AccessibilityNodeData& textbox = tree.children[0];
468 468
469 EXPECT_EQ( 469 EXPECT_EQ(
470 true, GetBoolAttr(textbox, AccessibilityNodeData::ATTR_CAN_SET_VALUE)); 470 true, GetBoolAttr(textbox, AccessibilityNodeData::ATTR_CAN_SET_VALUE));
471 } 471 }
472 472
473 } // namespace 473 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698