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

Side by Side Diff: chrome/browser/browsing_data_cookie_helper_unittest.cc

Issue 7355025: Creat BrowsingDataCookieHelper and CannedBrowsingDataCookieHelper for logging cookies at UI thread. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 "chrome/browser/browsing_data_cookie_helper.h"
6
7 #include "chrome/test/testing_browser_process_test.h"
8 #include "chrome/test/testing_profile.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10
11 namespace {
12
13 typedef TestingBrowserProcessTest CannedBrowsingDataCookieTest;
14
15 TEST_F(CannedBrowsingDataCookieTest, Empty) {
16 TestingProfile profile;
17
18 const GURL url_google("http://www.google.izzle");
19
20 scoped_refptr<CannedBrowsingDataCookieHelper> helper(
21 new CannedBrowsingDataCookieHelper(&profile));
22
23 ASSERT_TRUE(helper->empty());
24 helper->AddChangeCookie(url_google, "a=1",
25 net::CookieOptions());
26 ASSERT_FALSE(helper->empty());
27 net::CookieList cookies = helper->cookie_list();
28 helper->Reset();
29 ASSERT_TRUE(helper->empty());
30
31 helper->AddReadCookie(url_google, cookies);
32 ASSERT_FALSE(helper->empty());
33 helper->Reset();
34 ASSERT_TRUE(helper->empty());
35 }
36
37 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698