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

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: Diff 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 <time.h>
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/bind.h"
12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/message_loop.h"
15 #include "base/metrics/histogram.h"
16 #include "base/stringprintf.h"
17 #include "base/string_tokenizer.h"
18 #include "base/threading/thread.h"
19 #include "base/time.h"
20 #include "net/cookies/cookie_monster.h"
21 #include "net/cookies/cookie_monster_store_test.h" // For CookieStore mock
22 #include "net/cookies/cookie_util.h"
23 #include "net/cookies/parsed_cookie.h"
24 #include "testing/gmock/include/gmock/gmock.h"*/
25
26
27 #include "googleurl/src/gurl.h"
28 #include "testing/gtest/include/gtest/gtest.h"
29
30 namespace net {
31
32 namespace {
erikwright (departed) 2012/07/16 21:13:20 remove the anonymous namespace.
battre 2012/07/17 15:01:54 Done.
33
34 TEST(CanonicalCookieTest, GetCookieSourceFromURL) {
35 EXPECT_EQ("http://example.com/",
36 CanonicalCookie::GetCookieSourceFromURL(
37 GURL("http://example.com")));
38 EXPECT_EQ("http://example.com/",
39 CanonicalCookie::GetCookieSourceFromURL(
40 GURL("http://example.com/")));
41 EXPECT_EQ("http://example.com/",
42 CanonicalCookie::GetCookieSourceFromURL(
43 GURL("http://example.com/test")));
44 EXPECT_EQ("file:///tmp/test.html",
45 CanonicalCookie::GetCookieSourceFromURL(
46 GURL("file:///tmp/test.html")));
47 EXPECT_EQ("http://example.com/",
48 CanonicalCookie::GetCookieSourceFromURL(
49 GURL("http://example.com:1234/")));
50 EXPECT_EQ("http://example.com/",
51 CanonicalCookie::GetCookieSourceFromURL(
52 GURL("https://example.com/")));
53 EXPECT_EQ("http://example.com/",
54 CanonicalCookie::GetCookieSourceFromURL(
55 GURL("http://user:pwd@example.com/")));
56 EXPECT_EQ("http://example.com/",
57 CanonicalCookie::GetCookieSourceFromURL(
58 GURL("http://example.com/test?foo")));
59 EXPECT_EQ("http://example.com/",
60 CanonicalCookie::GetCookieSourceFromURL(
61 GURL("http://example.com/test#foo")));
62 }
63
64 } // namespace
65 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698