| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "webkit/browser/fileapi/syncable/local_file_change_tracker.h" | 5 #include "webkit/browser/fileapi/syncable/local_file_change_tracker.h" |
| 6 | 6 |
| 7 #include <deque> | 7 #include <deque> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 using webkit_blob::MockBlobURLRequestContext; | 29 using webkit_blob::MockBlobURLRequestContext; |
| 30 using webkit_blob::ScopedTextBlob; | 30 using webkit_blob::ScopedTextBlob; |
| 31 | 31 |
| 32 namespace sync_file_system { | 32 namespace sync_file_system { |
| 33 | 33 |
| 34 class LocalFileChangeTrackerTest : public testing::Test { | 34 class LocalFileChangeTrackerTest : public testing::Test { |
| 35 public: | 35 public: |
| 36 LocalFileChangeTrackerTest() | 36 LocalFileChangeTrackerTest() |
| 37 : message_loop_(base::MessageLoop::TYPE_IO), | 37 : message_loop_(base::MessageLoop::TYPE_IO), |
| 38 file_system_(GURL("http://example.com"), | 38 file_system_(GURL("http://example.com"), |
| 39 base::MessageLoopProxy::current(), | 39 base::MessageLoopProxy::current().get(), |
| 40 base::MessageLoopProxy::current()) {} | 40 base::MessageLoopProxy::current().get()) {} |
| 41 | 41 |
| 42 virtual void SetUp() OVERRIDE { | 42 virtual void SetUp() OVERRIDE { |
| 43 file_system_.SetUp(); | 43 file_system_.SetUp(); |
| 44 | 44 |
| 45 sync_context_ = new LocalFileSyncContext(base::MessageLoopProxy::current(), | 45 sync_context_ = |
| 46 base::MessageLoopProxy::current()); | 46 new LocalFileSyncContext(base::MessageLoopProxy::current().get(), |
| 47 base::MessageLoopProxy::current().get()); |
| 47 ASSERT_EQ( | 48 ASSERT_EQ( |
| 48 sync_file_system::SYNC_STATUS_OK, | 49 sync_file_system::SYNC_STATUS_OK, |
| 49 file_system_.MaybeInitializeFileSystemContext(sync_context_.get())); | 50 file_system_.MaybeInitializeFileSystemContext(sync_context_.get())); |
| 50 } | 51 } |
| 51 | 52 |
| 52 virtual void TearDown() OVERRIDE { | 53 virtual void TearDown() OVERRIDE { |
| 53 if (sync_context_.get()) | 54 if (sync_context_.get()) |
| 54 sync_context_->ShutdownOnUIThread(); | 55 sync_context_->ShutdownOnUIThread(); |
| 55 sync_context_ = NULL; | 56 sync_context_ = NULL; |
| 56 | 57 |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 ASSERT_EQ(2U, urls_to_process.size()); | 594 ASSERT_EQ(2U, urls_to_process.size()); |
| 594 | 595 |
| 595 // The exact order of recursive removal cannot be determined. | 596 // The exact order of recursive removal cannot be determined. |
| 596 EXPECT_TRUE(URL(kPath1) == urls_to_process[0] || | 597 EXPECT_TRUE(URL(kPath1) == urls_to_process[0] || |
| 597 URL(kPath2) == urls_to_process[0]); | 598 URL(kPath2) == urls_to_process[0]); |
| 598 EXPECT_TRUE(URL(kPath1) == urls_to_process[1] || | 599 EXPECT_TRUE(URL(kPath1) == urls_to_process[1] || |
| 599 URL(kPath2) == urls_to_process[1]); | 600 URL(kPath2) == urls_to_process[1]); |
| 600 } | 601 } |
| 601 | 602 |
| 602 } // namespace sync_file_system | 603 } // namespace sync_file_system |
| OLD | NEW |