OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/scoped_ptr.h" | 5 #include "base/scoped_ptr.h" |
6 #include "base/string16.h" | 6 #include "base/string16.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/common/render_messages.h" | 8 #include "chrome/common/render_messages.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "webkit/glue/webaccessibility.h" |
| 11 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" |
10 | 12 |
11 TEST(RenderMessagesUnittest, WebAccessibility) { | 13 TEST(RenderMessagesUnittest, WebAccessibility) { |
12 // Test a simple case. | 14 // Test a simple case. |
13 webkit_glue::WebAccessibility input; | 15 webkit_glue::WebAccessibility input; |
14 input.id = 123; | 16 input.id = 123; |
15 input.name = ASCIIToUTF16("name"); | 17 input.name = ASCIIToUTF16("name"); |
16 input.value = ASCIIToUTF16("value"); | 18 input.value = ASCIIToUTF16("value"); |
17 string16 help = ASCIIToUTF16("help"); | 19 string16 help = ASCIIToUTF16("help"); |
18 input.attributes[webkit_glue::WebAccessibility::ATTR_HELP] = help; | 20 input.attributes[webkit_glue::WebAccessibility::ATTR_HELP] = help; |
19 input.role = webkit_glue::WebAccessibility::ROLE_CHECKBOX; | 21 input.role = webkit_glue::WebAccessibility::ROLE_CHECKBOX; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 EXPECT_EQ(inner1.name, output.children[0].name); | 85 EXPECT_EQ(inner1.name, output.children[0].name); |
84 EXPECT_EQ(inner1.role, output.children[0].role); | 86 EXPECT_EQ(inner1.role, output.children[0].role); |
85 EXPECT_EQ(inner1.state, output.children[0].state); | 87 EXPECT_EQ(inner1.state, output.children[0].state); |
86 EXPECT_EQ(inner1.location, output.children[0].location); | 88 EXPECT_EQ(inner1.location, output.children[0].location); |
87 EXPECT_EQ(inner2.id, output.children[1].id); | 89 EXPECT_EQ(inner2.id, output.children[1].id); |
88 EXPECT_EQ(inner2.name, output.children[1].name); | 90 EXPECT_EQ(inner2.name, output.children[1].name); |
89 EXPECT_EQ(inner2.role, output.children[1].role); | 91 EXPECT_EQ(inner2.role, output.children[1].role); |
90 EXPECT_EQ(inner2.state, output.children[1].state); | 92 EXPECT_EQ(inner2.state, output.children[1].state); |
91 EXPECT_EQ(inner2.location, output.children[1].location); | 93 EXPECT_EQ(inner2.location, output.children[1].location); |
92 } | 94 } |
OLD | NEW |