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

Side by Side Diff: chrome/browser/extensions/extension_cookies_unittest.cc

Issue 7616019: Reorganize chrome/test, part #9 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Tests common functionality used by the Chrome Extensions Cookies API 5 // Tests common functionality used by the Chrome Extensions Cookies API
6 // implementation. 6 // implementation.
7 7
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/extensions/extension_cookies_api_constants.h" 11 #include "chrome/browser/extensions/extension_cookies_api_constants.h"
12 #include "chrome/browser/extensions/extension_cookies_helpers.h" 12 #include "chrome/browser/extensions/extension_cookies_helpers.h"
13 #include "chrome/test/base/testing_browser_process_test.h"
13 #include "chrome/test/base/testing_profile.h" 14 #include "chrome/test/base/testing_profile.h"
14 #include "chrome/test/testing_browser_process_test.h"
15 #include "googleurl/src/gurl.h" 15 #include "googleurl/src/gurl.h"
16 16
17 namespace keys = extension_cookies_api_constants; 17 namespace keys = extension_cookies_api_constants;
18 18
19 namespace { 19 namespace {
20 20
21 struct DomainMatchCase { 21 struct DomainMatchCase {
22 const char* filter; 22 const char* filter;
23 const char* domain; 23 const char* domain;
24 const bool matches; 24 const bool matches;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 for (size_t i = 0; i < arraysize(tests); ++i) { 205 for (size_t i = 0; i < arraysize(tests); ++i) {
206 details->SetString(keys::kDomainKey, std::string(tests[i].filter)); 206 details->SetString(keys::kDomainKey, std::string(tests[i].filter));
207 extension_cookies_helpers::MatchFilter filter(details.get()); 207 extension_cookies_helpers::MatchFilter filter(details.get());
208 net::CookieMonster::CanonicalCookie cookie(GURL(), "", "", tests[i].domain, 208 net::CookieMonster::CanonicalCookie cookie(GURL(), "", "", tests[i].domain,
209 "", "", "", base::Time(), 209 "", "", "", base::Time(),
210 base::Time(), base::Time(), 210 base::Time(), base::Time(),
211 false, false, false); 211 false, false, false);
212 EXPECT_EQ(tests[i].matches, filter.MatchesCookie(cookie)); 212 EXPECT_EQ(tests[i].matches, filter.MatchesCookie(cookie));
213 } 213 }
214 } 214 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698