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

Unified Diff: content/test/browser_test_base.cc

Issue 8402016: set user agent for content browser tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/browser_test_base.cc
diff --git a/content/test/browser_test_base.cc b/content/test/browser_test_base.cc
index 57ca1428c3bfc3a386fac1d1ad08fa127d166f7e..d8438342c8cef6ad1167362d3123c6d618055ccc 100644
--- a/content/test/browser_test_base.cc
+++ b/content/test/browser_test_base.cc
@@ -8,6 +8,8 @@
#include "base/task.h"
#include "content/common/main_function_params.h"
#include "sandbox/src/dep.h"
+#include "webkit/glue/user_agent.h"
+#include "webkit/glue/webkit_glue.h"
#if defined(OS_MACOSX)
#include "base/mac/mac_util.h"
@@ -34,6 +36,9 @@ void BrowserTestBase::SetUp() {
params.ui_task =
NewRunnableMethod(this, &BrowserTestBase::ProxyRunTestOnMainThreadLoop);
+ std::string product("Chrome/15.16.17.18");
Paweł Hajdan Jr. 2011/10/27 08:48:52 Why not 0.0.0.0 as for DRT? Chrome/15 might sugges
+ webkit_glue::SetUserAgent(webkit_glue::BuildUserAgentFromProduct(product),
Paweł Hajdan Jr. 2011/10/27 08:48:52 I don't like it anyway. We're calling BrowserMain,
+ false);
SetUpInProcessBrowserTestFixture();
BrowserMain(params);
TearDownInProcessBrowserTestFixture();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698