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 17 matching lines...) Expand all Loading... |
28 #include "third_party/WebKit/public/web/WebDatabase.h" | 28 #include "third_party/WebKit/public/web/WebDatabase.h" |
29 #include "third_party/WebKit/public/web/WebKit.h" | 29 #include "third_party/WebKit/public/web/WebKit.h" |
30 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 30 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
31 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" | 31 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" |
32 #include "third_party/WebKit/public/web/WebStorageEventDispatcher.h" | 32 #include "third_party/WebKit/public/web/WebStorageEventDispatcher.h" |
33 #include "v8/include/v8.h" | 33 #include "v8/include/v8.h" |
34 #include "webkit/browser/database/vfs_backend.h" | 34 #include "webkit/browser/database/vfs_backend.h" |
35 | 35 |
36 #if defined(OS_MACOSX) | 36 #if defined(OS_MACOSX) |
37 #include "base/mac/mac_util.h" | 37 #include "base/mac/mac_util.h" |
| 38 #include "base/mac/scoped_nsautorelease_pool.h" |
38 #endif | 39 #endif |
39 | 40 |
40 namespace content { | 41 namespace content { |
41 | 42 |
42 TestWebKitPlatformSupport::TestWebKitPlatformSupport() { | 43 TestWebKitPlatformSupport::TestWebKitPlatformSupport() { |
| 44 #if defined(OS_MACOSX) |
| 45 base::mac::ScopedNSAutoreleasePool autorelease_pool; |
| 46 #endif |
| 47 |
43 url_loader_factory_.reset(new WebURLLoaderMockFactory()); | 48 url_loader_factory_.reset(new WebURLLoaderMockFactory()); |
44 mock_clipboard_.reset(new MockWebClipboardImpl()); | 49 mock_clipboard_.reset(new MockWebClipboardImpl()); |
45 | 50 |
46 // Create an anonymous stats table since we don't need to share between | 51 // Create an anonymous stats table since we don't need to share between |
47 // processes. | 52 // processes. |
48 stats_table_.reset( | 53 stats_table_.reset( |
49 new base::StatsTable(base::StatsTable::TableIdentifier(), 20, 200)); | 54 new base::StatsTable(base::StatsTable::TableIdentifier(), 20, 200)); |
50 base::StatsTable::set_current(stats_table_.get()); | 55 base::StatsTable::set_current(stats_table_.get()); |
51 | 56 |
52 blink::initialize(this); | 57 blink::initialize(this); |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 const blink::WebString& path) { | 290 const blink::WebString& path) { |
286 base::FilePath file_path = base::FilePath::FromUTF16Unsafe(path); | 291 base::FilePath file_path = base::FilePath::FromUTF16Unsafe(path); |
287 | 292 |
288 std::string buffer; | 293 std::string buffer; |
289 base::ReadFileToString(file_path, &buffer); | 294 base::ReadFileToString(file_path, &buffer); |
290 | 295 |
291 return blink::WebData(buffer.data(), buffer.size()); | 296 return blink::WebData(buffer.data(), buffer.size()); |
292 } | 297 } |
293 | 298 |
294 } // namespace content | 299 } // namespace content |
OLD | NEW |