Chromium Code Reviews| 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_blink_web_unit_test_support.h" | 5 #include "content/test/test_blink_web_unit_test_support.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
|
erikwright (departed)
2015/03/30 14:22:30
remove?
| |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| 11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "content/public/common/content_switches.h" | 13 #include "content/public/common/content_switches.h" |
|
erikwright (departed)
2015/03/30 14:22:30
remove?
| |
| 14 #include "content/renderer/scheduler/renderer_scheduler.h" | 14 #include "content/renderer/scheduler/renderer_scheduler.h" |
| 15 #include "content/renderer/scheduler/web_scheduler_impl.h" | 15 #include "content/renderer/scheduler/web_scheduler_impl.h" |
| 16 #include "content/renderer/scheduler/webthread_impl_for_scheduler.h" | 16 #include "content/renderer/scheduler/webthread_impl_for_scheduler.h" |
| 17 #include "content/test/mock_webclipboard_impl.h" | 17 #include "content/test/mock_webclipboard_impl.h" |
| 18 #include "content/test/web_gesture_curve_mock.h" | 18 #include "content/test/web_gesture_curve_mock.h" |
| 19 #include "content/test/web_layer_tree_view_impl_for_testing.h" | 19 #include "content/test/web_layer_tree_view_impl_for_testing.h" |
| 20 #include "content/test/weburl_loader_mock_factory.h" | 20 #include "content/test/weburl_loader_mock_factory.h" |
| 21 #include "media/base/media.h" | 21 #include "media/base/media.h" |
| 22 #include "net/cookies/cookie_monster.h" | 22 #include "net/cookies/cookie_monster.h" |
| 23 #include "net/test/spawned_test_server/spawned_test_server.h" | 23 #include "net/test/spawned_test_server/spawned_test_server.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 99 LOG(WARNING) << "Failed to create a temp dir for the filesystem." | 99 LOG(WARNING) << "Failed to create a temp dir for the filesystem." |
| 100 "FileSystem feature will be disabled."; | 100 "FileSystem feature will be disabled."; |
| 101 DCHECK(file_system_root_.path().empty()); | 101 DCHECK(file_system_root_.path().empty()); |
| 102 } | 102 } |
| 103 | 103 |
| 104 #if defined(OS_WIN) | 104 #if defined(OS_WIN) |
| 105 // Ensure we pick up the default theme engine. | 105 // Ensure we pick up the default theme engine. |
| 106 SetThemeEngine(NULL); | 106 SetThemeEngine(NULL); |
| 107 #endif | 107 #endif |
| 108 | 108 |
| 109 base::CommandLine::ForCurrentProcess()->AppendSwitch( | |
| 110 switches::kEnableFileCookies); | |
| 111 | |
| 112 // Test shell always exposes the GC. | 109 // Test shell always exposes the GC. |
| 113 std::string flags("--expose-gc"); | 110 std::string flags("--expose-gc"); |
| 114 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); | 111 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); |
| 115 } | 112 } |
| 116 | 113 |
| 117 TestBlinkWebUnitTestSupport::~TestBlinkWebUnitTestSupport() { | 114 TestBlinkWebUnitTestSupport::~TestBlinkWebUnitTestSupport() { |
| 118 url_loader_factory_.reset(); | 115 url_loader_factory_.reset(); |
| 119 mock_clipboard_.reset(); | 116 mock_clipboard_.reset(); |
| 120 blink::shutdown(); | 117 blink::shutdown(); |
| 121 } | 118 } |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 321 return web_scheduler_.get(); | 318 return web_scheduler_.get(); |
| 322 } | 319 } |
| 323 | 320 |
| 324 blink::WebThread* TestBlinkWebUnitTestSupport::currentThread() { | 321 blink::WebThread* TestBlinkWebUnitTestSupport::currentThread() { |
| 325 if (web_thread_ && web_thread_->isCurrentThread()) | 322 if (web_thread_ && web_thread_->isCurrentThread()) |
| 326 return web_thread_.get(); | 323 return web_thread_.get(); |
| 327 return BlinkPlatformImpl::currentThread(); | 324 return BlinkPlatformImpl::currentThread(); |
| 328 } | 325 } |
| 329 | 326 |
| 330 } // namespace content | 327 } // namespace content |
| OLD | NEW |