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 "ui/base/win/tsf_text_store.h" | 5 #include "ui/base/win/tsf_text_store.h" |
6 | 6 |
7 #include "base/win/scoped_com_initializer.h" | 7 #include "base/win/scoped_com_initializer.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
10 #include "ui/base/ime/text_input_client.h" | 10 #include "ui/base/ime/text_input_client.h" |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 &rect, &clipped)); | 278 &rect, &clipped)); |
279 } | 279 } |
280 | 280 |
281 TsfTextStore* text_store_; | 281 TsfTextStore* text_store_; |
282 }; | 282 }; |
283 | 283 |
284 TEST_F(TsfTextStoreTest, GetStatusTest) { | 284 TEST_F(TsfTextStoreTest, GetStatusTest) { |
285 TS_STATUS status; | 285 TS_STATUS status; |
286 EXPECT_EQ(S_OK, text_store_->GetStatus(&status)); | 286 EXPECT_EQ(S_OK, text_store_->GetStatus(&status)); |
287 EXPECT_EQ(0, status.dwDynamicFlags); | 287 EXPECT_EQ(0, status.dwDynamicFlags); |
288 EXPECT_EQ(TS_SS_NOHIDDENTEXT, status.dwStaticFlags); | 288 EXPECT_EQ(TS_SS_TRANSITORY | TS_SS_NOHIDDENTEXT, status.dwStaticFlags); |
289 } | 289 } |
290 | 290 |
291 | 291 |
292 class SyncRequestLockTestCallback : public TsfTextStoreTestCallback { | 292 class SyncRequestLockTestCallback : public TsfTextStoreTestCallback { |
293 public: | 293 public: |
294 explicit SyncRequestLockTestCallback(TsfTextStore* text_store) | 294 explicit SyncRequestLockTestCallback(TsfTextStore* text_store) |
295 : TsfTextStoreTestCallback(text_store) { | 295 : TsfTextStoreTestCallback(text_store) { |
296 } | 296 } |
297 | 297 |
298 HRESULT LockGranted1(DWORD flags) { | 298 HRESULT LockGranted1(DWORD flags) { |
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 &GetTextExtTestCallback::GetCompositionCharacterBounds)); | 1136 &GetTextExtTestCallback::GetCompositionCharacterBounds)); |
1137 | 1137 |
1138 EXPECT_CALL(*sink_, OnLockGranted(_)) | 1138 EXPECT_CALL(*sink_, OnLockGranted(_)) |
1139 .WillOnce(Invoke(&callback, &GetTextExtTestCallback::LockGranted)); | 1139 .WillOnce(Invoke(&callback, &GetTextExtTestCallback::LockGranted)); |
1140 | 1140 |
1141 HRESULT result; | 1141 HRESULT result; |
1142 EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READ, &result)); | 1142 EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READ, &result)); |
1143 } | 1143 } |
1144 | 1144 |
1145 } // namespace ui | 1145 } // namespace ui |
OLD | NEW |