1 // Copyright (c) 2012 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 #include "chrome/common/extensions/manifest_tests/chrome_manifest_test.h"
6 #include "extensions/common/manifest_constants.h"
7 #include "extensions/common/manifest_url_handlers.h"
8 #include "testing/gtest/include/gtest/gtest.h"
10 using extensions::Extension
;
12 namespace errors
= extensions::manifest_errors
;
14 class UpdateURLManifestTest
: public ChromeManifestTest
{
17 TEST_F(UpdateURLManifestTest
, UpdateUrls
) {
18 // Test several valid update urls
19 Testcase testcases
[] = {
20 Testcase("update_url_valid_1.json", extensions::Manifest::INTERNAL
,
22 Testcase("update_url_valid_2.json", extensions::Manifest::INTERNAL
,
24 Testcase("update_url_valid_3.json", extensions::Manifest::INTERNAL
,
26 Testcase("update_url_valid_4.json", extensions::Manifest::INTERNAL
,
29 RunTestcases(testcases
, arraysize(testcases
),
32 // Test some invalid update urls
33 Testcase testcases2
[] = {
34 Testcase("update_url_invalid_1.json", errors::kInvalidUpdateURL
,
35 extensions::Manifest::INTERNAL
, Extension::NO_FLAGS
),
36 Testcase("update_url_invalid_2.json", errors::kInvalidUpdateURL
,
37 extensions::Manifest::INTERNAL
, Extension::NO_FLAGS
),
38 Testcase("update_url_invalid_3.json", errors::kInvalidUpdateURL
,
39 extensions::Manifest::INTERNAL
, Extension::NO_FLAGS
)
41 RunTestcases(testcases2
, arraysize(testcases2
),