Index: chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc |
diff --git a/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc b/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc |
index 5fe463a60a7c8383f15665daf0ad542b232ff97e..bb65a95478b9e6da979232ec5a2880989e7a76b2 100644 |
--- a/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc |
+++ b/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc |
@@ -153,121 +153,52 @@ class FullStreamUIPolicyTest : public testing::Test { |
static void Arguments_Present(std::unique_ptr<Action::ActionVector> i) { |
scoped_refptr<Action> last = i->front(); |
- CheckAction(*last.get(), |
- "odlameecjipmbmbejkplpemijjgpljce", |
- Action::ACTION_API_CALL, |
- "extension.connect", |
- "[\"hello\",\"world\"]", |
- "", |
- "", |
- ""); |
+ CheckAction(*last, "odlameecjipmbmbejkplpemijjgpljce", |
+ Action::ACTION_API_CALL, "extension.connect", |
+ "[\"hello\",\"world\"]", "", "", ""); |
} |
static void Arguments_GetTodaysActions( |
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", |
- "[\"vamoose\"]", |
- "http://www.google.com/", |
- "Page Title", |
- "http://www.arg-url.com/"); |
- CheckAction(*actions->at(1).get(), |
- "punky", |
- Action::ACTION_API_CALL, |
- "brewster", |
- "[\"woof\"]", |
- "", |
- "Page Title", |
+ CheckAction(*actions->at(0), "punky", Action::ACTION_DOM_ACCESS, "lets", |
+ "[\"vamoose\"]", "http://www.google.com/", "Page Title", |
"http://www.arg-url.com/"); |
+ CheckAction(*actions->at(1), "punky", Action::ACTION_API_CALL, "brewster", |
+ "[\"woof\"]", "", "Page Title", "http://www.arg-url.com/"); |
} |
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", |
- "[\"vamoose\"]", |
- "http://www.google.com/", |
- "", |
- ""); |
- CheckAction(*actions->at(1).get(), |
- "punky", |
- Action::ACTION_API_CALL, |
- "brewster", |
- "[\"woof\"]", |
- "", |
- "", |
- ""); |
+ CheckAction(*actions->at(0), "punky", Action::ACTION_DOM_ACCESS, "lets", |
+ "[\"vamoose\"]", "http://www.google.com/", "", ""); |
+ CheckAction(*actions->at(1), "punky", Action::ACTION_API_CALL, "brewster", |
+ "[\"woof\"]", "", "", ""); |
} |
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_API_CALL, |
- "lets", |
- "[\"vamoose\"]", |
- "", |
- "", |
- ""); |
- CheckAction(*actions->at(1).get(), |
- "punky", |
- Action::ACTION_DOM_ACCESS, |
- "lets", |
- "[\"vamoose\"]", |
- "", |
- "", |
- ""); |
+ CheckAction(*actions->at(0), "punky", Action::ACTION_API_CALL, "lets", |
+ "[\"vamoose\"]", "", "", ""); |
+ CheckAction(*actions->at(1), "punky", Action::ACTION_DOM_ACCESS, "lets", |
+ "[\"vamoose\"]", "", "", ""); |
} |
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", |
- "[\"vamoose\"]", |
- "http://www.google.com/", |
- "Google", |
+ CheckAction(*actions->at(0), "punky", Action::ACTION_DOM_ACCESS, "lets", |
+ "[\"vamoose\"]", "http://www.google.com/", "Google", |
"http://www.args-url.com/"); |
- CheckAction(*actions->at(1).get(), |
- "punky", |
- Action::ACTION_DOM_ACCESS, |
- "lets", |
- "[\"vamoose\"]", |
- "http://www.google.com/", |
- "Google", |
- ""); |
- CheckAction(*actions->at(2).get(), |
- "punky", |
- Action::ACTION_DOM_ACCESS, |
- "lets", |
- "[\"vamoose\"]", |
- "", |
- "", |
- ""); |
- CheckAction(*actions->at(3).get(), |
- "punky", |
- Action::ACTION_DOM_ACCESS, |
- "lets", |
- "[\"vamoose\"]", |
- "", |
- "", |
- "http://www.google.com/"); |
- CheckAction(*actions->at(4).get(), |
- "punky", |
- Action::ACTION_DOM_ACCESS, |
- "lets", |
- "[\"vamoose\"]", |
- "", |
- "", |
- ""); |
+ CheckAction(*actions->at(1), "punky", Action::ACTION_DOM_ACCESS, "lets", |
+ "[\"vamoose\"]", "http://www.google.com/", "Google", ""); |
+ CheckAction(*actions->at(2), "punky", Action::ACTION_DOM_ACCESS, "lets", |
+ "[\"vamoose\"]", "", "", ""); |
+ CheckAction(*actions->at(3), "punky", Action::ACTION_DOM_ACCESS, "lets", |
+ "[\"vamoose\"]", "", "", "http://www.google.com/"); |
+ CheckAction(*actions->at(4), "punky", Action::ACTION_DOM_ACCESS, "lets", |
+ "[\"vamoose\"]", "", "", ""); |
} |
static void CheckAction(const Action& action, |
@@ -350,40 +281,20 @@ class FullStreamUIPolicyTest : public testing::Test { |
static void NoActionsDeleted(std::unique_ptr<Action::ActionVector> actions) { |
// These will be in the vector in reverse time order. |
ASSERT_EQ(4, static_cast<int>(actions->size())); |
- CheckAction(*actions->at(0).get(), |
- "punky2", |
- Action::ACTION_API_CALL, |
- "lets2", |
- "[\"vamoose2\"]", |
- "http://www.google2.com/", |
- "Google2", |
+ CheckAction(*actions->at(0), "punky2", Action::ACTION_API_CALL, "lets2", |
+ "[\"vamoose2\"]", "http://www.google2.com/", "Google2", |
"http://www.args-url2.com/"); |
ASSERT_EQ(3, actions->at(0)->action_id()); |
- CheckAction(*actions->at(1).get(), |
- "punky2", |
- Action::ACTION_API_CALL, |
- "lets2", |
- "[\"vamoose2\"]", |
- "http://www.google2.com/", |
- "Google2", |
+ CheckAction(*actions->at(1), "punky2", Action::ACTION_API_CALL, "lets2", |
+ "[\"vamoose2\"]", "http://www.google2.com/", "Google2", |
"http://www.args-url2.com/"); |
ASSERT_EQ(4, actions->at(1)->action_id()); |
- CheckAction(*actions->at(2).get(), |
- "punky1", |
- Action::ACTION_DOM_ACCESS, |
- "lets1", |
- "[\"vamoose1\"]", |
- "http://www.google1.com/", |
- "Google1", |
+ CheckAction(*actions->at(2), "punky1", Action::ACTION_DOM_ACCESS, "lets1", |
+ "[\"vamoose1\"]", "http://www.google1.com/", "Google1", |
"http://www.args-url1.com/"); |
ASSERT_EQ(1, actions->at(2)->action_id()); |
- CheckAction(*actions->at(3).get(), |
- "punky1", |
- Action::ACTION_DOM_ACCESS, |
- "lets1", |
- "[\"vamoose1\"]", |
- "http://www.google1.com/", |
- "Google1", |
+ CheckAction(*actions->at(3), "punky1", Action::ACTION_DOM_ACCESS, "lets1", |
+ "[\"vamoose1\"]", "http://www.google1.com/", "Google1", |
"http://www.args-url1.com/"); |
ASSERT_EQ(2, actions->at(3)->action_id()); |
} |
@@ -391,22 +302,12 @@ class FullStreamUIPolicyTest : public testing::Test { |
static void Action1Deleted(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", |
- "[\"vamoose2\"]", |
- "http://www.google2.com/", |
- "Google2", |
+ CheckAction(*actions->at(0), "punky2", Action::ACTION_API_CALL, "lets2", |
+ "[\"vamoose2\"]", "http://www.google2.com/", "Google2", |
"http://www.args-url2.com/"); |
ASSERT_EQ(3, actions->at(0)->action_id()); |
- CheckAction(*actions->at(1).get(), |
- "punky2", |
- Action::ACTION_API_CALL, |
- "lets2", |
- "[\"vamoose2\"]", |
- "http://www.google2.com/", |
- "Google2", |
+ CheckAction(*actions->at(1), "punky2", Action::ACTION_API_CALL, "lets2", |
+ "[\"vamoose2\"]", "http://www.google2.com/", "Google2", |
"http://www.args-url2.com/"); |
ASSERT_EQ(4, actions->at(1)->action_id()); |
} |
@@ -414,22 +315,12 @@ class FullStreamUIPolicyTest : public testing::Test { |
static void Action2Deleted(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(), |
- "punky1", |
- Action::ACTION_DOM_ACCESS, |
- "lets1", |
- "[\"vamoose1\"]", |
- "http://www.google1.com/", |
- "Google1", |
+ CheckAction(*actions->at(0), "punky1", Action::ACTION_DOM_ACCESS, "lets1", |
+ "[\"vamoose1\"]", "http://www.google1.com/", "Google1", |
"http://www.args-url1.com/"); |
ASSERT_EQ(1, actions->at(0)->action_id()); |
- CheckAction(*actions->at(1).get(), |
- "punky1", |
- Action::ACTION_DOM_ACCESS, |
- "lets1", |
- "[\"vamoose1\"]", |
- "http://www.google1.com/", |
- "Google1", |
+ CheckAction(*actions->at(1), "punky1", Action::ACTION_DOM_ACCESS, "lets1", |
+ "[\"vamoose1\"]", "http://www.google1.com/", "Google1", |
"http://www.args-url1.com/"); |
ASSERT_EQ(2, actions->at(1)->action_id()); |
} |