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

Side by Side Diff: components/browser_sync/browser/profile_sync_service_bookmark_unittest.cc

Issue 1841653003: Drop |languages| from {Format,Elide}Url* and IDNToUnicode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo in elide_url.cc Created 4 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
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 // TODO(akalin): This file is basically just a unit test for 5 // TODO(akalin): This file is basically just a unit test for
6 // BookmarkChangeProcessor. Write unit tests for 6 // BookmarkChangeProcessor. Write unit tests for
7 // BookmarkModelAssociator separately. 7 // BookmarkModelAssociator separately.
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 int64_t next_id = 0; 442 int64_t next_id = 0;
443 static_cast<bookmarks::TestBookmarkClient*>(model->client()) 443 static_cast<bookmarks::TestBookmarkClient*>(model->client())
444 ->SetExtraNodesToLoad( 444 ->SetExtraNodesToLoad(
445 managed_bookmark_service_->GetLoadExtraNodesCallback().Run( 445 managed_bookmark_service_->GetLoadExtraNodesCallback().Run(
446 &next_id)); 446 &next_id));
447 if (delete_bookmarks) { 447 if (delete_bookmarks) {
448 base::DeleteFile(data_path.Append(FILE_PATH_LITERAL("dummy_bookmarks")), 448 base::DeleteFile(data_path.Append(FILE_PATH_LITERAL("dummy_bookmarks")),
449 false); 449 false);
450 } 450 }
451 451
452 model->Load(profile_sync_service_bundle_.pref_service(), std::string(), 452 model->Load(profile_sync_service_bundle_.pref_service(), data_path,
453 data_path, base::ThreadTaskRunnerHandle::Get(), 453 base::ThreadTaskRunnerHandle::Get(),
454 base::ThreadTaskRunnerHandle::Get()); 454 base::ThreadTaskRunnerHandle::Get());
455 bookmarks::test::WaitForBookmarkModelToLoad(model.get()); 455 bookmarks::test::WaitForBookmarkModelToLoad(model.get());
456 return model; 456 return model;
457 } 457 }
458 458
459 // Load (or re-load) the bookmark model. |load| controls use of the 459 // Load (or re-load) the bookmark model. |load| controls use of the
460 // bookmarks file on disk. |save| controls whether the newly loaded 460 // bookmarks file on disk. |save| controls whether the newly loaded
461 // bookmark model will write out a bookmark file as it goes. 461 // bookmark model will write out a bookmark file as it goes.
462 void LoadBookmarkModel(LoadOption load, SaveOption save) { 462 void LoadBookmarkModel(LoadOption load, SaveOption save) {
463 bool delete_bookmarks = load == DELETE_EXISTING_STORAGE; 463 bool delete_bookmarks = load == DELETE_EXISTING_STORAGE;
(...skipping 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2587 EXPECT_EQ(syncer::kInvalidId, sync_id); 2587 EXPECT_EQ(syncer::kInvalidId, sync_id);
2588 2588
2589 // Verify that Sync ignores deleting this node. 2589 // Verify that Sync ignores deleting this node.
2590 model()->Remove(node); 2590 model()->Remove(node);
2591 EXPECT_EQ(sync_bookmark_count, GetSyncBookmarkCount()); 2591 EXPECT_EQ(sync_bookmark_count, GetSyncBookmarkCount());
2592 } 2592 }
2593 2593
2594 } // namespace 2594 } // namespace
2595 2595
2596 } // namespace browser_sync 2596 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698