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 10824410: [Sync] Refactor passphrase state handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 4 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 HasDetailsAsDictionary(expected_details))); 147 HasDetailsAsDictionary(expected_details)));
148 148
149 FakeEncryptor encryptor; 149 FakeEncryptor encryptor;
150 Cryptographer cryptographer(&encryptor); 150 Cryptographer cryptographer(&encryptor);
151 151
152 js_sync_encryption_handler_observer_.OnCryptographerStateChanged( 152 js_sync_encryption_handler_observer_.OnCryptographerStateChanged(
153 &cryptographer); 153 &cryptographer);
154 PumpLoop(); 154 PumpLoop();
155 } 155 }
156 156
157 TEST_F(JsSyncEncryptionHandlerObserverTest, OnPassphraseStateChanged) {
158 InSequence dummy;
159
160 DictionaryValue passphrase_state_details;
161 passphrase_state_details.SetString("passphraseState", "IMPLICIT_PASSPHRASE");
162 EXPECT_CALL(mock_js_event_handler_,
163 HandleJsEvent("onPassphraseStateChanged",
164 HasDetailsAsDictionary(passphrase_state_details)));
165
166 js_sync_encryption_handler_observer_.OnPassphraseStateChanged(
167 IMPLICIT_PASSPHRASE);
168 PumpLoop();
169 }
170
157 } // namespace 171 } // namespace
158 } // namespace syncer 172 } // 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