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

Side by Side Diff: webkit/tools/test_shell/text_input_controller_unittest.cc

Issue 6296015: Remove eventSender, accessibilityController, plainText and (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/webkit/tools/test_shell
Patch Set: Created 9 years, 11 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
« no previous file with comments | « webkit/tools/test_shell/text_input_controller.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "webkit/tools/test_shell/text_input_controller.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 // Test class to let us check TextInputController's method table.
10 class TestTextInputController : public TextInputController {
11 public:
12 TestTextInputController() : TextInputController(NULL) {}
13
14 size_t MethodCount() {
15 return methods_.size();
16 }
17 };
18
19
20 TEST(TextInputControllerTest, MethodMapIsInitialized) {
21 TestTextInputController text_input_controller;
22
23 EXPECT_EQ(14U, text_input_controller.MethodCount());
24
25 EXPECT_TRUE(text_input_controller.IsMethodRegistered(
26 "insertText"));
27 EXPECT_TRUE(text_input_controller.IsMethodRegistered(
28 "doCommand"));
29 EXPECT_TRUE(text_input_controller.IsMethodRegistered(
30 "setMarkedText"));
31 EXPECT_TRUE(text_input_controller.IsMethodRegistered(
32 "unmarkText"));
33 EXPECT_TRUE(text_input_controller.IsMethodRegistered(
34 "hasMarkedText"));
35 EXPECT_TRUE(text_input_controller.IsMethodRegistered(
36 "conversationIdentifier"));
37 EXPECT_TRUE(text_input_controller.IsMethodRegistered(
38 "substringFromRange"));
39 EXPECT_TRUE(text_input_controller.IsMethodRegistered(
40 "attributedSubstringFromRange"));
41 EXPECT_TRUE(text_input_controller.IsMethodRegistered(
42 "markedRange"));
43 EXPECT_TRUE(text_input_controller.IsMethodRegistered(
44 "selectedRange"));
45 EXPECT_TRUE(text_input_controller.IsMethodRegistered(
46 "firstRectForCharacterRange"));
47 EXPECT_TRUE(text_input_controller.IsMethodRegistered(
48 "characterIndexForPoint"));
49 EXPECT_TRUE(text_input_controller.IsMethodRegistered(
50 "validAttributesForMarkedText"));
51 EXPECT_TRUE(text_input_controller.IsMethodRegistered(
52 "makeAttributedString"));
53
54 // Negative test.
55 EXPECT_FALSE(text_input_controller.IsMethodRegistered(
56 "momeRathsOutgrabe"));
57 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/text_input_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698