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

Unified Diff: content/common/referrer_unittest.cc

Issue 8635017: Add a referrer class to be used in the browser process whenever passing around referrsr (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 1 month 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 | content/content_common.gypi » ('j') | content/public/common/referrer.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/referrer_unittest.cc
diff --git a/content/common/referrer_unittest.cc b/content/common/referrer_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f8c2c851a415703c4a051752293d5beb954ddf63
--- /dev/null
+++ b/content/common/referrer_unittest.cc
@@ -0,0 +1,23 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+#include "content/public/common/referrer.h"
+
+namespace {
+
+const char* kTestURL = "http://google.com/";
+
+// Check that copying Referrer objects works.
+TEST(ReferrerTest, Copy) {
+ content::Referrer r1(GURL(kTestURL), WebKit::WebReferrerPolicyAlways);
+ content::Referrer r2;
+
+ r2 = r1;
+ EXPECT_EQ(GURL(kTestURL), r2.url);
+ EXPECT_EQ(WebKit::WebReferrerPolicyAlways, r2.policy);
+}
+
+} // namespace
« no previous file with comments | « no previous file | content/content_common.gypi » ('j') | content/public/common/referrer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698