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

Side by Side Diff: chrome/browser/history/history_unittest.cc

Issue 7995: Move Time, TimeDelta and TimeTicks into namespace base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // History unit tests come in two flavors: 5 // History unit tests come in two flavors:
6 // 6 //
7 // 1. The more complicated style is that the unit test creates a full history 7 // 1. The more complicated style is that the unit test creates a full history
8 // service. This spawns a background thread for the history backend, and 8 // service. This spawns a background thread for the history backend, and
9 // all communication is asynchronous. This is useful for testing more 9 // all communication is asynchronous. This is useful for testing more
10 // complicated things or end-to-end behavior. 10 // complicated things or end-to-end behavior.
(...skipping 25 matching lines...) Expand all
36 #include "chrome/browser/history/page_usage_data.h" 36 #include "chrome/browser/history/page_usage_data.h"
37 #include "chrome/common/chrome_paths.h" 37 #include "chrome/common/chrome_paths.h"
38 #include "chrome/common/jpeg_codec.h" 38 #include "chrome/common/jpeg_codec.h"
39 #include "chrome/common/notification_service.h" 39 #include "chrome/common/notification_service.h"
40 #include "chrome/common/sqlite_utils.h" 40 #include "chrome/common/sqlite_utils.h"
41 #include "chrome/common/scoped_vector.h" 41 #include "chrome/common/scoped_vector.h"
42 #include "chrome/common/thumbnail_score.h" 42 #include "chrome/common/thumbnail_score.h"
43 #include "chrome/tools/profiles/thumbnail-inl.h" 43 #include "chrome/tools/profiles/thumbnail-inl.h"
44 #include "testing/gtest/include/gtest/gtest.h" 44 #include "testing/gtest/include/gtest/gtest.h"
45 45
46 using base::Time;
47 using base::TimeDelta;
48
46 class HistoryTest; 49 class HistoryTest;
47 50
48 // Specialize RunnableMethodTraits for HistoryTest so we can create callbacks. 51 // Specialize RunnableMethodTraits for HistoryTest so we can create callbacks.
49 // None of these callbacks can outlast the test, so there is not need to retain 52 // None of these callbacks can outlast the test, so there is not need to retain
50 // the HistoryTest object. 53 // the HistoryTest object.
51 template <> 54 template <>
52 struct RunnableMethodTraits<HistoryTest> { 55 struct RunnableMethodTraits<HistoryTest> {
53 static void RetainCallee(HistoryTest* obj) { } 56 static void RetainCallee(HistoryTest* obj) { }
54 static void ReleaseCallee(HistoryTest* obj) { } 57 static void ReleaseCallee(HistoryTest* obj) { }
55 }; 58 };
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 history->ScheduleDBTask(task.get(), &request_consumer); 827 history->ScheduleDBTask(task.get(), &request_consumer);
825 request_consumer.CancelAllRequests(); 828 request_consumer.CancelAllRequests();
826 CleanupHistoryService(); 829 CleanupHistoryService();
827 // WARNING: history has now been deleted. 830 // WARNING: history has now been deleted.
828 history = NULL; 831 history = NULL;
829 ASSERT_FALSE(task->done_invoked); 832 ASSERT_FALSE(task->done_invoked);
830 } 833 }
831 834
832 } // namespace history 835 } // namespace history
833 836
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698