blob: ef0cd0d3c62ff69d6221d22853b6f5706afcae7b (
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) 2013 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 "chrome/common/extensions/manifest_tests/extension_manifest_test.h"
#include "extensions/common/extension.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace extensions {
class ExcludeMatchesManifestTest : public ExtensionManifestTest {
};
TEST_F(ExcludeMatchesManifestTest, ExcludeMatchPatterns) {
Testcase testcases[] = {
Testcase("exclude_matches.json"),
Testcase("exclude_matches_empty.json")
};
RunTestcases(testcases, arraysize(testcases),
EXPECT_TYPE_SUCCESS);
Testcase testcases2[] = {
Testcase("exclude_matches_not_list.json",
"Invalid value for 'content_scripts[0].exclude_matches'."),
Testcase("exclude_matches_invalid_host.json",
"Invalid value for 'content_scripts[0].exclude_matches[0]': "
"Invalid host wildcard.")
};
RunTestcases(testcases2, arraysize(testcases2),
EXPECT_TYPE_ERROR);
}
} // namespace extensions
|