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

Unified Diff: chrome/common/extensions/value_counter_unittest.cc

Issue 10661038: Revert 143896 - Filtered events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/value_counter.cc ('k') | chrome/renderer/extensions/event_bindings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/value_counter_unittest.cc
===================================================================
--- chrome/common/extensions/value_counter_unittest.cc (revision 144007)
+++ chrome/common/extensions/value_counter_unittest.cc (working copy)
@@ -1,42 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/memory/scoped_ptr.h"
-#include "base/values.h"
-#include "chrome/common/extensions/value_counter.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-class ValueCounterUnittest : public testing::Test {
-};
-
-TEST_F(ValueCounterUnittest, TestAddingSameValue) {
- extensions::ValueCounter vc;
- base::ListValue value;
- ASSERT_EQ(1, vc.Add(value));
- ASSERT_EQ(2, vc.Add(value));
-}
-
-TEST_F(ValueCounterUnittest, TestAddingDifferentValue) {
- extensions::ValueCounter vc;
- base::ListValue value1;
- base::DictionaryValue value2;
- ASSERT_EQ(1, vc.Add(value1));
- ASSERT_EQ(1, vc.Add(value2));
-}
-
-TEST_F(ValueCounterUnittest, TestRemovingValue) {
- extensions::ValueCounter vc;
- base::ListValue value;
- ASSERT_EQ(1, vc.Add(value));
- ASSERT_EQ(2, vc.Add(value));
- ASSERT_EQ(1, vc.Remove(value));
- ASSERT_EQ(0, vc.Remove(value));
-}
-
-TEST_F(ValueCounterUnittest, TestAddIfMissing) {
- extensions::ValueCounter vc;
- base::ListValue value;
- ASSERT_EQ(1, vc.AddIfMissing(value));
- ASSERT_EQ(1, vc.AddIfMissing(value));
-}
« no previous file with comments | « chrome/common/extensions/value_counter.cc ('k') | chrome/renderer/extensions/event_bindings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698