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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 protected: | 68 protected: |
69 std::string GetAttr(const ui::AXNode* node, | 69 std::string GetAttr(const ui::AXNode* node, |
70 const ui::AXStringAttribute attr); | 70 const ui::AXStringAttribute attr); |
71 int GetIntAttr(const ui::AXNode* node, | 71 int GetIntAttr(const ui::AXNode* node, |
72 const ui::AXIntAttribute attr); | 72 const ui::AXIntAttribute attr); |
73 bool GetBoolAttr(const ui::AXNode* node, | 73 bool GetBoolAttr(const ui::AXNode* node, |
74 const ui::AXBoolAttribute attr); | 74 const ui::AXBoolAttribute attr); |
75 | 75 |
76 private: | 76 private: |
77 #if defined(OS_WIN) | 77 #if defined(OS_WIN) |
78 scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_; | 78 std::unique_ptr<base::win::ScopedCOMInitializer> com_initializer_; |
79 #endif | 79 #endif |
80 | 80 |
81 DISALLOW_COPY_AND_ASSIGN(CrossPlatformAccessibilityBrowserTest); | 81 DISALLOW_COPY_AND_ASSIGN(CrossPlatformAccessibilityBrowserTest); |
82 }; | 82 }; |
83 | 83 |
84 void CrossPlatformAccessibilityBrowserTest::SetUpInProcessBrowserTestFixture() { | 84 void CrossPlatformAccessibilityBrowserTest::SetUpInProcessBrowserTestFixture() { |
85 #if defined(OS_WIN) | 85 #if defined(OS_WIN) |
86 ui::win::CreateATLModuleIfNeeded(); | 86 ui::win::CreateATLModuleIfNeeded(); |
87 com_initializer_.reset(new base::win::ScopedCOMInitializer()); | 87 com_initializer_.reset(new base::win::ScopedCOMInitializer()); |
88 #endif | 88 #endif |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 GURL url(url_str); | 489 GURL url(url_str); |
490 NavigateToURL(shell(), url); | 490 NavigateToURL(shell(), url); |
491 const ui::AXTree& tree = GetAXTree(); | 491 const ui::AXTree& tree = GetAXTree(); |
492 const ui::AXNode* root = tree.root(); | 492 const ui::AXNode* root = tree.root(); |
493 ASSERT_EQ(1, root->child_count()); | 493 ASSERT_EQ(1, root->child_count()); |
494 const ui::AXNode* textbox = root->ChildAtIndex(0); | 494 const ui::AXNode* textbox = root->ChildAtIndex(0); |
495 EXPECT_EQ(true, GetBoolAttr(textbox, ui::AX_ATTR_CAN_SET_VALUE)); | 495 EXPECT_EQ(true, GetBoolAttr(textbox, ui::AX_ATTR_CAN_SET_VALUE)); |
496 } | 496 } |
497 | 497 |
498 } // namespace content | 498 } // namespace content |
OLD | NEW |