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 "content/public/test/mock_resource_context.h"
7 #include "net/url_request/url_request_context.h"
11 MockResourceContext::MockResourceContext()
12 : test_request_context_(NULL
) {
15 MockResourceContext::MockResourceContext(
16 net::URLRequestContext
* test_request_context
)
17 : test_request_context_(test_request_context
),
19 camera_allowed_(false) {
22 MockResourceContext::~MockResourceContext() {}
24 net::HostResolver
* MockResourceContext::GetHostResolver() {
28 net::URLRequestContext
* MockResourceContext::GetRequestContext() {
29 CHECK(test_request_context_
);
30 return test_request_context_
;
33 bool MockResourceContext::AllowMicAccess(const GURL
& origin
) {
37 bool MockResourceContext::AllowCameraAccess(const GURL
& origin
) {
38 return camera_allowed_
;
41 } // namespace content