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

Unified Diff: chrome/browser/performance_monitor/database_unittest.cc

Issue 10837003: CPM Refactor and Cleanup (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_startup_times
Patch Set: Merged with latest master Created 8 years, 4 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 | « no previous file | chrome/browser/performance_monitor/event.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/performance_monitor/database_unittest.cc
diff --git a/chrome/browser/performance_monitor/database_unittest.cc b/chrome/browser/performance_monitor/database_unittest.cc
index 355c9ff6c3a7c326f76a6d355fc6e7cd99a43b92..19ece88a51a42854ac6430b40d5e70cf67759ae7 100644
--- a/chrome/browser/performance_monitor/database_unittest.cc
+++ b/chrome/browser/performance_monitor/database_unittest.cc
@@ -71,18 +71,22 @@ class PerformanceMonitorDatabaseEventTest : public ::testing::Test {
private:
void InitEvents() {
- install_event_1_ = util::CreateExtensionInstallEvent(
- clock_->GetTime(), "a", "extension 1", "http://foo.com",
- static_cast<int>(Extension::LOAD), "0.1", "Test Test");
- install_event_2_ = util::CreateExtensionInstallEvent(
- clock_->GetTime(), "b", "extension 2", "http://bar.com",
- static_cast<int>(Extension::LOAD), "0.1", "Test Test");
- uninstall_event_1_ = util::CreateExtensionUninstallEvent(
- clock_->GetTime(), "a", "extension 1", "http://foo.com",
- static_cast<int>(Extension::LOAD), "0.1", "Test Test");
- uninstall_event_2_ = util::CreateExtensionUninstallEvent(
- clock_->GetTime(), "b", "extension 2", "http://bar.com",
- static_cast<int>(Extension::LOAD), "0.1", "Test Test");
+ install_event_1_ = util::CreateExtensionEvent(
+ EVENT_EXTENSION_INSTALL, clock_->GetTime(), "a", "extension 1",
+ "http://foo.com", static_cast<int>(Extension::LOAD), "0.1",
+ "Test Test");
+ install_event_2_ = util::CreateExtensionEvent(
+ EVENT_EXTENSION_INSTALL, clock_->GetTime(), "b", "extension 2",
+ "http://bar.com", static_cast<int>(Extension::LOAD), "0.1",
+ "Test Test");
+ uninstall_event_1_ = util::CreateExtensionEvent(
+ EVENT_EXTENSION_UNINSTALL, clock_->GetTime(), "a", "extension 1",
+ "http://foo.com", static_cast<int>(Extension::LOAD), "0.1",
+ "Test Test");
+ uninstall_event_2_ = util::CreateExtensionEvent(
+ EVENT_EXTENSION_UNINSTALL, clock_->GetTime(), "b", "extension 2",
+ "http://bar.com", static_cast<int>(Extension::LOAD), "0.1",
+ "Test Test");
}
};
@@ -241,9 +245,9 @@ TEST_F(PerformanceMonitorDatabaseEventTest, GetInstallEvents) {
TEST_F(PerformanceMonitorDatabaseEventTest, GetUnusedEventType) {
std::vector<linked_ptr<Event> > events =
- db_->GetEvents(EVENT_EXTENSION_UNLOAD);
+ db_->GetEvents(EVENT_EXTENSION_DISABLE);
ASSERT_TRUE(events.empty());
- events = db_->GetEvents(EVENT_EXTENSION_UNLOAD, clock_->GetTime(),
+ events = db_->GetEvents(EVENT_EXTENSION_DISABLE, clock_->GetTime(),
clock_->GetTime());
ASSERT_TRUE(events.empty());
}
@@ -251,13 +255,15 @@ TEST_F(PerformanceMonitorDatabaseEventTest, GetUnusedEventType) {
TEST_F(PerformanceMonitorDatabaseEventTest, GetEventsTimeRange) {
base::Time start_time = clock_->GetTime();
scoped_ptr<Event> new_install_event =
- util::CreateExtensionInstallEvent(
- clock_->GetTime(), "c", "test extension", "http://foo.com",
- static_cast<int>(Extension::LOAD), "0.1", "Test Test");
+ util::CreateExtensionEvent(EVENT_EXTENSION_INSTALL, clock_->GetTime(),
+ "c", "test extension", "http://foo.com",
+ static_cast<int>(Extension::LOAD), "0.1",
+ "Test Test");
scoped_ptr<Event> new_uninstall_event =
- util::CreateExtensionUninstallEvent(
- clock_->GetTime(), "c", "test extension", "http://foo.com",
- static_cast<int>(Extension::LOAD), "0.1", "Test Test");
+ util::CreateExtensionEvent(EVENT_EXTENSION_UNINSTALL, clock_->GetTime(),
+ "c", "test extension", "http://foo.com",
+ static_cast<int>(Extension::LOAD), "0.1",
+ "Test Test");
base::Time end_time = clock_->GetTime();
db_->AddEvent(*new_install_event.get());
db_->AddEvent(*new_uninstall_event.get());
« no previous file with comments | « no previous file | chrome/browser/performance_monitor/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698