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

Side by Side Diff: chrome/browser/sync_file_system/local/local_file_sync_service_unittest.cc

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 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 <vector> 5 #include <vector>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 15 matching lines...) Expand all
26 #include "chrome/browser/sync_file_system/sync_status_code.h" 26 #include "chrome/browser/sync_file_system/sync_status_code.h"
27 #include "chrome/browser/sync_file_system/syncable_file_system_util.h" 27 #include "chrome/browser/sync_file_system/syncable_file_system_util.h"
28 #include "chrome/test/base/testing_profile.h" 28 #include "chrome/test/base/testing_profile.h"
29 #include "content/public/browser/browser_thread.h" 29 #include "content/public/browser/browser_thread.h"
30 #include "content/public/test/test_browser_thread_bundle.h" 30 #include "content/public/test/test_browser_thread_bundle.h"
31 #include "content/public/test/test_utils.h" 31 #include "content/public/test/test_utils.h"
32 #include "testing/gmock/include/gmock/gmock.h" 32 #include "testing/gmock/include/gmock/gmock.h"
33 #include "testing/gtest/include/gtest/gtest.h" 33 #include "testing/gtest/include/gtest/gtest.h"
34 #include "third_party/leveldatabase/src/helpers/memenv/memenv.h" 34 #include "third_party/leveldatabase/src/helpers/memenv/memenv.h"
35 #include "third_party/leveldatabase/src/include/leveldb/env.h" 35 #include "third_party/leveldatabase/src/include/leveldb/env.h"
36 #include "webkit/browser/fileapi/file_system_context.h" 36 #include "storage/browser/fileapi/file_system_context.h"
37 37
38 using content::BrowserThread; 38 using content::BrowserThread;
39 using fileapi::FileSystemURL; 39 using storage::FileSystemURL;
40 using ::testing::_; 40 using ::testing::_;
41 using ::testing::AtLeast; 41 using ::testing::AtLeast;
42 using ::testing::InvokeWithoutArgs; 42 using ::testing::InvokeWithoutArgs;
43 using ::testing::StrictMock; 43 using ::testing::StrictMock;
44 44
45 namespace sync_file_system { 45 namespace sync_file_system {
46 46
47 namespace { 47 namespace {
48 48
49 const char kOrigin[] = "http://example.com"; 49 const char kOrigin[] = "http://example.com";
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 536
537 TEST_F(LocalFileSyncServiceTest, RecordFakeChange) { 537 TEST_F(LocalFileSyncServiceTest, RecordFakeChange) {
538 const FileSystemURL kURL(file_system_->URL("foo")); 538 const FileSystemURL kURL(file_system_->URL("foo"));
539 539
540 // Create a file and reset the changes (as preparation). 540 // Create a file and reset the changes (as preparation).
541 EXPECT_EQ(base::File::FILE_OK, file_system_->CreateFile(kURL)); 541 EXPECT_EQ(base::File::FILE_OK, file_system_->CreateFile(kURL));
542 file_system_->ClearChangeForURLInTracker(kURL); 542 file_system_->ClearChangeForURLInTracker(kURL);
543 543
544 EXPECT_EQ(0, GetNumChangesInTracker()); 544 EXPECT_EQ(0, GetNumChangesInTracker());
545 545
546 fileapi::FileSystemURLSet urlset; 546 storage::FileSystemURLSet urlset;
547 file_system_->GetChangedURLsInTracker(&urlset); 547 file_system_->GetChangedURLsInTracker(&urlset);
548 EXPECT_TRUE(urlset.empty()); 548 EXPECT_TRUE(urlset.empty());
549 549
550 const FileChange change(FileChange::FILE_CHANGE_ADD_OR_UPDATE, 550 const FileChange change(FileChange::FILE_CHANGE_ADD_OR_UPDATE,
551 SYNC_FILE_TYPE_FILE); 551 SYNC_FILE_TYPE_FILE);
552 552
553 // Call RecordFakeLocalChange to add an ADD_OR_UPDATE change. 553 // Call RecordFakeLocalChange to add an ADD_OR_UPDATE change.
554 { 554 {
555 base::RunLoop run_loop; 555 base::RunLoop run_loop;
556 SyncStatusCode status = SYNC_STATUS_UNKNOWN; 556 SyncStatusCode status = SYNC_STATUS_UNKNOWN;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 all_origins.insert(kOrigin2); 726 all_origins.insert(kOrigin2);
727 all_origins.insert(kOrigin3); 727 all_origins.insert(kOrigin3);
728 while (!all_origins.empty()) { 728 while (!all_origins.empty()) {
729 ASSERT_TRUE(NextOriginToProcess(&origin)); 729 ASSERT_TRUE(NextOriginToProcess(&origin));
730 ASSERT_TRUE(ContainsKey(all_origins, origin)); 730 ASSERT_TRUE(ContainsKey(all_origins, origin));
731 all_origins.erase(origin); 731 all_origins.erase(origin);
732 } 732 }
733 } 733 }
734 734
735 } // namespace sync_file_system 735 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698