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

Side by Side Diff: ash/shelf/scoped_observer_with_duplicated_sources_unittest.cc

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 8 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 | « ash/rotator/window_rotation.cc ('k') | ash/shelf/shelf.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 "ash/shelf/scoped_observer_with_duplicated_sources.h" 5 #include "ash/shelf/scoped_observer_with_duplicated_sources.h"
6 6
7 #include "base/memory/scoped_ptr.h"
8 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
9 8
10 class TestObserver { 9 class TestObserver {
11 public: 10 public:
12 TestObserver() {} 11 TestObserver() {}
13 ~TestObserver() {} 12 ~TestObserver() {}
14 13
15 private: 14 private:
16 DISALLOW_COPY_AND_ASSIGN(TestObserver); 15 DISALLOW_COPY_AND_ASSIGN(TestObserver);
17 }; 16 };
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 observers.Remove(&source2); 72 observers.Remove(&source2);
74 EXPECT_EQ(0, source2.GetObserverCount()); 73 EXPECT_EQ(0, source2.GetObserverCount());
75 EXPECT_FALSE(observers.IsObserving(&source2)); 74 EXPECT_FALSE(observers.IsObserving(&source2));
76 75
77 // Remove |source1| again. 76 // Remove |source1| again.
78 observers.Remove(&source1); 77 observers.Remove(&source1);
79 // In this time, |observer| is removed from |source1|. 78 // In this time, |observer| is removed from |source1|.
80 EXPECT_EQ(0, source1.GetObserverCount()); 79 EXPECT_EQ(0, source1.GetObserverCount());
81 EXPECT_FALSE(observers.IsObserving(&source1)); 80 EXPECT_FALSE(observers.IsObserving(&source1));
82 } 81 }
OLDNEW
« no previous file with comments | « ash/rotator/window_rotation.cc ('k') | ash/shelf/shelf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698