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

Unified Diff: content/common/user_agent_unittest.cc

Issue 186883002: Move user_agent code from webkit/ to content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: link chrome Created 6 years, 10 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: content/common/user_agent_unittest.cc
diff --git a/webkit/common/user_agent/user_agent_unittest.cc b/content/common/user_agent_unittest.cc
similarity index 81%
rename from webkit/common/user_agent/user_agent_unittest.cc
rename to content/common/user_agent_unittest.cc
index bed7652dc699143d4eed069cc5fddb89310ada74..4feb13419bd12df2bb5130dd9b14ebda8251dbde 100644
--- a/webkit/common/user_agent/user_agent_unittest.cc
+++ b/content/common/user_agent_unittest.cc
@@ -2,22 +2,24 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/common/user_agent/user_agent.h"
+#include "content/public/common/user_agent.h"
#include <string>
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
-namespace {
+namespace content {
-typedef testing::Test WebkitGlueUserAgentTest;
+namespace {
bool IsSpoofedUserAgent(const std::string& user_agent) {
return user_agent.find("TestContentClient") == std::string::npos;
}
-TEST_F(WebkitGlueUserAgentTest, UserAgentSpoofingHack) {
+} // namespace
+
+TEST(UserAgentTest, UserAgentSpoofingHack) {
enum Platform {
NONE = 0,
MACOSX = 1,
@@ -47,9 +49,8 @@ TEST_F(WebkitGlueUserAgentTest, UserAgentSpoofingHack) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(expected); ++i) {
EXPECT_EQ((expected[i].os_mask & os_bit) != 0,
- IsSpoofedUserAgent(
- webkit_glue::GetUserAgent(GURL(expected[i].url))));
+ IsSpoofedUserAgent(GetUserAgent(GURL(expected[i].url))));
}
}
-} // namespace
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698