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

Side by Side Diff: ios/consumer/base/supports_user_data_unittest.cc

Issue 635523002: Replacing the OVERRIDE with override and FINAL with final in /src/ios (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | ios/public/test/fake_profile_oauth2_token_service_ios_provider.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ios/public/consumer/base/supports_user_data.h" 5 #include "ios/public/consumer/base/supports_user_data.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "testing/gmock/include/gmock/gmock.h" 8 #include "testing/gmock/include/gmock/gmock.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "testing/platform_test.h" 10 #include "testing/platform_test.h"
(...skipping 20 matching lines...) Expand all
31 }; 31 };
32 32
33 class TestSupportsUserData : public SupportsUserData { 33 class TestSupportsUserData : public SupportsUserData {
34 public: 34 public:
35 TestSupportsUserData() {} 35 TestSupportsUserData() {}
36 virtual ~TestSupportsUserData() {} 36 virtual ~TestSupportsUserData() {}
37 }; 37 };
38 38
39 class SupportsUserDataTest : public PlatformTest { 39 class SupportsUserDataTest : public PlatformTest {
40 public: 40 public:
41 virtual void SetUp() OVERRIDE { 41 virtual void SetUp() override {
42 PlatformTest::SetUp(); 42 PlatformTest::SetUp();
43 43
44 test_data1_was_destroyed_ = false; 44 test_data1_was_destroyed_ = false;
45 test_data1_ = new TestData(&test_data1_was_destroyed_); 45 test_data1_ = new TestData(&test_data1_was_destroyed_);
46 test_data2_was_destroyed_ = false; 46 test_data2_was_destroyed_ = false;
47 test_data2_ = new TestData(&test_data2_was_destroyed_); 47 test_data2_ = new TestData(&test_data2_was_destroyed_);
48 supports_user_data_.reset(new TestSupportsUserData()); 48 supports_user_data_.reset(new TestSupportsUserData());
49 } 49 }
50 50
51 virtual void TearDown() OVERRIDE { 51 virtual void TearDown() override {
52 if (!test_data1_was_destroyed_ && 52 if (!test_data1_was_destroyed_ &&
53 supports_user_data_ && 53 supports_user_data_ &&
54 supports_user_data_->GetUserData(kTestData1Key) != test_data1_) 54 supports_user_data_->GetUserData(kTestData1Key) != test_data1_)
55 delete test_data1_; 55 delete test_data1_;
56 if (!test_data2_was_destroyed_ && 56 if (!test_data2_was_destroyed_ &&
57 supports_user_data_ && 57 supports_user_data_ &&
58 supports_user_data_->GetUserData(kTestData2Key) != test_data2_) 58 supports_user_data_->GetUserData(kTestData2Key) != test_data2_)
59 delete test_data2_; 59 delete test_data2_;
60 60
61 PlatformTest::TearDown(); 61 PlatformTest::TearDown();
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 supports_user_data_->RemoveUserData(kTestData2Key); 108 supports_user_data_->RemoveUserData(kTestData2Key);
109 EXPECT_FALSE(test_data1_was_destroyed_); 109 EXPECT_FALSE(test_data1_was_destroyed_);
110 EXPECT_TRUE(test_data2_was_destroyed_); 110 EXPECT_TRUE(test_data2_was_destroyed_);
111 111
112 supports_user_data_.reset(); 112 supports_user_data_.reset();
113 EXPECT_TRUE(test_data1_was_destroyed_); 113 EXPECT_TRUE(test_data1_was_destroyed_);
114 } 114 }
115 115
116 } // namespace ios 116 } // namespace ios
OLDNEW
« no previous file with comments | « no previous file | ios/public/test/fake_profile_oauth2_token_service_ios_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698