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

Unified Diff: components/sync/core_impl/debug_info_event_listener_unittest.cc

Issue 2413313004: [Sync] Move the last things out of core/. (Closed)
Patch Set: Address comments. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: components/sync/core_impl/debug_info_event_listener_unittest.cc
diff --git a/components/sync/core_impl/debug_info_event_listener_unittest.cc b/components/sync/core_impl/debug_info_event_listener_unittest.cc
deleted file mode 100644
index eb0e17321fc99d7f885f99a5ffbd56efee23f856..0000000000000000000000000000000000000000
--- a/components/sync/core_impl/debug_info_event_listener_unittest.cc
+++ /dev/null
@@ -1,61 +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 "components/sync/core_impl/debug_info_event_listener.h"
-
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace syncer {
-
-typedef testing::Test DebugInfoEventListenerTest;
-
-TEST_F(DebugInfoEventListenerTest, VerifyEventsAdded) {
- DebugInfoEventListener debug_info_event_listener;
- debug_info_event_listener.CreateAndAddEvent(
- sync_pb::SyncEnums::ENCRYPTION_COMPLETE);
- ASSERT_EQ(debug_info_event_listener.events_.size(), 1U);
- const sync_pb::DebugEventInfo& debug_info =
- debug_info_event_listener.events_.back();
- ASSERT_TRUE(debug_info.has_singleton_event());
- ASSERT_EQ(debug_info.singleton_event(),
- sync_pb::SyncEnums::ENCRYPTION_COMPLETE);
-}
-
-TEST_F(DebugInfoEventListenerTest, VerifyQueueSize) {
- DebugInfoEventListener debug_info_event_listener;
- for (unsigned int i = 0; i < 2 * kMaxEntries; ++i) {
- debug_info_event_listener.CreateAndAddEvent(
- sync_pb::SyncEnums::ENCRYPTION_COMPLETE);
- }
- sync_pb::DebugInfo debug_info;
- debug_info_event_listener.GetDebugInfo(&debug_info);
- debug_info_event_listener.ClearDebugInfo();
- ASSERT_TRUE(debug_info.events_dropped());
- ASSERT_EQ(static_cast<int>(kMaxEntries), debug_info.events_size());
-}
-
-TEST_F(DebugInfoEventListenerTest, VerifyGetEvents) {
- DebugInfoEventListener debug_info_event_listener;
- debug_info_event_listener.CreateAndAddEvent(
- sync_pb::SyncEnums::ENCRYPTION_COMPLETE);
- ASSERT_EQ(debug_info_event_listener.events_.size(), 1U);
- sync_pb::DebugInfo debug_info;
- debug_info_event_listener.GetDebugInfo(&debug_info);
- ASSERT_EQ(debug_info_event_listener.events_.size(), 1U);
- ASSERT_EQ(debug_info.events_size(), 1);
- ASSERT_TRUE(debug_info.events(0).has_singleton_event());
- ASSERT_EQ(debug_info.events(0).singleton_event(),
- sync_pb::SyncEnums::ENCRYPTION_COMPLETE);
-}
-
-TEST_F(DebugInfoEventListenerTest, VerifyClearEvents) {
- DebugInfoEventListener debug_info_event_listener;
- debug_info_event_listener.CreateAndAddEvent(
- sync_pb::SyncEnums::ENCRYPTION_COMPLETE);
- ASSERT_EQ(debug_info_event_listener.events_.size(), 1U);
- debug_info_event_listener.ClearDebugInfo();
- ASSERT_EQ(debug_info_event_listener.events_.size(), 0U);
-}
-
-} // namespace syncer
« no previous file with comments | « components/sync/core_impl/debug_info_event_listener.cc ('k') | components/sync/core_impl/js_mutation_event_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698