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

Unified Diff: trunk/src/chrome/browser/extensions/activity_log/activity_log_unittest.cc

Issue 23600024: Revert 222242 "[Activity Log] when extension is uninstalled, del..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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: trunk/src/chrome/browser/extensions/activity_log/activity_log_unittest.cc
===================================================================
--- trunk/src/chrome/browser/extensions/activity_log/activity_log_unittest.cc (revision 222255)
+++ trunk/src/chrome/browser/extensions/activity_log/activity_log_unittest.cc (working copy)
@@ -63,13 +63,8 @@
ChromeRenderViewHostTestHarness::TearDown();
}
- static void RetrieveActions_LogAndFetchActions0(
+ static void RetrieveActions_LogAndFetchActions(
scoped_ptr<std::vector<scoped_refptr<Action> > > i) {
- ASSERT_EQ(0, static_cast<int>(i->size()));
- }
-
- static void RetrieveActions_LogAndFetchActions2(
- scoped_ptr<std::vector<scoped_refptr<Action> > > i) {
ASSERT_EQ(2, static_cast<int>(i->size()));
}
@@ -161,7 +156,7 @@
"",
"",
0,
- base::Bind(ActivityLogTest::RetrieveActions_LogAndFetchActions2));
+ base::Bind(ActivityLogTest::RetrieveActions_LogAndFetchActions));
}
TEST_F(ActivityLogTest, LogPrerender) {
@@ -249,41 +244,4 @@
base::Bind(ActivityLogTest::RetrieveActions_ArgUrlExtraction));
}
-TEST_F(ActivityLogTest, UninstalledExtension) {
- scoped_refptr<const Extension> extension =
- ExtensionBuilder()
- .SetManifest(DictionaryBuilder()
- .Set("name", "Test extension")
- .Set("version", "1.0.0")
- .Set("manifest_version", 2))
- .Build();
-
- ActivityLog* activity_log = ActivityLog::GetInstance(profile());
- scoped_ptr<base::ListValue> args(new base::ListValue());
- ASSERT_TRUE(GetDatabaseEnabled());
-
- // Write some API calls
- scoped_refptr<Action> action = new Action(extension->id(),
- base::Time::Now(),
- Action::ACTION_API_CALL,
- "tabs.testMethod");
- activity_log->LogAction(action);
- action = new Action(extension->id(),
- base::Time::Now(),
- Action::ACTION_DOM_ACCESS,
- "document.write");
- action->set_page_url(GURL("http://www.google.com"));
-
- activity_log->OnExtensionUninstalled(extension);
-
- activity_log->GetFilteredActions(
- extension->id(),
- Action::ACTION_ANY,
- "",
- "",
- "",
- 0,
- base::Bind(ActivityLogTest::RetrieveActions_LogAndFetchActions0));
-}
-
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698