OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/blink_test_environment.h" | 5 #include "content/test/blink_test_environment.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 } | 75 } |
76 | 76 |
77 ~TestEnvironment() { | 77 ~TestEnvironment() { |
78 } | 78 } |
79 | 79 |
80 TestBlinkWebUnitTestSupport* blink_platform_impl() const { | 80 TestBlinkWebUnitTestSupport* blink_platform_impl() const { |
81 return blink_test_support_.get(); | 81 return blink_test_support_.get(); |
82 } | 82 } |
83 | 83 |
84 private: | 84 private: |
85 scoped_ptr<MessageLoopType> main_message_loop_; | 85 std::unique_ptr<MessageLoopType> main_message_loop_; |
86 scoped_ptr<TestBlinkWebUnitTestSupport> blink_test_support_; | 86 std::unique_ptr<TestBlinkWebUnitTestSupport> blink_test_support_; |
87 scoped_ptr<TestContentClientInitializer> content_initializer_; | 87 std::unique_ptr<TestContentClientInitializer> content_initializer_; |
88 base::TestDiscardableMemoryAllocator discardable_memory_allocator_; | 88 base::TestDiscardableMemoryAllocator discardable_memory_allocator_; |
89 }; | 89 }; |
90 | 90 |
91 TestEnvironment* test_environment; | 91 TestEnvironment* test_environment; |
92 | 92 |
93 } // namespace | 93 } // namespace |
94 | 94 |
95 void SetUpBlinkTestEnvironment() { | 95 void SetUpBlinkTestEnvironment() { |
96 ParseBlinkCommandLineArgumentsForUnitTests(); | 96 ParseBlinkCommandLineArgumentsForUnitTests(); |
97 | 97 |
(...skipping 25 matching lines...) Expand all Loading... |
123 // http://code.google.com/p/chromium/issues/detail?id=9500 | 123 // http://code.google.com/p/chromium/issues/detail?id=9500 |
124 base::RunLoop().RunUntilIdle(); | 124 base::RunLoop().RunUntilIdle(); |
125 | 125 |
126 if (RunningOnValgrind()) | 126 if (RunningOnValgrind()) |
127 blink::WebCache::clear(); | 127 blink::WebCache::clear(); |
128 delete test_environment; | 128 delete test_environment; |
129 test_environment = NULL; | 129 test_environment = NULL; |
130 } | 130 } |
131 | 131 |
132 } // namespace content | 132 } // namespace content |
OLD | NEW |