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

Side by Side Diff: webkit/browser/fileapi/sandbox_origin_database_unittest.cc

Issue 15442002: Move FileAPI sandboxed filesystem related code from webkit/fileapi to webkit/browser/fileapi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 7 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 <algorithm> 5 #include <algorithm>
6 #include <functional> 6 #include <functional>
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/files/scoped_temp_dir.h" 12 #include "base/files/scoped_temp_dir.h"
13 #include "base/platform_file.h" 13 #include "base/platform_file.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 #include "third_party/leveldatabase/src/db/filename.h" 16 #include "third_party/leveldatabase/src/db/filename.h"
17 #include "third_party/leveldatabase/src/include/leveldb/db.h" 17 #include "third_party/leveldatabase/src/include/leveldb/db.h"
18 #include "webkit/browser/fileapi/sandbox_database_test_helper.h"
19 #include "webkit/browser/fileapi/sandbox_origin_database.h"
18 #include "webkit/fileapi/file_system_util.h" 20 #include "webkit/fileapi/file_system_util.h"
19 #include "webkit/fileapi/sandbox_database_test_helper.h"
20 #include "webkit/fileapi/sandbox_origin_database.h"
21 21
22 namespace fileapi { 22 namespace fileapi {
23 23
24 namespace { 24 namespace {
25 const base::FilePath::CharType kFileSystemDirName[] = 25 const base::FilePath::CharType kFileSystemDirName[] =
26 FILE_PATH_LITERAL("File System"); 26 FILE_PATH_LITERAL("File System");
27 const base::FilePath::CharType kOriginDatabaseName[] = 27 const base::FilePath::CharType kOriginDatabaseName[] =
28 FILE_PATH_LITERAL("Origins"); 28 FILE_PATH_LITERAL("Origins");
29 } // namespace 29 } // namespace
30 30
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 const std::string kOrigin2("piyo.example.org"); 299 const std::string kOrigin2("piyo.example.org");
300 EXPECT_FALSE(database->HasOriginPath(kOrigin2)); 300 EXPECT_FALSE(database->HasOriginPath(kOrigin2));
301 EXPECT_TRUE(database->GetPathForOrigin(kOrigin2, &path)); 301 EXPECT_TRUE(database->GetPathForOrigin(kOrigin2, &path));
302 EXPECT_FALSE(path.empty()); 302 EXPECT_FALSE(path.empty());
303 EXPECT_TRUE(database->HasOriginPath(kOrigin2)); 303 EXPECT_TRUE(database->HasOriginPath(kOrigin2));
304 } 304 }
305 } 305 }
306 306
307 } // namespace fileapi 307 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/sandbox_origin_database.cc ('k') | webkit/browser/fileapi/sandbox_quota_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698