blob: 41fc78fb4a30da32109e91466a0abd6a0babd32e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
// Copyright (c) 2012 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 "content/test/test_browser_context.h"
#include "base/file_path.h"
#include "content/browser/in_process_webkit/webkit_context.h"
#include "content/browser/mock_resource_context.h"
#include "testing/gtest/include/gtest/gtest.h"
using content::DownloadManager;
using content::HostZoomMap;
TestBrowserContext::TestBrowserContext() {
EXPECT_TRUE(browser_context_dir_.CreateUniqueTempDir());
}
TestBrowserContext::~TestBrowserContext() {
}
FilePath TestBrowserContext::GetPath() {
return browser_context_dir_.path();
}
bool TestBrowserContext::IsOffTheRecord() {
return false;
}
SSLHostState* TestBrowserContext::GetSSLHostState() {
return NULL;
}
DownloadManager* TestBrowserContext::GetDownloadManager() {
return NULL;
}
net::URLRequestContextGetter* TestBrowserContext::GetRequestContext() {
return NULL;
}
net::URLRequestContextGetter*
TestBrowserContext::GetRequestContextForRenderProcess(int renderer_child_id) {
return NULL;
}
net::URLRequestContextGetter* TestBrowserContext::GetRequestContextForMedia() {
return NULL;
}
content::ResourceContext* TestBrowserContext::GetResourceContext() {
// TODO(phajdan.jr): Get rid of this nasty global.
return content::MockResourceContext::GetInstance();
}
HostZoomMap* TestBrowserContext::GetHostZoomMap() {
return NULL;
}
content::GeolocationPermissionContext*
TestBrowserContext::GetGeolocationPermissionContext() {
return NULL;
}
content::SpeechInputPreferences*
TestBrowserContext::GetSpeechInputPreferences() {
return NULL;
}
bool TestBrowserContext::DidLastSessionExitCleanly() {
return true;
}
quota::QuotaManager* TestBrowserContext::GetQuotaManager() {
return NULL;
}
WebKitContext* TestBrowserContext::GetWebKitContext() {
if (webkit_context_ == NULL) {
webkit_context_ = new WebKitContext(
IsOffTheRecord(), GetPath(),
NULL, false, NULL, NULL);
}
return webkit_context_;
}
webkit_database::DatabaseTracker* TestBrowserContext::GetDatabaseTracker() {
return NULL;
}
ChromeBlobStorageContext* TestBrowserContext::GetBlobStorageContext() {
return NULL;
}
ChromeAppCacheService* TestBrowserContext::GetAppCacheService() {
return NULL;
}
fileapi::FileSystemContext* TestBrowserContext::GetFileSystemContext() {
return NULL;
}
|