Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(655)

Side by Side Diff: extensions/common/manifest_handlers/externally_connectable_unittest.cc

Issue 565423003: Move extensions manifest tests to run in extensions_unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (manifest2) fix deps, android Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 6
7 #include "chrome/common/extensions/manifest_tests/chrome_manifest_test.h"
8 #include "extensions/common/error_utils.h" 7 #include "extensions/common/error_utils.h"
9 #include "extensions/common/manifest_constants.h" 8 #include "extensions/common/manifest_constants.h"
10 #include "extensions/common/manifest_handlers/externally_connectable.h" 9 #include "extensions/common/manifest_handlers/externally_connectable.h"
10 #include "extensions/common/manifest_test.h"
11 #include "extensions/common/permissions/permissions_data.h" 11 #include "extensions/common/permissions/permissions_data.h"
12 #include "testing/gmock/include/gmock/gmock.h" 12 #include "testing/gmock/include/gmock/gmock.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 using testing::ElementsAre; 15 using testing::ElementsAre;
16 16
17 namespace extensions { 17 namespace extensions {
18 18
19 namespace errors = externally_connectable_errors; 19 namespace errors = externally_connectable_errors;
20 20
21 // TODO(jamescook): Convert from ChromeManifestTest to ManifestTest. 21 class ExternallyConnectableTest : public ManifestTest {
22 class ExternallyConnectableTest : public ChromeManifestTest {
23 public: 22 public:
24 ExternallyConnectableTest() {} 23 ExternallyConnectableTest() {}
25 virtual ~ExternallyConnectableTest() {} 24 virtual ~ExternallyConnectableTest() {}
26 25
27 protected: 26 protected:
28 ExternallyConnectableInfo* GetExternallyConnectableInfo( 27 ExternallyConnectableInfo* GetExternallyConnectableInfo(
29 scoped_refptr<Extension> extension) { 28 scoped_refptr<Extension> extension) {
30 return static_cast<ExternallyConnectableInfo*>( 29 return static_cast<ExternallyConnectableInfo*>(
31 extension->GetManifestData(manifest_keys::kExternallyConnectable)); 30 extension->GetManifestData(manifest_keys::kExternallyConnectable));
32 } 31 }
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 EXPECT_TRUE(info->matches.MatchesURL(GURL("https://example.com"))); 309 EXPECT_TRUE(info->matches.MatchesURL(GURL("https://example.com")));
311 EXPECT_TRUE(info->matches.MatchesURL(GURL("http://build.chromium.org"))); 310 EXPECT_TRUE(info->matches.MatchesURL(GURL("http://build.chromium.org")));
312 } 311 }
313 312
314 TEST_F(ExternallyConnectableTest, WarningNothingSpecified) { 313 TEST_F(ExternallyConnectableTest, WarningNothingSpecified) {
315 LoadAndExpectWarning("externally_connectable_nothing_specified.json", 314 LoadAndExpectWarning("externally_connectable_nothing_specified.json",
316 errors::kErrorNothingSpecified); 315 errors::kErrorNothingSpecified);
317 } 316 }
318 317
319 } // namespace extensions 318 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/common_manifest_handlers.cc ('k') | extensions/common/manifest_handlers/file_handler_manifest_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698