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

Side by Side Diff: components/gcm_driver/crypto/gcm_key_store_unittest.cc

Issue 1259613002: Revert of Hook up the Push API with GCM's new ability to own encryption keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gcm-encryption
Patch Set: Created 5 years, 5 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
« no previous file with comments | « components/gcm_driver/crypto/gcm_key_store.cc ('k') | components/gcm_driver/fake_gcm_driver.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/gcm_driver/crypto/gcm_key_store.h" 5 #include "components/gcm_driver/crypto/gcm_key_store.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 protected: 61 protected:
62 GCMKeyStore* gcm_key_store() { return gcm_key_store_.get(); } 62 GCMKeyStore* gcm_key_store() { return gcm_key_store_.get(); }
63 63
64 private: 64 private:
65 base::MessageLoop message_loop_; 65 base::MessageLoop message_loop_;
66 base::ScopedTempDir scoped_temp_dir_; 66 base::ScopedTempDir scoped_temp_dir_;
67 67
68 scoped_refptr<GCMKeyStore> gcm_key_store_; 68 scoped_refptr<GCMKeyStore> gcm_key_store_;
69 }; 69 };
70 70
71 TEST_F(GCMKeyStoreTest, CreatedByDefault) { 71 TEST_F(GCMKeyStoreTest, EmptyByDefault) {
72 KeyPair pair; 72 KeyPair pair;
73 gcm_key_store()->GetKeys(kFakeAppId, 73 gcm_key_store()->GetKeys(kFakeAppId,
74 base::Bind(&GCMKeyStoreTest::GotKeys, 74 base::Bind(&GCMKeyStoreTest::GotKeys,
75 base::Unretained(this), &pair)); 75 base::Unretained(this), &pair));
76 76
77 base::RunLoop().RunUntilIdle(); 77 base::RunLoop().RunUntilIdle();
78 78
79 ASSERT_FALSE(pair.IsInitialized()); 79 ASSERT_FALSE(pair.IsInitialized());
80 EXPECT_FALSE(pair.has_type()); 80 EXPECT_FALSE(pair.has_type());
81 } 81 }
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // to the asynchronous nature of operations, however, we can't rely on the 222 // to the asynchronous nature of operations, however, we can't rely on the
223 // write to have finished before the read begins. 223 // write to have finished before the read begins.
224 base::RunLoop().RunUntilIdle(); 224 base::RunLoop().RunUntilIdle();
225 225
226 EXPECT_TRUE(pair.IsInitialized()); 226 EXPECT_TRUE(pair.IsInitialized());
227 } 227 }
228 228
229 } // namespace 229 } // namespace
230 230
231 } // namespace gcm 231 } // namespace gcm
OLDNEW
« no previous file with comments | « components/gcm_driver/crypto/gcm_key_store.cc ('k') | components/gcm_driver/fake_gcm_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698