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

Side by Side Diff: chrome/common/extensions/value_counter_unittest.cc

Issue 237723004: Move EventBindings to //extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/extensions/value_counter.cc ('k') | chrome/renderer/extensions/dispatcher.cc » ('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 (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_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/values.h" 6 #include "base/values.h"
7 #include "chrome/common/extensions/value_counter.h" 7 #include "extensions/common/value_counter.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 class ValueCounterUnittest : public testing::Test { 10 class ValueCounterUnittest : public testing::Test {
11 }; 11 };
12 12
13 TEST_F(ValueCounterUnittest, TestAddingSameValue) { 13 TEST_F(ValueCounterUnittest, TestAddingSameValue) {
14 extensions::ValueCounter vc; 14 extensions::ValueCounter vc;
15 base::ListValue value; 15 base::ListValue value;
16 ASSERT_EQ(1, vc.Add(value)); 16 ASSERT_EQ(1, vc.Add(value));
17 ASSERT_EQ(2, vc.Add(value)); 17 ASSERT_EQ(2, vc.Add(value));
(...skipping 15 matching lines...) Expand all
33 ASSERT_EQ(1, vc.Remove(value)); 33 ASSERT_EQ(1, vc.Remove(value));
34 ASSERT_EQ(0, vc.Remove(value)); 34 ASSERT_EQ(0, vc.Remove(value));
35 } 35 }
36 36
37 TEST_F(ValueCounterUnittest, TestAddIfMissing) { 37 TEST_F(ValueCounterUnittest, TestAddIfMissing) {
38 extensions::ValueCounter vc; 38 extensions::ValueCounter vc;
39 base::ListValue value; 39 base::ListValue value;
40 ASSERT_EQ(1, vc.AddIfMissing(value)); 40 ASSERT_EQ(1, vc.AddIfMissing(value));
41 ASSERT_EQ(1, vc.AddIfMissing(value)); 41 ASSERT_EQ(1, vc.AddIfMissing(value));
42 } 42 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/value_counter.cc ('k') | chrome/renderer/extensions/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698