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

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

Issue 23449016: Update tests to check fields directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 3 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/counting_policy_unittest.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 56e5146b6e37ea060a9556edf8c631bbc5da530f..3c4afe36a9205d608f18110b6885c8a5dc354e75 100644
--- a/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc
+++ b/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc
@@ -164,36 +164,28 @@ class FullStreamUIPolicyTest : public testing::Test {
static void Arguments_Present(scoped_ptr<Action::ActionVector> i) {
scoped_refptr<Action> last = i->front();
- std::string args =
- "ID=odlameecjipmbmbejkplpemijjgpljce CATEGORY=api_call "
- "API=extension.connect ARGS=[\"hello\",\"world\"]";
- ASSERT_EQ(args, last->PrintForDebug());
+ CheckAction(*last, "odlameecjipmbmbejkplpemijjgpljce",
+ Action::ACTION_API_CALL, "extension.connect",
+ "[\"hello\",\"world\"]", "", "", "");
}
static void Arguments_GetTodaysActions(
scoped_ptr<Action::ActionVector> actions) {
- std::string api_print =
- "ID=punky CATEGORY=api_call API=brewster ARGS=[\"woof\"] "
- "PAGE_TITLE=\"Page Title\" ARG_URL=http://www.arg-url.com/";
- std::string dom_print =
- "ID=punky CATEGORY=dom_access API=lets ARGS=[\"vamoose\"] "
- "PAGE_URL=http://www.google.com/ PAGE_TITLE=\"Page Title\" "
- "ARG_URL=http://www.arg-url.com/";
ASSERT_EQ(2, static_cast<int>(actions->size()));
- ASSERT_EQ(dom_print, actions->at(0)->PrintForDebug());
- ASSERT_EQ(api_print, actions->at(1)->PrintForDebug());
+ 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(
scoped_ptr<Action::ActionVector> actions) {
- std::string api_print =
- "ID=punky CATEGORY=api_call API=brewster ARGS=[\"woof\"]";
- std::string dom_print =
- "ID=punky CATEGORY=dom_access API=lets ARGS=[\"vamoose\"] "
- "PAGE_URL=http://www.google.com/";
ASSERT_EQ(2, static_cast<int>(actions->size()));
- ASSERT_EQ(dom_print, actions->at(0)->PrintForDebug());
- ASSERT_EQ(api_print, actions->at(1)->PrintForDebug());
+ 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(scoped_ptr<Action::ActionVector> actions) {
« no previous file with comments | « chrome/browser/extensions/activity_log/counting_policy_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698