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/webkit_support.h" | 5 #include "content/test/webkit_support.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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 net::android::RegisterNetworkLibrary(env); | 100 net::android::RegisterNetworkLibrary(env); |
101 #endif | 101 #endif |
102 | 102 |
103 #if defined(OS_MACOSX) | 103 #if defined(OS_MACOSX) |
104 mock_cr_app::RegisterMockCrApp(); | 104 mock_cr_app::RegisterMockCrApp(); |
105 #endif | 105 #endif |
106 | 106 |
107 // Explicitly initialize the GURL library before spawning any threads. | 107 // Explicitly initialize the GURL library before spawning any threads. |
108 // Otherwise crash may happend when different threads try to create a GURL | 108 // Otherwise crash may happend when different threads try to create a GURL |
109 // at same time. | 109 // at same time. |
110 url_util::Initialize(); | 110 url::Initialize(); |
111 test_environment = new TestEnvironment; | 111 test_environment = new TestEnvironment; |
112 } | 112 } |
113 | 113 |
114 void TearDownTestEnvironment() { | 114 void TearDownTestEnvironment() { |
115 // Flush any remaining messages before we kill ourselves. | 115 // Flush any remaining messages before we kill ourselves. |
116 // http://code.google.com/p/chromium/issues/detail?id=9500 | 116 // http://code.google.com/p/chromium/issues/detail?id=9500 |
117 base::RunLoop().RunUntilIdle(); | 117 base::RunLoop().RunUntilIdle(); |
118 | 118 |
119 if (RunningOnValgrind()) | 119 if (RunningOnValgrind()) |
120 blink::WebCache::clear(); | 120 blink::WebCache::clear(); |
121 delete test_environment; | 121 delete test_environment; |
122 test_environment = NULL; | 122 test_environment = NULL; |
123 } | 123 } |
124 | 124 |
125 } // namespace content | 125 } // namespace content |
OLD | NEW |