root/chrome/common/extensions/manifest_handlers/exclude_matches_manifest_unittest.cc

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. TEST_F

// 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

/* [<][>][^][v][top][bottom][index][help] */