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

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

Issue 7583053: Add MessageLoopProxy::current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No need for MessageLoopProxy destruction observer. 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 #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/message_loop_proxy.h" 8 #include "base/message_loop_proxy.h"
9 #include "base/platform_file.h" 9 #include "base/platform_file.h"
10 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 // Initialize the tracker database. 533 // Initialize the tracker database.
534 ScopedTempDir temp_dir; 534 ScopedTempDir temp_dir;
535 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); 535 ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
536 FilePath origin1_db_dir; 536 FilePath origin1_db_dir;
537 { 537 {
538 scoped_refptr<DatabaseTracker> tracker( 538 scoped_refptr<DatabaseTracker> tracker(
539 new DatabaseTracker( 539 new DatabaseTracker(
540 temp_dir.path(), false, true, 540 temp_dir.path(), false, true,
541 new TestSpecialStoragePolicy, 541 new TestSpecialStoragePolicy,
542 NULL, 542 NULL,
543 base::MessageLoopProxy::CreateForCurrentThread())); 543 base::MessageLoopProxy::current()));
544 544
545 // Open three new databases. 545 // Open three new databases.
546 tracker->DatabaseOpened(kOrigin1, kDB1, kDescription, 0, 546 tracker->DatabaseOpened(kOrigin1, kDB1, kDescription, 0,
547 &database_size); 547 &database_size);
548 EXPECT_EQ(0, database_size); 548 EXPECT_EQ(0, database_size);
549 tracker->DatabaseOpened(kOrigin2, kDB2, kDescription, 0, 549 tracker->DatabaseOpened(kOrigin2, kDB2, kDescription, 0,
550 &database_size); 550 &database_size);
551 EXPECT_EQ(0, database_size); 551 EXPECT_EQ(0, database_size);
552 tracker->DatabaseOpened(kOrigin1, kDB3, kDescription, 0, 552 tracker->DatabaseOpened(kOrigin1, kDB3, kDescription, 0,
553 &database_size); 553 &database_size);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 // There is no difference in behavior between incognito and not. 636 // There is no difference in behavior between incognito and not.
637 DatabaseTracker_TestHelper_Test::DatabaseTrackerQuotaIntegration(); 637 DatabaseTracker_TestHelper_Test::DatabaseTrackerQuotaIntegration();
638 } 638 }
639 639
640 TEST(DatabaseTrackerTest, DatabaseTrackerClearLocalStateOnExit) { 640 TEST(DatabaseTrackerTest, DatabaseTrackerClearLocalStateOnExit) {
641 // Only works for regular mode. 641 // Only works for regular mode.
642 DatabaseTracker_TestHelper_Test::DatabaseTrackerClearLocalStateOnExit(); 642 DatabaseTracker_TestHelper_Test::DatabaseTrackerClearLocalStateOnExit();
643 } 643 }
644 644
645 } // namespace webkit_database 645 } // namespace webkit_database
OLDNEW
« no previous file with comments | « webkit/database/database_quota_client_unittest.cc ('k') | webkit/fileapi/file_system_context_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698