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

Side by Side Diff: components/sync/core_impl/js_sync_encryption_handler_observer_unittest.cc

Issue 2279713002: Make PassphraseType a "enum class" instead of "enum". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix java Created 4 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
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 "components/sync/core_impl/js_sync_encryption_handler_observer.h" 5 #include "components/sync/core_impl/js_sync_encryption_handler_observer.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "components/sync/base/cryptographer.h" 10 #include "components/sync/base/cryptographer.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 js_sync_encryption_handler_observer_.OnCryptographerStateChanged( 143 js_sync_encryption_handler_observer_.OnCryptographerStateChanged(
144 &cryptographer); 144 &cryptographer);
145 PumpLoop(); 145 PumpLoop();
146 } 146 }
147 147
148 TEST_F(JsSyncEncryptionHandlerObserverTest, OnPassphraseTypeChanged) { 148 TEST_F(JsSyncEncryptionHandlerObserverTest, OnPassphraseTypeChanged) {
149 InSequence dummy; 149 InSequence dummy;
150 150
151 base::DictionaryValue passphrase_type_details; 151 base::DictionaryValue passphrase_type_details;
152 passphrase_type_details.SetString("passphraseType", "IMPLICIT_PASSPHRASE"); 152 passphrase_type_details.SetString("passphraseType",
153 "PassphraseType::IMPLICIT_PASSPHRASE");
153 passphrase_type_details.SetInteger("explicitPassphraseTime", 10); 154 passphrase_type_details.SetInteger("explicitPassphraseTime", 10);
154 EXPECT_CALL(mock_js_event_handler_, 155 EXPECT_CALL(mock_js_event_handler_,
155 HandleJsEvent("onPassphraseTypeChanged", 156 HandleJsEvent("onPassphraseTypeChanged",
156 HasDetailsAsDictionary(passphrase_type_details))); 157 HasDetailsAsDictionary(passphrase_type_details)));
157 158
158 js_sync_encryption_handler_observer_.OnPassphraseTypeChanged( 159 js_sync_encryption_handler_observer_.OnPassphraseTypeChanged(
159 IMPLICIT_PASSPHRASE, ProtoTimeToTime(10)); 160 PassphraseType::IMPLICIT_PASSPHRASE, ProtoTimeToTime(10));
160 PumpLoop(); 161 PumpLoop();
161 } 162 }
162 163
163 } // namespace 164 } // namespace
164 } // namespace syncer 165 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/core/sync_encryption_handler.h ('k') | components/sync/core_impl/sync_encryption_handler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698