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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_file_system_helper_unittest.cc

Issue 11787028: New FileSystemURL cracking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test on Win Created 7 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_task_executor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.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/file_util.h" 9 #include "base/file_util.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 EXPECT_FALSE(FileSystemContainsOriginAndType(kOrigin2, kTemporary)); 167 EXPECT_FALSE(FileSystemContainsOriginAndType(kOrigin2, kTemporary));
168 EXPECT_TRUE(FileSystemContainsOriginAndType(kOrigin3, kPersistent)); 168 EXPECT_TRUE(FileSystemContainsOriginAndType(kOrigin3, kPersistent));
169 EXPECT_TRUE(FileSystemContainsOriginAndType(kOrigin3, kTemporary)); 169 EXPECT_TRUE(FileSystemContainsOriginAndType(kOrigin3, kTemporary));
170 } 170 }
171 171
172 // Uses the fileapi methods to create a filesystem of a given type for a 172 // Uses the fileapi methods to create a filesystem of a given type for a
173 // specified origin. 173 // specified origin.
174 void CreateDirectoryForOriginAndType(const GURL& origin, 174 void CreateDirectoryForOriginAndType(const GURL& origin,
175 fileapi::FileSystemType type) { 175 fileapi::FileSystemType type) {
176 FilePath target = sandbox_->GetFileSystemRootPathOnFileThread( 176 FilePath target = sandbox_->GetFileSystemRootPathOnFileThread(
177 fileapi::FileSystemURL(origin, type, FilePath()), true); 177 fileapi::FileSystemURL::CreateForTest(origin, type, FilePath()), true);
178 EXPECT_TRUE(file_util::DirectoryExists(target)); 178 EXPECT_TRUE(file_util::DirectoryExists(target));
179 } 179 }
180 180
181 // Returns a list of the FileSystemInfo objects gathered in the most recent 181 // Returns a list of the FileSystemInfo objects gathered in the most recent
182 // call to StartFetching(). 182 // call to StartFetching().
183 FileSystemInfoList* GetFileSystems() { 183 FileSystemInfoList* GetFileSystems() {
184 return file_system_info_list_.get(); 184 return file_system_info_list_.get();
185 } 185 }
186 186
187 187
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 // extension and devtools schemes. 314 // extension and devtools schemes.
315 TEST_F(BrowsingDataFileSystemHelperTest, IgnoreExtensionsAndDevTools) { 315 TEST_F(BrowsingDataFileSystemHelperTest, IgnoreExtensionsAndDevTools) {
316 ASSERT_TRUE(canned_helper_->empty()); 316 ASSERT_TRUE(canned_helper_->empty());
317 canned_helper_->AddFileSystem(kOriginExt, kTemporary, 0); 317 canned_helper_->AddFileSystem(kOriginExt, kTemporary, 0);
318 ASSERT_TRUE(canned_helper_->empty()); 318 ASSERT_TRUE(canned_helper_->empty());
319 canned_helper_->AddFileSystem(kOriginDevTools, kTemporary, 0); 319 canned_helper_->AddFileSystem(kOriginDevTools, kTemporary, 0);
320 ASSERT_TRUE(canned_helper_->empty()); 320 ASSERT_TRUE(canned_helper_->empty());
321 } 321 }
322 322
323 } // namespace 323 } // namespace
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_task_executor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698