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

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

Issue 19234003: Extension activity log database refactoring (step 2) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Unit test fixes Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/activity_log/activity_log_unittest.cc
diff --git a/chrome/browser/extensions/activity_log/activity_log_unittest.cc b/chrome/browser/extensions/activity_log/activity_log_unittest.cc
index a35ae26aefc6a2205b1cfe2fbb6db0f482f689bb..e449984882cf79a334a7e1d8683083790bf5298f 100644
--- a/chrome/browser/extensions/activity_log/activity_log_unittest.cc
+++ b/chrome/browser/extensions/activity_log/activity_log_unittest.cc
@@ -84,11 +84,11 @@ class ActivityLogTest : public ChromeRenderViewHostTestHarness {
scoped_refptr<Action> last = i->front();
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableExtensionActivityLogTesting))
- args = "Injected scripts () onto "
- "http://www.google.com/foo?bar extra";
+ args = "ID=abc CATEGORY=content_script API=document.write ARGS=[\"\"] "
+ "PAGE_URL=http://www.google.com/foo?bar OTHER={}";
else
- args = "Injected scripts () onto "
- "http://www.google.com/foo extra";
+ args = "ID=abc CATEGORY=content_script API=document.write ARGS=[\"\"] "
+ "PAGE_URL=http://www.google.com/foo OTHER={}";
ASSERT_EQ(args, last->PrintForDebug());
}
@@ -96,8 +96,8 @@ class ActivityLogTest : public ChromeRenderViewHostTestHarness {
scoped_ptr<std::vector<scoped_refptr<Action> > > i) {
scoped_refptr<Action> last = i->front();
std::string id(kExtensionId);
- std::string noargs = "ID: " + id + ", CATEGORY: "
- "call, API: tabs.testMethod, ARGS: ";
+ std::string noargs =
+ "ID=" + id + " CATEGORY=api_call API=tabs.testMethod ARGS=[] OTHER={}";
ASSERT_EQ(noargs, last->PrintForDebug());
}
@@ -105,8 +105,8 @@ class ActivityLogTest : public ChromeRenderViewHostTestHarness {
scoped_ptr<std::vector<scoped_refptr<Action> > > i) {
scoped_refptr<Action> last = i->front();
std::string id(kExtensionId);
- std::string args = "ID: " + id + ", CATEGORY: "
- "call, API: extension.connect, ARGS: \"hello\", \"world\"";
+ std::string args = "ID=" + id + " CATEGORY=api_call API=extension.connect "
+ "ARGS=[\"hello\",\"world\"] OTHER={}";
ASSERT_EQ(args, last->PrintForDebug());
}
@@ -122,8 +122,9 @@ class ActivityLogTest : public ChromeRenderViewHostTestHarness {
scoped_ptr<std::vector<scoped_refptr<Action> > > i) {
ASSERT_EQ(1U, i->size());
scoped_refptr<Action> last = i->front();
- std::string args = "Injected scripts (\"script \") "
- "onto http://www.google.com/ (prerender)";
+ std::string args =
+ "ID=odlameecjipmbmbejkplpemijjgpljce CATEGORY=content_script API= "
+ "ARGS=[\"\\\"script \\\"\"] PAGE_URL=http://www.google.com/ OTHER={}";
ASSERT_EQ(args, last->PrintForDebug());
}

Powered by Google App Engine
This is Rietveld 408576698