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 "sync/internal_api/js_sync_encryption_handler_observer.h" | 5 #include "sync/internal_api/js_sync_encryption_handler_observer.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "sync/internal_api/public/base/model_type.h" | 11 #include "sync/internal_api/public/base/model_type.h" |
12 #include "sync/internal_api/public/util/sync_string_conversions.h" | 12 #include "sync/internal_api/public/util/sync_string_conversions.h" |
13 #include "sync/internal_api/public/util/weak_handle.h" | 13 #include "sync/internal_api/public/util/weak_handle.h" |
14 #include "sync/js/js_event_details.h" | 14 #include "sync/js/js_event_details.h" |
15 #include "sync/js/js_test_util.h" | 15 #include "sync/js/js_test_util.h" |
| 16 #include "sync/test/fake_encryptor.h" |
16 #include "sync/util/cryptographer.h" | 17 #include "sync/util/cryptographer.h" |
17 #include "sync/util/time.h" | 18 #include "sync/util/time.h" |
18 #include "sync/test/fake_encryptor.h" | |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 namespace syncer { | 21 namespace syncer { |
22 namespace { | 22 namespace { |
23 | 23 |
24 using ::testing::InSequence; | 24 using ::testing::InSequence; |
25 using ::testing::StrictMock; | 25 using ::testing::StrictMock; |
26 | 26 |
27 class JsSyncEncryptionHandlerObserverTest : public testing::Test { | 27 class JsSyncEncryptionHandlerObserverTest : public testing::Test { |
28 protected: | 28 protected: |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 HandleJsEvent("onPassphraseTypeChanged", | 164 HandleJsEvent("onPassphraseTypeChanged", |
165 HasDetailsAsDictionary(passphrase_type_details))); | 165 HasDetailsAsDictionary(passphrase_type_details))); |
166 | 166 |
167 js_sync_encryption_handler_observer_.OnPassphraseTypeChanged( | 167 js_sync_encryption_handler_observer_.OnPassphraseTypeChanged( |
168 IMPLICIT_PASSPHRASE, ProtoTimeToTime(10)); | 168 IMPLICIT_PASSPHRASE, ProtoTimeToTime(10)); |
169 PumpLoop(); | 169 PumpLoop(); |
170 } | 170 } |
171 | 171 |
172 } // namespace | 172 } // namespace |
173 } // namespace syncer | 173 } // namespace syncer |
OLD | NEW |