Upstreaming browser/ui/uikit_ui_util from iOS.
[chromium-blink-merge.git] / extensions / common / permissions / permission_message_test_util.h
blob8cfc3e0da45e0325f99070479b4ccaeee70e0822
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_MESSAGE_TEST_UTIL_H_
6 #define EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_MESSAGE_TEST_UTIL_H_
8 #include <string>
9 #include <vector>
11 #include "base/strings/string16.h"
12 #include "extensions/common/manifest.h"
13 #include "testing/gtest/include/gtest/gtest.h"
15 namespace extensions {
17 class PermissionsData;
18 class PermissionSet;
20 testing::AssertionResult VerifyHasPermissionMessage(
21 const PermissionsData* permissions_data,
22 const std::string& expected_message);
23 testing::AssertionResult VerifyHasPermissionMessage(
24 const PermissionsData* permissions_data,
25 const base::string16& expected_message);
26 testing::AssertionResult VerifyHasPermissionMessage(
27 const PermissionSet* permissions,
28 Manifest::Type extension_type,
29 const std::string& expected_message);
30 testing::AssertionResult VerifyHasPermissionMessage(
31 const PermissionSet* permissions,
32 Manifest::Type extension_type,
33 const base::string16& expected_message);
35 testing::AssertionResult VerifyNoPermissionMessages(
36 const PermissionsData* permissions_data);
38 testing::AssertionResult VerifyOnePermissionMessage(
39 const PermissionsData* permissions_data,
40 const std::string& expected_message);
41 testing::AssertionResult VerifyOnePermissionMessage(
42 const PermissionsData* permissions_data,
43 const base::string16& expected_message);
44 testing::AssertionResult VerifyOnePermissionMessage(
45 const PermissionSet* permissions,
46 Manifest::Type extension_type,
47 const base::string16& expected_message);
49 testing::AssertionResult VerifyOnePermissionMessageWithSubmessages(
50 const PermissionsData* permissions_data,
51 const std::string& expected_message,
52 const std::vector<std::string>& expected_submessages);
53 testing::AssertionResult VerifyOnePermissionMessageWithSubmessages(
54 const PermissionsData* permissions_data,
55 const base::string16& expected_message,
56 const std::vector<base::string16>& expected_submessages);
58 testing::AssertionResult VerifyTwoPermissionMessages(
59 const PermissionsData* permissions_data,
60 const std::string& expected_message_1,
61 const std::string& expected_message_2,
62 bool check_order);
63 testing::AssertionResult VerifyTwoPermissionMessages(
64 const PermissionsData* permissions_data,
65 const base::string16& expected_message_1,
66 const base::string16& expected_message_2,
67 bool check_order);
69 testing::AssertionResult VerifyPermissionMessages(
70 const PermissionsData* permissions_data,
71 const std::vector<std::string>& expected_messages,
72 bool check_order);
73 testing::AssertionResult VerifyPermissionMessages(
74 const PermissionsData* permissions_data,
75 const std::vector<base::string16>& expected_messages,
76 bool check_order);
78 testing::AssertionResult VerifyPermissionMessagesWithSubmessages(
79 const PermissionsData* permissions_data,
80 const std::vector<std::string>& expected_messages,
81 const std::vector<std::vector<std::string>>& expected_submessages,
82 bool check_order);
83 testing::AssertionResult VerifyPermissionMessagesWithSubmessages(
84 const PermissionsData* permissions_data,
85 const std::vector<base::string16>& expected_messages,
86 const std::vector<std::vector<base::string16>>& expected_submessages,
87 bool check_order);
89 } // namespace extensions
91 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_MESSAGE_TEST_UTIL_H_