summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/app_notification_test_util.h
blob: 3ba55036d543084f3c30bdb76a6ba0d648fadd86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// 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.

#ifndef CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_TEST_UTIL_H_
#define CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_TEST_UTIL_H_

#include "chrome/browser/extensions/app_notification.h"

namespace extensions {
class AppNotificationManager;
}

namespace app_notification_test_util {

// Does a deep equality check of two AppNotificationList's, adding a gtest
// failure and logging at the first difference found.
void ExpectListsEqual(const extensions::AppNotificationList& one,
                      const extensions::AppNotificationList& two);

// Helper for inserting |count| dummy notifications with |prefix| in their
// title and body into |list|.
void AddNotifications(extensions::AppNotificationList* list,
                      const std::string& extension_id,
                      int count,
                      const std::string& prefix);

// Adds a copy of each item in |list| to |manager|.
bool AddCopiesFromList(extensions::AppNotificationManager* manager,
                       const extensions::AppNotificationList& list);

}  // namespace app_notification_test_util

#endif  // CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_TEST_UTIL_H_