| OLD | NEW |
| 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 "base/memory/scoped_vector.h" | 5 #include "base/memory/scoped_vector.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 14 |
| 14 namespace { | 15 namespace { |
| 15 | 16 |
| 16 // The LifeCycleObject notifies its Observer upon construction & destruction. | 17 // The LifeCycleObject notifies its Observer upon construction & destruction. |
| 17 class LifeCycleObject { | 18 class LifeCycleObject { |
| 18 public: | 19 public: |
| 19 class Observer { | 20 class Observer { |
| 20 public: | 21 public: |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 EXPECT_EQ(0, delete_counter); | 329 EXPECT_EQ(0, delete_counter); |
| 329 { | 330 { |
| 330 ScopedVector<DeleteCounter> v; | 331 ScopedVector<DeleteCounter> v; |
| 331 v.push_back(std::move(elem)); | 332 v.push_back(std::move(elem)); |
| 332 EXPECT_EQ(0, delete_counter); | 333 EXPECT_EQ(0, delete_counter); |
| 333 } | 334 } |
| 334 EXPECT_EQ(1, delete_counter); | 335 EXPECT_EQ(1, delete_counter); |
| 335 } | 336 } |
| 336 | 337 |
| 337 } // namespace | 338 } // namespace |
| OLD | NEW |