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

Side by Side Diff: net/cookies/canonical_cookie_unittest.cc

Issue 10785017: Move CanonicalCookie into separate files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Prune some includes, fix a unit test Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "net/cookies/canonical_cookie.h"
6
7 #include "googleurl/src/gurl.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9
10 namespace net {
11
12 namespace {
13
14 TEST(CanonicalCookieTest, GetCookieSourceFromURL) {
15 EXPECT_EQ("http://example.com/",
16 CanonicalCookie::GetCookieSourceFromURL(
17 GURL("http://example.com")));
18 EXPECT_EQ("http://example.com/",
19 CanonicalCookie::GetCookieSourceFromURL(
20 GURL("http://example.com/")));
21 EXPECT_EQ("http://example.com/",
22 CanonicalCookie::GetCookieSourceFromURL(
23 GURL("http://example.com/test")));
24 EXPECT_EQ("file:///tmp/test.html",
25 CanonicalCookie::GetCookieSourceFromURL(
26 GURL("file:///tmp/test.html")));
27 EXPECT_EQ("http://example.com/",
28 CanonicalCookie::GetCookieSourceFromURL(
29 GURL("http://example.com:1234/")));
30 EXPECT_EQ("http://example.com/",
31 CanonicalCookie::GetCookieSourceFromURL(
32 GURL("https://example.com/")));
33 EXPECT_EQ("http://example.com/",
34 CanonicalCookie::GetCookieSourceFromURL(
35 GURL("http://user:pwd@example.com/")));
36 EXPECT_EQ("http://example.com/",
37 CanonicalCookie::GetCookieSourceFromURL(
38 GURL("http://example.com/test?foo")));
39 EXPECT_EQ("http://example.com/",
40 CanonicalCookie::GetCookieSourceFromURL(
41 GURL("http://example.com/test#foo")));
42 }
43
44 } // namespace
45 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698