Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Side by Side Diff: content/test/webkit_support.cc

Issue 178263007: Simplify the user agent overriding code, in preparation for moving it out of src/webkit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: update Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/public/common/content_client.cc ('k') | webkit/common/user_agent/user_agent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 #if defined(OS_MACOSX) 104 #if defined(OS_MACOSX)
105 mock_cr_app::RegisterMockCrApp(); 105 mock_cr_app::RegisterMockCrApp();
106 #endif 106 #endif
107 107
108 // Explicitly initialize the GURL library before spawning any threads. 108 // Explicitly initialize the GURL library before spawning any threads.
109 // Otherwise crash may happend when different threads try to create a GURL 109 // Otherwise crash may happend when different threads try to create a GURL
110 // at same time. 110 // at same time.
111 url_util::Initialize(); 111 url_util::Initialize();
112 test_environment = new TestEnvironment; 112 test_environment = new TestEnvironment;
113 webkit_glue::SetUserAgent(webkit_glue::BuildUserAgentFromProduct( 113 webkit_glue::SetUserAgent(webkit_glue::BuildUserAgentFromProduct(
114 "DumpRenderTree/0.0.0.0"), false); 114 "DumpRenderTree/0.0.0.0"));
115 } 115 }
116 116
117 void TearDownTestEnvironment() { 117 void TearDownTestEnvironment() {
118 // Flush any remaining messages before we kill ourselves. 118 // Flush any remaining messages before we kill ourselves.
119 // http://code.google.com/p/chromium/issues/detail?id=9500 119 // http://code.google.com/p/chromium/issues/detail?id=9500
120 base::RunLoop().RunUntilIdle(); 120 base::RunLoop().RunUntilIdle();
121 121
122 if (RunningOnValgrind()) 122 if (RunningOnValgrind())
123 blink::WebCache::clear(); 123 blink::WebCache::clear();
124 delete test_environment; 124 delete test_environment;
125 test_environment = NULL; 125 test_environment = NULL;
126 } 126 }
127 127
128 } // namespace content 128 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_client.cc ('k') | webkit/common/user_agent/user_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698