Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / common / extensions / manifest_tests / extension_manifests_update_unittest.cc
blob0f0150247bd4d8f2715cef837e2a38a33c265c1a
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/extension_manifest_test.h"
6 #include "chrome/common/extensions/manifest_url_handler.h"
7 #include "extensions/common/manifest_constants.h"
8 #include "testing/gtest/include/gtest/gtest.h"
10 using extensions::Extension;
12 namespace errors = extensions::manifest_errors;
14 class UpdateURLManifestTest : public ExtensionManifestTest {
17 TEST_F(UpdateURLManifestTest, UpdateUrls) {
18 // Test several valid update urls
19 Testcase testcases[] = {
20 Testcase("update_url_valid_1.json", extensions::Manifest::INTERNAL,
21 Extension::NO_FLAGS),
22 Testcase("update_url_valid_2.json", extensions::Manifest::INTERNAL,
23 Extension::NO_FLAGS),
24 Testcase("update_url_valid_3.json", extensions::Manifest::INTERNAL,
25 Extension::NO_FLAGS),
26 Testcase("update_url_valid_4.json", extensions::Manifest::INTERNAL,
27 Extension::NO_FLAGS)
29 RunTestcases(testcases, arraysize(testcases),
30 EXPECT_TYPE_SUCCESS);
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),
42 EXPECT_TYPE_ERROR);