summaryrefslogtreecommitdiffstats
path: root/content/test/test_content_client.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/test/test_content_client.cc')
-rw-r--r--content/test/test_content_client.cc20
1 files changed, 19 insertions, 1 deletions
diff --git a/content/test/test_content_client.cc b/content/test/test_content_client.cc
index e1d6d43..eeb1df3 100644
--- a/content/test/test_content_client.cc
+++ b/content/test/test_content_client.cc
@@ -4,10 +4,18 @@
#include "content/test/test_content_client.h"
+#include "base/base_paths.h"
+#include "base/file_path.h"
#include "base/logging.h"
+#include "base/path_service.h"
#include "base/string_piece.h"
TestContentClient::TestContentClient() {
+ FilePath content_resources_pack_path;
+ PathService::Get(base::DIR_MODULE, &content_resources_pack_path);
+ content_resources_pack_path = content_resources_pack_path.Append(
+ FILE_PATH_LITERAL("content_resources.pak"));
+ data_pack_.Load(content_resources_pack_path);
}
TestContentClient::~TestContentClient() {
@@ -45,7 +53,9 @@ string16 TestContentClient::GetLocalizedString(int message_id) const {
}
base::StringPiece TestContentClient::GetDataResource(int resource_id) const {
- return base::StringPiece();
+ base::StringPiece resource;
+ data_pack_.GetStringPiece(resource_id, &resource);
+ return resource;
}
#if defined(OS_WIN)
@@ -54,3 +64,11 @@ bool TestContentClient::SandboxPlugin(CommandLine* command_line,
return false;
}
#endif
+
+#if defined(OS_MACOSX)
+bool TestContentClient::GetSandboxProfileForSandboxType(
+ int sandbox_type,
+ int* sandbox_profile_resource_id) const {
+ return false;
+}
+#endif