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

Side by Side Diff: components/drive/event_logger_unittest.cc

Issue 1190203002: Move (most of) chrome/browser/drive into components/drive/service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 5 years, 5 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
« no previous file with comments | « components/drive/event_logger.cc ('k') | components/drive/service/drive_api_service.h » ('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 "chrome/browser/drive/event_logger.h" 5 #include "components/drive/event_logger.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace drive { 9 namespace drive {
10 10
11 TEST(EventLoggerTest, BasicLogging) { 11 TEST(EventLoggerTest, BasicLogging) {
12 EventLogger logger; 12 EventLogger logger;
13 logger.SetHistorySize(3); // At most 3 events are kept. 13 logger.SetHistorySize(3); // At most 3 events are kept.
14 EXPECT_EQ(0U, logger.GetHistory().size()); 14 EXPECT_EQ(0U, logger.GetHistory().size());
15 15
(...skipping 18 matching lines...) Expand all
34 // The oldest events is pushed out. 34 // The oldest events is pushed out.
35 EXPECT_EQ(1, history[0].id); 35 EXPECT_EQ(1, history[0].id);
36 EXPECT_EQ("2nd", history[0].what); 36 EXPECT_EQ("2nd", history[0].what);
37 EXPECT_EQ(2, history[1].id); 37 EXPECT_EQ(2, history[1].id);
38 EXPECT_EQ("third", history[1].what); 38 EXPECT_EQ("third", history[1].what);
39 EXPECT_EQ(3, history[2].id); 39 EXPECT_EQ(3, history[2].id);
40 EXPECT_EQ("fourth", history[2].what); 40 EXPECT_EQ("fourth", history[2].what);
41 } 41 }
42 42
43 } // namespace drive 43 } // namespace drive
OLDNEW
« no previous file with comments | « components/drive/event_logger.cc ('k') | components/drive/service/drive_api_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698