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

Side by Side Diff: chrome/browser/content_settings/tab_specific_content_settings_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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/string16.h" 5 #include "base/string16.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 7 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
8 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 8 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
9 #include "chrome/test/base/testing_profile.h" 9 #include "chrome/test/base/testing_profile.h"
10 #include "content/public/test/test_browser_thread.h" 10 #include "content/public/test/test_browser_thread.h"
11 #include "net/cookies/cookie_monster.h" 11 #include "net/cookies/canonical_cookie.h"
12 #include "net/cookies/parsed_cookie.h" 12 #include "net/cookies/parsed_cookie.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
15 15
16 using content::BrowserThread; 16 using content::BrowserThread;
17 17
18 namespace { 18 namespace {
19 19
20 class MockSiteDataObserver 20 class MockSiteDataObserver
21 : public TabSpecificContentSettings::SiteDataObserver { 21 : public TabSpecificContentSettings::SiteDataObserver {
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 EXPECT_CALL(mock_observer, OnSiteDataAccessed()).Times(6); 183 EXPECT_CALL(mock_observer, OnSiteDataAccessed()).Times(6);
184 184
185 bool blocked_by_policy = false; 185 bool blocked_by_policy = false;
186 content_settings.OnCookieChanged(GURL("http://google.com"), 186 content_settings.OnCookieChanged(GURL("http://google.com"),
187 GURL("http://google.com"), 187 GURL("http://google.com"),
188 "A=B", 188 "A=B",
189 net::CookieOptions(), 189 net::CookieOptions(),
190 blocked_by_policy); 190 blocked_by_policy);
191 net::CookieList cookie_list; 191 net::CookieList cookie_list;
192 net::ParsedCookie parsed_cookie("CookieName=CookieValue"); 192 net::ParsedCookie parsed_cookie("CookieName=CookieValue");
193 scoped_ptr<net::CookieMonster::CanonicalCookie> cookie( 193 scoped_ptr<net::CanonicalCookie> cookie(
194 net::CookieMonster::CanonicalCookie::Create(GURL("http://google.com"), 194 net::CanonicalCookie::Create(GURL("http://google.com"), parsed_cookie));
195 parsed_cookie));
196 cookie_list.push_back(*cookie); 195 cookie_list.push_back(*cookie);
197 content_settings.OnCookiesRead(GURL("http://google.com"), 196 content_settings.OnCookiesRead(GURL("http://google.com"),
198 GURL("http://google.com"), 197 GURL("http://google.com"),
199 cookie_list, 198 cookie_list,
200 blocked_by_policy); 199 blocked_by_policy);
201 content_settings.OnFileSystemAccessed(GURL("http://google.com"), 200 content_settings.OnFileSystemAccessed(GURL("http://google.com"),
202 blocked_by_policy); 201 blocked_by_policy);
203 content_settings.OnIndexedDBAccessed(GURL("http://google.com"), 202 content_settings.OnIndexedDBAccessed(GURL("http://google.com"),
204 UTF8ToUTF16("text"), 203 UTF8ToUTF16("text"),
205 blocked_by_policy); 204 blocked_by_policy);
206 content_settings.OnLocalStorageAccessed(GURL("http://google.com"), 205 content_settings.OnLocalStorageAccessed(GURL("http://google.com"),
207 true, 206 true,
208 blocked_by_policy); 207 blocked_by_policy);
209 content_settings.OnWebDatabaseAccessed(GURL("http://google.com"), 208 content_settings.OnWebDatabaseAccessed(GURL("http://google.com"),
210 UTF8ToUTF16("name"), 209 UTF8ToUTF16("name"),
211 UTF8ToUTF16("display_name"), 210 UTF8ToUTF16("display_name"),
212 blocked_by_policy); 211 blocked_by_policy);
213 } 212 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698