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 #import "content/browser/renderer_host/text_input_client_mac.h" | 5 #import "content/browser/renderer_host/text_input_client_mac.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
10 #include "content/browser/renderer_host/render_process_host_impl.h" | 10 #include "content/browser/renderer_host/render_process_host_impl.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 class MockRenderWidgetHostDelegate : public RenderWidgetHostDelegate { | 26 class MockRenderWidgetHostDelegate : public RenderWidgetHostDelegate { |
27 public: | 27 public: |
28 MockRenderWidgetHostDelegate() {} | 28 MockRenderWidgetHostDelegate() {} |
29 ~MockRenderWidgetHostDelegate() override {} | 29 ~MockRenderWidgetHostDelegate() override {} |
30 | 30 |
31 private: | 31 private: |
32 void Cut() override {} | 32 void Cut() override {} |
33 void Copy() override {} | 33 void Copy() override {} |
34 void Paste() override {} | 34 void Paste() override {} |
| 35 void SelectAll() override {} |
35 }; | 36 }; |
36 | 37 |
37 // This test does not test the WebKit side of the dictionary system (which | 38 // This test does not test the WebKit side of the dictionary system (which |
38 // performs the actual data fetching), but rather this just tests that the | 39 // performs the actual data fetching), but rather this just tests that the |
39 // service's signaling system works. | 40 // service's signaling system works. |
40 class TextInputClientMacTest : public testing::Test { | 41 class TextInputClientMacTest : public testing::Test { |
41 public: | 42 public: |
42 TextInputClientMacTest() | 43 TextInputClientMacTest() |
43 : browser_context_(), | 44 : browser_context_(), |
44 process_factory_(), | 45 process_factory_(), |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 TEST_F(TextInputClientMacTest, TimeoutSubstring) { | 228 TEST_F(TextInputClientMacTest, TimeoutSubstring) { |
228 NSAttributedString* string = service()->GetAttributedSubstringFromRange( | 229 NSAttributedString* string = service()->GetAttributedSubstringFromRange( |
229 widget(), NSMakeRange(0, 32)); | 230 widget(), NSMakeRange(0, 32)); |
230 EXPECT_EQ(nil, string); | 231 EXPECT_EQ(nil, string); |
231 EXPECT_EQ(1U, ipc_sink().message_count()); | 232 EXPECT_EQ(1U, ipc_sink().message_count()); |
232 EXPECT_TRUE(ipc_sink().GetUniqueMessageMatching( | 233 EXPECT_TRUE(ipc_sink().GetUniqueMessageMatching( |
233 TextInputClientMsg_StringForRange::ID)); | 234 TextInputClientMsg_StringForRange::ID)); |
234 } | 235 } |
235 | 236 |
236 } // namespace content | 237 } // namespace content |
OLD | NEW |