Index: chrome/browser/extensions/activity_log/counting_policy_unittest.cc |
diff --git a/chrome/browser/extensions/activity_log/counting_policy_unittest.cc b/chrome/browser/extensions/activity_log/counting_policy_unittest.cc |
index 39b6d5b5951ac7f5fd644ecadfabcd592fa42eda..332bf68892708ba58ee84ce1d861274b02074667 100644 |
--- a/chrome/browser/extensions/activity_log/counting_policy_unittest.cc |
+++ b/chrome/browser/extensions/activity_log/counting_policy_unittest.cc |
@@ -183,84 +183,37 @@ class CountingPolicyTest : public testing::Test { |
static void Arguments_Stripped(std::unique_ptr<Action::ActionVector> i) { |
scoped_refptr<Action> last = i->front(); |
- CheckAction(*last.get(), |
- "odlameecjipmbmbejkplpemijjgpljce", |
- Action::ACTION_API_CALL, |
- "extension.connect", |
- "[\"hello\",\"world\"]", |
- "", |
- "", |
- "", |
- 1); |
+ CheckAction(*last, "odlameecjipmbmbejkplpemijjgpljce", |
+ Action::ACTION_API_CALL, "extension.connect", |
+ "[\"hello\",\"world\"]", "", "", "", 1); |
} |
static void Arguments_GetSinglesAction( |
std::unique_ptr<Action::ActionVector> actions) { |
ASSERT_EQ(1, static_cast<int>(actions->size())); |
- CheckAction(*actions->at(0).get(), |
- "punky", |
- Action::ACTION_DOM_ACCESS, |
- "lets", |
- "", |
- "http://www.google.com/", |
- "", |
- "", |
- 1); |
+ CheckAction(*actions->at(0), "punky", Action::ACTION_DOM_ACCESS, "lets", "", |
+ "http://www.google.com/", "", "", 1); |
} |
static void Arguments_GetTodaysActions( |
std::unique_ptr<Action::ActionVector> actions) { |
ASSERT_EQ(3, static_cast<int>(actions->size())); |
- CheckAction(*actions->at(0).get(), |
- "punky", |
- Action::ACTION_API_CALL, |
- "brewster", |
- "", |
- "", |
- "", |
- "", |
- 2); |
- CheckAction(*actions->at(1).get(), |
- "punky", |
- Action::ACTION_DOM_ACCESS, |
- "lets", |
- "", |
- "http://www.google.com/", |
- "", |
- "", |
- 1); |
- CheckAction(*actions->at(2).get(), |
- "punky", |
- Action::ACTION_API_CALL, |
- "extension.sendMessage", |
- "[\"not\",\"stripped\"]", |
- "", |
- "", |
- "", |
+ CheckAction(*actions->at(0), "punky", Action::ACTION_API_CALL, "brewster", |
+ "", "", "", "", 2); |
+ CheckAction(*actions->at(1), "punky", Action::ACTION_DOM_ACCESS, "lets", "", |
+ "http://www.google.com/", "", "", 1); |
+ CheckAction(*actions->at(2), "punky", Action::ACTION_API_CALL, |
+ "extension.sendMessage", "[\"not\",\"stripped\"]", "", "", "", |
1); |
} |
static void Arguments_GetOlderActions( |
std::unique_ptr<Action::ActionVector> actions) { |
ASSERT_EQ(2, static_cast<int>(actions->size())); |
- CheckAction(*actions->at(0).get(), |
- "punky", |
- Action::ACTION_DOM_ACCESS, |
- "lets", |
- "", |
- "http://www.google.com/", |
- "", |
- "", |
- 1); |
- CheckAction(*actions->at(1).get(), |
- "punky", |
- Action::ACTION_API_CALL, |
- "brewster", |
- "", |
- "", |
- "", |
- "", |
- 1); |
+ CheckAction(*actions->at(0), "punky", Action::ACTION_DOM_ACCESS, "lets", "", |
+ "http://www.google.com/", "", "", 1); |
+ CheckAction(*actions->at(1), "punky", Action::ACTION_API_CALL, "brewster", |
+ "", "", "", "", 1); |
} |
static void Arguments_CheckMergeCount( |
@@ -268,15 +221,8 @@ class CountingPolicyTest : public testing::Test { |
std::unique_ptr<Action::ActionVector> actions) { |
if (count > 0) { |
ASSERT_EQ(1u, actions->size()); |
- CheckAction(*actions->at(0).get(), |
- "punky", |
- Action::ACTION_API_CALL, |
- "brewster", |
- "", |
- "", |
- "", |
- "", |
- count); |
+ CheckAction(*actions->at(0), "punky", Action::ACTION_API_CALL, "brewster", |
+ "", "", "", "", count); |
} else { |
ASSERT_EQ(0u, actions->size()); |
} |
@@ -288,15 +234,8 @@ class CountingPolicyTest : public testing::Test { |
std::unique_ptr<Action::ActionVector> actions) { |
if (count > 0) { |
ASSERT_EQ(1u, actions->size()); |
- CheckAction(*actions->at(0).get(), |
- "punky", |
- Action::ACTION_API_CALL, |
- "brewster", |
- "", |
- "", |
- "", |
- "", |
- count); |
+ CheckAction(*actions->at(0), "punky", Action::ACTION_API_CALL, "brewster", |
+ "", "", "", "", count); |
ASSERT_EQ(time, actions->at(0)->time()); |
} else { |
ASSERT_EQ(0u, actions->size()); |
@@ -305,74 +244,26 @@ class CountingPolicyTest : public testing::Test { |
static void AllURLsRemoved(std::unique_ptr<Action::ActionVector> actions) { |
ASSERT_EQ(2, static_cast<int>(actions->size())); |
- CheckAction(*actions->at(0).get(), |
- "punky", |
- Action::ACTION_DOM_ACCESS, |
- "lets", |
- "", |
- "", |
- "", |
- "", |
- 1); |
- CheckAction(*actions->at(1).get(), |
- "punky", |
- Action::ACTION_DOM_ACCESS, |
- "lets", |
- "", |
- "", |
- "", |
- "", |
- 1); |
+ CheckAction(*actions->at(0), "punky", Action::ACTION_DOM_ACCESS, "lets", "", |
+ "", "", "", 1); |
+ CheckAction(*actions->at(1), "punky", Action::ACTION_DOM_ACCESS, "lets", "", |
+ "", "", "", 1); |
} |
static void SomeURLsRemoved(std::unique_ptr<Action::ActionVector> actions) { |
// These will be in the vector in reverse time order. |
ASSERT_EQ(5, static_cast<int>(actions->size())); |
- CheckAction(*actions->at(0).get(), |
- "punky", |
- Action::ACTION_DOM_ACCESS, |
- "lets", |
- "", |
- "http://www.google.com/", |
- "Google", |
- "http://www.args-url.com/", |
- 1); |
- CheckAction(*actions->at(1).get(), |
- "punky", |
- Action::ACTION_DOM_ACCESS, |
- "lets", |
- "", |
- "http://www.google.com/", |
- "Google", |
- "", |
- 1); |
- CheckAction(*actions->at(2).get(), |
- "punky", |
- Action::ACTION_DOM_ACCESS, |
- "lets", |
- "", |
- "", |
- "", |
- "", |
- 1); |
- CheckAction(*actions->at(3).get(), |
- "punky", |
- Action::ACTION_DOM_ACCESS, |
- "lets", |
- "", |
- "", |
- "", |
- "http://www.google.com/", |
- 1); |
- CheckAction(*actions->at(4).get(), |
- "punky", |
- Action::ACTION_DOM_ACCESS, |
- "lets", |
- "", |
- "", |
- "", |
- "", |
+ CheckAction(*actions->at(0), "punky", Action::ACTION_DOM_ACCESS, "lets", "", |
+ "http://www.google.com/", "Google", "http://www.args-url.com/", |
1); |
+ CheckAction(*actions->at(1), "punky", Action::ACTION_DOM_ACCESS, "lets", "", |
+ "http://www.google.com/", "Google", "", 1); |
+ CheckAction(*actions->at(2), "punky", Action::ACTION_DOM_ACCESS, "lets", "", |
+ "", "", "", 1); |
+ CheckAction(*actions->at(3), "punky", Action::ACTION_DOM_ACCESS, "lets", "", |
+ "", "", "http://www.google.com/", 1); |
+ CheckAction(*actions->at(4), "punky", Action::ACTION_DOM_ACCESS, "lets", "", |
+ "", "", "", 1); |
} |
static void CheckDuplicates(std::unique_ptr<Action::ActionVector> actions) { |
@@ -466,55 +357,31 @@ class CountingPolicyTest : public testing::Test { |
static void NoActionsDeleted(std::unique_ptr<Action::ActionVector> actions) { |
// These will be in the vector in reverse time order. |
ASSERT_EQ(2, static_cast<int>(actions->size())); |
- CheckAction(*actions->at(0).get(), |
- "punky2", |
- Action::ACTION_API_CALL, |
- "lets2", |
- "", |
- "http://www.google2.com/", |
- "Google2", |
- "http://www.args-url2.com/", |
- 2); |
+ CheckAction(*actions->at(0), "punky2", Action::ACTION_API_CALL, "lets2", "", |
+ "http://www.google2.com/", "Google2", |
+ "http://www.args-url2.com/", 2); |
ASSERT_EQ(2, actions->at(0)->action_id()); |
- CheckAction(*actions->at(1).get(), |
- "punky1", |
- Action::ACTION_DOM_ACCESS, |
- "lets1", |
- "", |
- "http://www.google1.com/", |
- "Google1", |
- "http://www.args-url1.com/", |
- 2); |
+ CheckAction(*actions->at(1), "punky1", Action::ACTION_DOM_ACCESS, "lets1", |
+ "", "http://www.google1.com/", "Google1", |
+ "http://www.args-url1.com/", 2); |
ASSERT_EQ(1, actions->at(1)->action_id()); |
} |
static void Action1Deleted(std::unique_ptr<Action::ActionVector> actions) { |
// These will be in the vector in reverse time order. |
ASSERT_EQ(1, static_cast<int>(actions->size())); |
- CheckAction(*actions->at(0).get(), |
- "punky2", |
- Action::ACTION_API_CALL, |
- "lets2", |
- "", |
- "http://www.google2.com/", |
- "Google2", |
- "http://www.args-url2.com/", |
- 2); |
+ CheckAction(*actions->at(0), "punky2", Action::ACTION_API_CALL, "lets2", "", |
+ "http://www.google2.com/", "Google2", |
+ "http://www.args-url2.com/", 2); |
ASSERT_EQ(2, actions->at(0)->action_id()); |
} |
static void Action2Deleted(std::unique_ptr<Action::ActionVector> actions) { |
// These will be in the vector in reverse time order. |
ASSERT_EQ(1, static_cast<int>(actions->size())); |
- CheckAction(*actions->at(0).get(), |
- "punky1", |
- Action::ACTION_DOM_ACCESS, |
- "lets1", |
- "", |
- "http://www.google1.com/", |
- "Google1", |
- "http://www.args-url1.com/", |
- 2); |
+ CheckAction(*actions->at(0), "punky1", Action::ACTION_DOM_ACCESS, "lets1", |
+ "", "http://www.google1.com/", "Google1", |
+ "http://www.args-url1.com/", 2); |
ASSERT_EQ(1, actions->at(0)->action_id()); |
} |