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

Unified Diff: chrome/browser/extensions/app_notification_test_util.cc

Issue 12680004: Remove chrome/ code to handle App Notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflicts. Created 7 years, 9 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/app_notification_test_util.cc
diff --git a/chrome/browser/extensions/app_notification_test_util.cc b/chrome/browser/extensions/app_notification_test_util.cc
deleted file mode 100644
index 20aaccdac77649ec75b5889a8ee3cd4610f69551..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/app_notification_test_util.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/strings/string_number_conversions.h"
-#include "chrome/browser/extensions/app_notification_manager.h"
-#include "chrome/browser/extensions/app_notification_test_util.h"
-#include "chrome/common/extensions/extension.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-using base::IntToString;
-using extensions::AppNotification;
-using extensions::AppNotificationList;
-
-namespace app_notification_test_util {
-
-void ExpectListsEqual(const AppNotificationList& one,
- const AppNotificationList& two) {
- ASSERT_EQ(one.size(), two.size());
- for (size_t i = 0; i < one.size(); i++) {
- ASSERT_TRUE(one[i]->Equals(*two[i]));
- }
-}
-
-void AddNotifications(AppNotificationList* list,
- const std::string& extension_id,
- int count,
- const std::string& prefix) {
- for (int i = 0; i < count; i++) {
- std::string guid = prefix + "_guid_" + IntToString(i);
- std::string title = prefix + "_title_" + IntToString(i);
- std::string body = prefix + "_body_" + IntToString(i);
- AppNotification* item = new AppNotification(
- true, base::Time::Now(), guid, extension_id, title, body);
- if (i % 2 == 0) {
- item->set_link_url(GURL("http://www.example.com/" + prefix));
- item->set_link_text(prefix + "_link_" + IntToString(i));
- }
- list->push_back(linked_ptr<AppNotification>(item));
- }
-}
-
-bool AddCopiesFromList(extensions::AppNotificationManager* manager,
- const AppNotificationList& list) {
- bool result = true;
- for (AppNotificationList::const_iterator i = list.begin();
- i != list.end();
- ++i) {
- result = result && manager->Add((*i)->Copy());
- }
- return result;
-}
-
-} // namespace app_notification_test_util
« no previous file with comments | « chrome/browser/extensions/app_notification_test_util.h ('k') | chrome/browser/extensions/app_notify_channel_setup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698