| Index: chrome/browser/browsing_data_cookie_helper_unittest.cc
|
| ===================================================================
|
| --- chrome/browser/browsing_data_cookie_helper_unittest.cc (revision 0)
|
| +++ chrome/browser/browsing_data_cookie_helper_unittest.cc (revision 0)
|
| @@ -0,0 +1,37 @@
|
| +// Copyright (c) 2010 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 "chrome/browser/browsing_data_cookie_helper.h"
|
| +
|
| +#include "chrome/test/testing_browser_process_test.h"
|
| +#include "chrome/test/testing_profile.h"
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +
|
| +namespace {
|
| +
|
| +typedef TestingBrowserProcessTest CannedBrowsingDataCookieTest;
|
| +
|
| +TEST_F(CannedBrowsingDataCookieTest, Empty) {
|
| + TestingProfile profile;
|
| +
|
| + const GURL url_google("http://www.google.izzle");
|
| +
|
| + scoped_refptr<CannedBrowsingDataCookieHelper> helper(
|
| + new CannedBrowsingDataCookieHelper(&profile));
|
| +
|
| + ASSERT_TRUE(helper->empty());
|
| + helper->AddChangeCookie(url_google, "a=1",
|
| + net::CookieOptions());
|
| + ASSERT_FALSE(helper->empty());
|
| + net::CookieList cookies = helper->cookie_list();
|
| + helper->Reset();
|
| + ASSERT_TRUE(helper->empty());
|
| +
|
| + helper->AddReadCookie(url_google, cookies);
|
| + ASSERT_FALSE(helper->empty());
|
| + helper->Reset();
|
| + ASSERT_TRUE(helper->empty());
|
| +}
|
| +
|
| +} // namespace
|
|
|
| Property changes on: chrome/browser/browsing_data_cookie_helper_unittest.cc
|
| ___________________________________________________________________
|
| Added: svn:eol-style
|
| + LF
|
|
|
|
|