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

Side by Side Diff: webkit/database/database_tracker_unittest.cc

Issue 6810037: File API changes needed for safely passing user selected file entities from the file browser comp... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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) 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 #include "base/file_path.h" 5 #include "base/file_path.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/memory/scoped_temp_dir.h" 8 #include "base/memory/scoped_temp_dir.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 12 matching lines...) Expand all
23 class TestSpecialStoragePolicy : public quota::SpecialStoragePolicy { 23 class TestSpecialStoragePolicy : public quota::SpecialStoragePolicy {
24 public: 24 public:
25 virtual bool IsStorageProtected(const GURL& origin) { 25 virtual bool IsStorageProtected(const GURL& origin) {
26 return origin == GURL(kOrigin2Url); 26 return origin == GURL(kOrigin2Url);
27 } 27 }
28 28
29 virtual bool IsStorageUnlimited(const GURL& origin) { 29 virtual bool IsStorageUnlimited(const GURL& origin) {
30 return false; 30 return false;
31 } 31 }
32 32
33 virtual bool IsLocalFileSystemAccessAllowed(const GURL& origin) { 33 virtual bool IsLocalFileSystemAccessAllowed(const GURL& origin,
34 const FilePath& virtual_path) {
34 return false; 35 return false;
35 } 36 }
37
38 virtual void GrantLocalFileSystemAccess(const GURL& origin,
39 const FilePath& virtual_path) {
40 }
36 }; 41 };
37 42
38 class TestObserver : public webkit_database::DatabaseTracker::Observer { 43 class TestObserver : public webkit_database::DatabaseTracker::Observer {
39 public: 44 public:
40 TestObserver() : new_notification_received_(false) {} 45 TestObserver() : new_notification_received_(false) {}
41 virtual ~TestObserver() {} 46 virtual ~TestObserver() {}
42 virtual void OnDatabaseSizeChanged(const string16& origin_identifier, 47 virtual void OnDatabaseSizeChanged(const string16& origin_identifier,
43 const string16& database_name, 48 const string16& database_name,
44 int64 database_size, 49 int64 database_size,
45 int64 space_available) { 50 int64 space_available) {
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 421
417 TEST(DatabaseTrackerTest, DatabaseTracker) { 422 TEST(DatabaseTrackerTest, DatabaseTracker) {
418 DatabaseTracker_TestHelper_Test::TestDatabaseTracker(false); 423 DatabaseTracker_TestHelper_Test::TestDatabaseTracker(false);
419 } 424 }
420 425
421 TEST(DatabaseTrackerTest, DatabaseTrackerIncognitoMode) { 426 TEST(DatabaseTrackerTest, DatabaseTrackerIncognitoMode) {
422 DatabaseTracker_TestHelper_Test::TestDatabaseTracker(true); 427 DatabaseTracker_TestHelper_Test::TestDatabaseTracker(true);
423 } 428 }
424 429
425 } // namespace webkit_database 430 } // namespace webkit_database
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698