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

Side by Side Diff: extensions/test/test_extensions_client.cc

Issue 399363002: Add support for writing unit tests for Mojo-backed apps/extensions APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 5 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 "extensions/test/test_extensions_client.h" 5 #include "extensions/test/test_extensions_client.h"
6 6
7 #include "extensions/common/api/generated_schemas.h"
7 #include "extensions/common/common_manifest_handlers.h" 8 #include "extensions/common/common_manifest_handlers.h"
8 #include "extensions/common/features/feature_provider.h" 9 #include "extensions/common/features/feature_provider.h"
9 #include "extensions/common/features/json_feature_provider_source.h" 10 #include "extensions/common/features/json_feature_provider_source.h"
10 #include "extensions/common/manifest_handler.h" 11 #include "extensions/common/manifest_handler.h"
11 #include "extensions/common/url_pattern_set.h" 12 #include "extensions/common/url_pattern_set.h"
12 #include "extensions/test/test_permission_message_provider.h" 13 #include "extensions/test/test_permission_message_provider.h"
13 14
14 namespace extensions { 15 namespace extensions {
15 16
16 TestExtensionsClient::TestExtensionsClient() { 17 TestExtensionsClient::TestExtensionsClient() {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 return hosts; 71 return hosts;
71 } 72 }
72 73
73 bool TestExtensionsClient::IsScriptableURL(const GURL& url, 74 bool TestExtensionsClient::IsScriptableURL(const GURL& url,
74 std::string* error) const { 75 std::string* error) const {
75 return true; 76 return true;
76 } 77 }
77 78
78 bool TestExtensionsClient::IsAPISchemaGenerated( 79 bool TestExtensionsClient::IsAPISchemaGenerated(
79 const std::string& name) const { 80 const std::string& name) const {
80 return false; 81 return core_api::GeneratedSchemas::IsGenerated(name);
81 } 82 }
82 83
83 base::StringPiece TestExtensionsClient::GetAPISchema( 84 base::StringPiece TestExtensionsClient::GetAPISchema(
84 const std::string& name) const { 85 const std::string& name) const {
85 return base::StringPiece(); 86 return core_api::GeneratedSchemas::Get(name);
86 } 87 }
87 88
88 void TestExtensionsClient::RegisterAPISchemaResources(ExtensionAPI* api) const { 89 void TestExtensionsClient::RegisterAPISchemaResources(ExtensionAPI* api) const {
89 } 90 }
90 91
91 bool TestExtensionsClient::ShouldSuppressFatalErrors() const { 92 bool TestExtensionsClient::ShouldSuppressFatalErrors() const {
92 return true; 93 return true;
93 } 94 }
94 95
95 } // namespace extensions 96 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698