OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/test/test_webkit_platform_support.h" | 5 #include "content/test/test_webkit_platform_support.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 #if defined(OS_MACOSX) | 73 #if defined(OS_MACOSX) |
74 if (base::mac::AmIBundled()) | 74 if (base::mac::AmIBundled()) |
75 module_path = module_path.DirName().DirName().DirName(); | 75 module_path = module_path.DirName().DirName().DirName(); |
76 #endif | 76 #endif |
77 if (media::InitializeMediaLibrary(module_path)) | 77 if (media::InitializeMediaLibrary(module_path)) |
78 enable_media = true; | 78 enable_media = true; |
79 } | 79 } |
80 blink::WebRuntimeFeatures::enableMediaPlayer(enable_media); | 80 blink::WebRuntimeFeatures::enableMediaPlayer(enable_media); |
81 LOG_IF(WARNING, !enable_media) << "Failed to initialize the media library.\n"; | 81 LOG_IF(WARNING, !enable_media) << "Failed to initialize the media library.\n"; |
82 | 82 |
83 // TODO(joth): Make a dummy geolocation service implemenation for | |
84 // test_shell, and set this to true. http://crbug.com/36451 | |
85 blink::WebRuntimeFeatures::enableGeolocation(false); | |
86 | |
87 file_utilities_.set_sandbox_enabled(false); | 83 file_utilities_.set_sandbox_enabled(false); |
88 | 84 |
89 if (!file_system_root_.CreateUniqueTempDir()) { | 85 if (!file_system_root_.CreateUniqueTempDir()) { |
90 LOG(WARNING) << "Failed to create a temp dir for the filesystem." | 86 LOG(WARNING) << "Failed to create a temp dir for the filesystem." |
91 "FileSystem feature will be disabled."; | 87 "FileSystem feature will be disabled."; |
92 DCHECK(file_system_root_.path().empty()); | 88 DCHECK(file_system_root_.path().empty()); |
93 } | 89 } |
94 | 90 |
95 #if defined(OS_WIN) | 91 #if defined(OS_WIN) |
96 // Ensure we pick up the default theme engine. | 92 // Ensure we pick up the default theme engine. |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 const blink::WebString& path) { | 311 const blink::WebString& path) { |
316 base::FilePath file_path = base::FilePath::FromUTF16Unsafe(path); | 312 base::FilePath file_path = base::FilePath::FromUTF16Unsafe(path); |
317 | 313 |
318 std::string buffer; | 314 std::string buffer; |
319 base::ReadFileToString(file_path, &buffer); | 315 base::ReadFileToString(file_path, &buffer); |
320 | 316 |
321 return blink::WebData(buffer.data(), buffer.size()); | 317 return blink::WebData(buffer.data(), buffer.size()); |
322 } | 318 } |
323 | 319 |
324 } // namespace content | 320 } // namespace content |
OLD | NEW |