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

Side by Side Diff: components/ownership/owner_key_util_impl_unittest.cc

Issue 684513002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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/ownership/owner_key_util_impl.h" 5 #include "components/ownership/owner_key_util_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 0x09, 0xd7, 0xd8, 0xe8, 0xba, 0x3e, 0x76, 0xb2, 0x3f, 0x1d, 0x31, 0x5b, 42 0x09, 0xd7, 0xd8, 0xe8, 0xba, 0x3e, 0x76, 0xb2, 0x3f, 0x1d, 0x31, 0x5b,
43 0x20, 0x6e, 0xe1, 0x73, 0xc5, 0x58, 0x46, 0xf5, 0x24, 0xdc, 0xe7, 0x95, 43 0x20, 0x6e, 0xe1, 0x73, 0xc5, 0x58, 0x46, 0xf5, 0x24, 0xdc, 0xe7, 0x95,
44 0xb4, 0xf0, 0x27, 0x4b, 0x15, 0x18, 0x5c, 0x95, 0xfe, 0x21, 0x04, 0x68, 44 0xb4, 0xf0, 0x27, 0x4b, 0x15, 0x18, 0x5c, 0x95, 0xfe, 0x21, 0x04, 0x68,
45 0xe7, 0xde, 0x16, 0x66, 0x60, 0xd7, 0xda, 0xc5, 0x5b, 0xda, 0x0f, 0xfa, 45 0xe7, 0xde, 0x16, 0x66, 0x60, 0xd7, 0xda, 0xc5, 0x5b, 0xda, 0x0f, 0xfa,
46 0x41, 0x02, 0x03, 0x01, 0x00, 0x01, 46 0x41, 0x02, 0x03, 0x01, 0x00, 0x01,
47 }; 47 };
48 48
49 class OwnerKeyUtilImplTest : public testing::Test { 49 class OwnerKeyUtilImplTest : public testing::Test {
50 protected: 50 protected:
51 OwnerKeyUtilImplTest() {} 51 OwnerKeyUtilImplTest() {}
52 virtual ~OwnerKeyUtilImplTest() {} 52 ~OwnerKeyUtilImplTest() override {}
53 53
54 virtual void SetUp() override { 54 void SetUp() override {
55 ASSERT_TRUE(tmpdir_.CreateUniqueTempDir()); 55 ASSERT_TRUE(tmpdir_.CreateUniqueTempDir());
56 key_file_ = tmpdir_.path().Append(FILE_PATH_LITERAL("key")); 56 key_file_ = tmpdir_.path().Append(FILE_PATH_LITERAL("key"));
57 util_ = new OwnerKeyUtilImpl(key_file_); 57 util_ = new OwnerKeyUtilImpl(key_file_);
58 } 58 }
59 59
60 base::ScopedTempDir tmpdir_; 60 base::ScopedTempDir tmpdir_;
61 base::FilePath key_file_; 61 base::FilePath key_file_;
62 scoped_refptr<OwnerKeyUtil> util_; 62 scoped_refptr<OwnerKeyUtil> util_;
63 63
64 private: 64 private:
(...skipping 25 matching lines...) Expand all
90 90
91 // Next try empty file. This should fail and the array should be empty. 91 // Next try empty file. This should fail and the array should be empty.
92 from_disk.resize(10); 92 from_disk.resize(10);
93 ASSERT_EQ(0, base::WriteFile(key_file_, "", 0)); 93 ASSERT_EQ(0, base::WriteFile(key_file_, "", 0));
94 EXPECT_TRUE(util_->IsPublicKeyPresent()); 94 EXPECT_TRUE(util_->IsPublicKeyPresent());
95 EXPECT_FALSE(util_->ImportPublicKey(&from_disk)); 95 EXPECT_FALSE(util_->ImportPublicKey(&from_disk));
96 EXPECT_FALSE(from_disk.size()); 96 EXPECT_FALSE(from_disk.size());
97 } 97 }
98 98
99 } // namespace ownership 99 } // namespace ownership
OLDNEW
« no previous file with comments | « components/ownership/owner_key_util_impl.h ('k') | components/ownership/owner_settings_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698