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

Unified Diff: chrome/browser/sync/internal_api/debug_info_event_listener_unittest.cc

Issue 10147003: [Sync] Move 'syncapi_core' and 'sync_unit_tests' targets to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Win update errors Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/internal_api/debug_info_event_listener_unittest.cc
diff --git a/chrome/browser/sync/internal_api/debug_info_event_listener_unittest.cc b/chrome/browser/sync/internal_api/debug_info_event_listener_unittest.cc
deleted file mode 100644
index 79b99ba1da669799fa841f5cc2f0466466078630..0000000000000000000000000000000000000000
--- a/chrome/browser/sync/internal_api/debug_info_event_listener_unittest.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2011 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 "chrome/browser/sync/internal_api/debug_info_event_listener.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-typedef testing::Test DebugInfoEventListenerTest;
-
-namespace sync_api {
-TEST_F(DebugInfoEventListenerTest, VerifyEventsAdded) {
- sync_api::DebugInfoEventListener debug_info_event_listener;
- debug_info_event_listener.CreateAndAddEvent(
- sync_pb::DebugEventInfo::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_type());
- ASSERT_EQ(debug_info.type(), sync_pb::DebugEventInfo::ENCRYPTION_COMPLETE);
-}
-
-TEST_F(DebugInfoEventListenerTest, VerifyQueueSize) {
- sync_api::DebugInfoEventListener debug_info_event_listener;
- for (int i = 0; i < 10; ++i) {
- debug_info_event_listener.CreateAndAddEvent(
- sync_pb::DebugEventInfo::ENCRYPTION_COMPLETE);
- }
- ASSERT_EQ(debug_info_event_listener.events_.size(),
- sync_api::kMaxEntries);
-}
-
-TEST_F(DebugInfoEventListenerTest, VerifyGetAndClearEvents) {
- sync_api::DebugInfoEventListener debug_info_event_listener;
- debug_info_event_listener.CreateAndAddEvent(
- sync_pb::DebugEventInfo::ENCRYPTION_COMPLETE);
- ASSERT_EQ(debug_info_event_listener.events_.size(), 1U);
- sync_pb::DebugInfo debug_info;
- debug_info_event_listener.GetAndClearDebugInfo(&debug_info);
- ASSERT_EQ(debug_info_event_listener.events_.size(), 0U);
- ASSERT_EQ(debug_info.events_size(), 1);
- ASSERT_TRUE(debug_info.events(0).has_type());
- ASSERT_EQ(debug_info.events(0).type(),
- sync_pb::DebugEventInfo::ENCRYPTION_COMPLETE);
-}
-
-} // namespace sync_api

Powered by Google App Engine
This is Rietveld 408576698