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

Side by Side Diff: sync/internal_api/js_sync_encryption_handler_observer_unittest.cc

Issue 10916036: [Sync] Implement keystore migration support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 3 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
OLDNEW
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.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 HasDetailsAsDictionary(expected_details))); 146 HasDetailsAsDictionary(expected_details)));
147 147
148 FakeEncryptor encryptor; 148 FakeEncryptor encryptor;
149 Cryptographer cryptographer(&encryptor); 149 Cryptographer cryptographer(&encryptor);
150 150
151 js_sync_encryption_handler_observer_.OnCryptographerStateChanged( 151 js_sync_encryption_handler_observer_.OnCryptographerStateChanged(
152 &cryptographer); 152 &cryptographer);
153 PumpLoop(); 153 PumpLoop();
154 } 154 }
155 155
156 TEST_F(JsSyncEncryptionHandlerObserverTest, OnPassphraseStateChanged) { 156 TEST_F(JsSyncEncryptionHandlerObserverTest, OnPassphraseTypeChanged) {
157 InSequence dummy; 157 InSequence dummy;
158 158
159 DictionaryValue passphrase_state_details; 159 DictionaryValue passphrase_type_details;
160 passphrase_state_details.SetString("passphraseState", "IMPLICIT_PASSPHRASE"); 160 passphrase_type_details.SetString("passphraseType", "IMPLICIT_PASSPHRASE");
161 EXPECT_CALL(mock_js_event_handler_, 161 EXPECT_CALL(mock_js_event_handler_,
162 HandleJsEvent("onPassphraseStateChanged", 162 HandleJsEvent("onPassphraseTypeChanged",
163 HasDetailsAsDictionary(passphrase_state_details))); 163 HasDetailsAsDictionary(passphrase_type_details)));
164 164
165 js_sync_encryption_handler_observer_.OnPassphraseStateChanged( 165 js_sync_encryption_handler_observer_.OnPassphraseTypeChanged(
166 IMPLICIT_PASSPHRASE); 166 IMPLICIT_PASSPHRASE);
167 PumpLoop(); 167 PumpLoop();
168 } 168 }
169 169
170 } // namespace 170 } // namespace
171 } // namespace syncer 171 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/js_sync_encryption_handler_observer.cc ('k') | sync/internal_api/public/sync_encryption_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698