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

Unified Diff: chrome_frame/test/html_util_unittests.cc

Issue 7922023: Remove webkit_glue::BuildUserAgent(), remove windows spoofing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix GetUserAgent() to return whether the user agent is overriding, clean up Created 9 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
Index: chrome_frame/test/html_util_unittests.cc
diff --git a/chrome_frame/test/html_util_unittests.cc b/chrome_frame/test/html_util_unittests.cc
index 9d591066e603a8af5d7fac20b7fd232acd4a8fa3..dcc1dba83733187e46aa6b8b673e1704155faa78 100644
--- a/chrome_frame/test/html_util_unittests.cc
+++ b/chrome_frame/test/html_util_unittests.cc
@@ -24,7 +24,6 @@
#include "chrome_frame/chrome_frame_delegate.h"
#include "chrome_frame/html_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/glue/webkit_glue.h"
const char kChromeFrameUserAgent[] = "chromeframe";
@@ -403,9 +402,11 @@ TEST_F(HtmlUtilUnittest, GetDefaultUserAgentHeaderWithCFTag) {
}
TEST_F(HtmlUtilUnittest, GetChromeUserAgent) {
+ bool overriding;
std::string chrome_ua;
- chrome_ua = webkit_glue::BuildUserAgent(false);
+ chrome_ua = content::GetContentClient()->GetUserAgent(&overriding);
Evan Martin 2011/09/21 20:27:24 Is it guaranteed that there's a ContentClient here
Dirk Pranke 2011/09/21 21:02:35 Nope :) In fact, this crashes. I will post a fix.
jam 2011/09/21 21:27:36 to be honest, this seems like not a very useful te
Dirk Pranke 2011/09/21 22:19:59 I agree, but I'm not gonna delete it in this chang
EXPECT_FALSE(chrome_ua.empty());
+ EXPECT_FALSE(overriding);
const char* ua = http_utils::GetChromeUserAgent();
EXPECT_EQ(0, chrome_ua.compare(ua));
Evan Martin 2011/09/21 20:27:24 EXPECT_EQ(ua, chrome_ua) ?
Dirk Pranke 2011/09/21 21:02:35 Will fix.
}

Powered by Google App Engine
This is Rietveld 408576698