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

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

Issue 503903004: Remove implicit conversions from scoped_refptr to T* in chrome/browser/extensions/activity_log/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timeout insurance Created 6 years, 4 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
« no previous file with comments | « chrome/browser/extensions/activity_log/fullstream_ui_policy.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 188a52abe0a28e8bc7a58db4fbfbdb66f1f459db..75f06b697f43596b696b57c0bfa145ffbaddbdf0 100644
--- a/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc
+++ b/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc
@@ -154,52 +154,121 @@ class FullStreamUIPolicyTest : public testing::Test {
static void Arguments_Present(scoped_ptr<Action::ActionVector> i) {
scoped_refptr<Action> last = i->front();
- CheckAction(*last, "odlameecjipmbmbejkplpemijjgpljce",
- Action::ACTION_API_CALL, "extension.connect",
- "[\"hello\",\"world\"]", "", "", "");
+ CheckAction(*last.get(),
+ "odlameecjipmbmbejkplpemijjgpljce",
+ Action::ACTION_API_CALL,
+ "extension.connect",
+ "[\"hello\",\"world\"]",
+ "",
+ "",
+ "");
}
static void Arguments_GetTodaysActions(
scoped_ptr<Action::ActionVector> actions) {
ASSERT_EQ(2, static_cast<int>(actions->size()));
- CheckAction(*actions->at(0), "punky", Action::ACTION_DOM_ACCESS, "lets",
- "[\"vamoose\"]", "http://www.google.com/", "Page Title",
+ 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",
"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(
scoped_ptr<Action::ActionVector> actions) {
ASSERT_EQ(2, static_cast<int>(actions->size()));
- 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\"]", "", "", "");
+ 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\"]",
+ "",
+ "",
+ "");
}
static void AllURLsRemoved(scoped_ptr<Action::ActionVector> actions) {
ASSERT_EQ(2, static_cast<int>(actions->size()));
- CheckAction(*actions->at(0), "punky", Action::ACTION_API_CALL, "lets",
- "[\"vamoose\"]", "", "", "");
- CheckAction(*actions->at(1), "punky", Action::ACTION_DOM_ACCESS, "lets",
- "[\"vamoose\"]", "", "", "");
+ CheckAction(*actions->at(0).get(),
+ "punky",
+ Action::ACTION_API_CALL,
+ "lets",
+ "[\"vamoose\"]",
+ "",
+ "",
+ "");
+ CheckAction(*actions->at(1).get(),
+ "punky",
+ Action::ACTION_DOM_ACCESS,
+ "lets",
+ "[\"vamoose\"]",
+ "",
+ "",
+ "");
}
static void SomeURLsRemoved(scoped_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), "punky", Action::ACTION_DOM_ACCESS, "lets",
- "[\"vamoose\"]", "http://www.google.com/", "Google",
+ CheckAction(*actions->at(0).get(),
+ "punky",
+ Action::ACTION_DOM_ACCESS,
+ "lets",
+ "[\"vamoose\"]",
+ "http://www.google.com/",
+ "Google",
"http://www.args-url.com/");
- 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\"]", "", "", "");
+ 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\"]",
+ "",
+ "",
+ "");
}
static void CheckAction(const Action& action,
@@ -282,7 +351,7 @@ class FullStreamUIPolicyTest : public testing::Test {
static void NoActionsDeleted(scoped_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),
+ CheckAction(*actions->at(0).get(),
"punky2",
Action::ACTION_API_CALL,
"lets2",
@@ -291,7 +360,7 @@ class FullStreamUIPolicyTest : public testing::Test {
"Google2",
"http://www.args-url2.com/");
ASSERT_EQ(3, actions->at(0)->action_id());
- CheckAction(*actions->at(1),
+ CheckAction(*actions->at(1).get(),
"punky2",
Action::ACTION_API_CALL,
"lets2",
@@ -300,7 +369,7 @@ class FullStreamUIPolicyTest : public testing::Test {
"Google2",
"http://www.args-url2.com/");
ASSERT_EQ(4, actions->at(1)->action_id());
- CheckAction(*actions->at(2),
+ CheckAction(*actions->at(2).get(),
"punky1",
Action::ACTION_DOM_ACCESS,
"lets1",
@@ -309,7 +378,7 @@ class FullStreamUIPolicyTest : public testing::Test {
"Google1",
"http://www.args-url1.com/");
ASSERT_EQ(1, actions->at(2)->action_id());
- CheckAction(*actions->at(3),
+ CheckAction(*actions->at(3).get(),
"punky1",
Action::ACTION_DOM_ACCESS,
"lets1",
@@ -323,7 +392,7 @@ class FullStreamUIPolicyTest : public testing::Test {
static void Action1Deleted(scoped_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),
+ CheckAction(*actions->at(0).get(),
"punky2",
Action::ACTION_API_CALL,
"lets2",
@@ -332,7 +401,7 @@ class FullStreamUIPolicyTest : public testing::Test {
"Google2",
"http://www.args-url2.com/");
ASSERT_EQ(3, actions->at(0)->action_id());
- CheckAction(*actions->at(1),
+ CheckAction(*actions->at(1).get(),
"punky2",
Action::ACTION_API_CALL,
"lets2",
@@ -346,7 +415,7 @@ class FullStreamUIPolicyTest : public testing::Test {
static void Action2Deleted(scoped_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),
+ CheckAction(*actions->at(0).get(),
"punky1",
Action::ACTION_DOM_ACCESS,
"lets1",
@@ -355,7 +424,7 @@ class FullStreamUIPolicyTest : public testing::Test {
"Google1",
"http://www.args-url1.com/");
ASSERT_EQ(1, actions->at(0)->action_id());
- CheckAction(*actions->at(1),
+ CheckAction(*actions->at(1).get(),
"punky1",
Action::ACTION_DOM_ACCESS,
"lets1",
« no previous file with comments | « chrome/browser/extensions/activity_log/fullstream_ui_policy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698