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

Unified Diff: webkit/glue/cpp_bound_class_unittest.cc

Issue 10938008: Initialize user agent name to avoid assertion failures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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: webkit/glue/cpp_bound_class_unittest.cc
diff --git a/webkit/glue/cpp_bound_class_unittest.cc b/webkit/glue/cpp_bound_class_unittest.cc
index e8d146602d4640485fd0a4343b33b5ea41d96035..87fda3389ba722461e8f0fd9f5b9d1ece2b3147b 100644
--- a/webkit/glue/cpp_bound_class_unittest.cc
+++ b/webkit/glue/cpp_bound_class_unittest.cc
@@ -27,6 +27,8 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
#include "webkit/glue/cpp_binding_example.h"
#include "webkit/glue/webkit_glue.h"
+#include "webkit/user_agent/user_agent.h"
+#include "webkit/user_agent/user_agent_util.h"
using WebKit::WebFrame;
using WebKit::WebView;
@@ -89,6 +91,9 @@ class CppBoundClassTest : public testing::Test, public WebKit::WebFrameClient {
CppBoundClassTest() : webview_(NULL) { }
virtual void SetUp() OVERRIDE {
+ webkit_glue::SetUserAgent(webkit_glue::BuildUserAgentFromProduct(
+ "TestShell/0.0.0.0"), false);
+
webview_ = WebView::create(&webview_client_);
webview_->settings()->setJavaScriptEnabled(true);
webview_->initializeMainFrame(&webframe_client_);
« 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