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

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

Issue 9958107: Limiting the "Cookies and site data" form to "web safe" schemes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: License. Created 8 years, 8 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) 2010 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 "chrome/browser/browsing_data_appcache_helper.h" 5 #include "chrome/browser/browsing_data_appcache_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "chrome/test/base/testing_profile.h" 10 #include "chrome/test/base/testing_profile.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 scoped_refptr<CannedBrowsingDataAppCacheHelper> helper( 98 scoped_refptr<CannedBrowsingDataAppCacheHelper> helper(
99 new CannedBrowsingDataAppCacheHelper(&profile)); 99 new CannedBrowsingDataAppCacheHelper(&profile));
100 100
101 ASSERT_TRUE(helper->empty()); 101 ASSERT_TRUE(helper->empty());
102 helper->AddAppCache(manifest); 102 helper->AddAppCache(manifest);
103 ASSERT_FALSE(helper->empty()); 103 ASSERT_FALSE(helper->empty());
104 helper->Reset(); 104 helper->Reset();
105 ASSERT_TRUE(helper->empty()); 105 ASSERT_TRUE(helper->empty());
106 } 106 }
107
108 TEST_F(CannedBrowsingDataAppCacheHelperTest, IgnoreExtensionsAndDevTools) {
109 TestingProfile profile;
110
111 GURL manifest1("chrome-extension://abcdefghijklmnopqrstuvwxyz/manifest.xml");
112 GURL manifest2("chrome-devtools://abcdefghijklmnopqrstuvwxyz/manifest.xml");
113
114 scoped_refptr<CannedBrowsingDataAppCacheHelper> helper(
115 new CannedBrowsingDataAppCacheHelper(&profile));
116
117 ASSERT_TRUE(helper->empty());
118 helper->AddAppCache(manifest1);
119 ASSERT_TRUE(helper->empty());
120 helper->AddAppCache(manifest2);
121 ASSERT_TRUE(helper->empty());
122 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data_appcache_helper.cc ('k') | chrome/browser/browsing_data_database_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698