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

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: Address some reviewer comments 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 e9f2c3ec6c8abc201155aba24b1651372b97f3e2..30b8d0ab4cae816826aeacc3736c47bb7e65bd06 100644
--- a/chrome/browser/extensions/activity_log/activity_log_unittest.cc
+++ b/chrome/browser/extensions/activity_log/activity_log_unittest.cc
@@ -84,11 +84,15 @@ 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={\"dom_verb\":3,\"extra\":\"extra\",\"page_title\":\"\"}";
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={\"dom_verb\":3,\"extra\":\"extra\",\"page_title\":\"\"}";
ASSERT_EQ(args, last->PrintForDebug());
}
@@ -96,8 +100,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 +109,9 @@ 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 +127,10 @@ 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={\"dom_verb\":3,\"extra\":\"(prerender)\",\"page_title\":\"\"}";
ASSERT_EQ(args, last->PrintForDebug());
}

Powered by Google App Engine
This is Rietveld 408576698