OLD | NEW |
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 "base/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
6 #include "content/common/accessibility_node_data.h" | 6 #include "content/common/accessibility_node_data.h" |
7 #include "content/common/view_messages.h" | 7 #include "content/common/view_messages.h" |
8 #include "content/public/test/render_view_test.h" | 8 #include "content/public/test/render_view_test.h" |
9 #include "content/renderer/accessibility/renderer_accessibility_complete.h" | 9 #include "content/renderer/accessibility/renderer_accessibility_complete.h" |
10 #include "content/renderer/render_view_impl.h" | 10 #include "content/renderer/render_view_impl.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 } | 35 } |
36 | 36 |
37 virtual ~TestBrowserTreeNode() { | 37 virtual ~TestBrowserTreeNode() { |
38 owner_->browser_tree_node_count_--; | 38 owner_->browser_tree_node_count_--; |
39 } | 39 } |
40 | 40 |
41 private: | 41 private: |
42 TestRendererAccessibilityComplete* owner_; | 42 TestRendererAccessibilityComplete* owner_; |
43 }; | 43 }; |
44 | 44 |
45 virtual BrowserTreeNode* CreateBrowserTreeNode() { | 45 virtual BrowserTreeNode* CreateBrowserTreeNode() OVERRIDE { |
46 return new TestBrowserTreeNode(this); | 46 return new TestBrowserTreeNode(this); |
47 } | 47 } |
48 | 48 |
49 void SendPendingAccessibilityNotifications() { | 49 void SendPendingAccessibilityNotifications() { |
50 RendererAccessibilityComplete::SendPendingAccessibilityNotifications(); | 50 RendererAccessibilityComplete::SendPendingAccessibilityNotifications(); |
51 } | 51 } |
52 | 52 |
53 private: | 53 private: |
54 int browser_tree_node_count_; | 54 int browser_tree_node_count_; |
55 }; | 55 }; |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 | 391 |
392 accessibility->SendPendingAccessibilityNotifications(); | 392 accessibility->SendPendingAccessibilityNotifications(); |
393 EXPECT_EQ(4, accessibility->browser_tree_node_count()); | 393 EXPECT_EQ(4, accessibility->browser_tree_node_count()); |
394 AccessibilityHostMsg_NotificationParams notification; | 394 AccessibilityHostMsg_NotificationParams notification; |
395 GetLastAccNotification(¬ification); | 395 GetLastAccNotification(¬ification); |
396 ASSERT_EQ(3U, notification.nodes.size()); | 396 ASSERT_EQ(3U, notification.nodes.size()); |
397 EXPECT_EQ(3, CountAccessibilityNodesSentToBrowser()); | 397 EXPECT_EQ(3, CountAccessibilityNodesSentToBrowser()); |
398 } | 398 } |
399 | 399 |
400 } // namespace content | 400 } // namespace content |
OLD | NEW |