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

Side by Side Diff: ios/chrome/browser/ui/sync/sync_fake_server_egtest.mm

Issue 2803463003: [Sync] Use un-expired time for testing (Closed)
Patch Set: add fix back Created 3 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
« no previous file with comments | « no previous file | ios/chrome/test/app/sync_test_util.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #import <EarlGrey/EarlGrey.h> 5 #import <EarlGrey/EarlGrey.h>
6 #import <XCTest/XCTest.h> 6 #import <XCTest/XCTest.h>
7 7
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "components/bookmarks/browser/bookmark_model.h" 9 #include "components/bookmarks/browser/bookmark_model.h"
10 #include "components/bookmarks/browser/titled_url_match.h" 10 #include "components/bookmarks/browser/titled_url_match.h"
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 NSError* error = nil; 424 NSError* error = nil;
425 BOOL success = chrome_test_util::VerifySessionsOnSyncServer( 425 BOOL success = chrome_test_util::VerifySessionsOnSyncServer(
426 std::multiset<std::string>{URL1.spec(), URL2.spec()}, &error); 426 std::multiset<std::string>{URL1.spec(), URL2.spec()}, &error);
427 427
428 DCHECK(success || error); 428 DCHECK(success || error);
429 GREYAssertTrue(success, [error localizedDescription]); 429 GREYAssertTrue(success, [error localizedDescription]);
430 } 430 }
431 431
432 // Tests that a typed URL (after Sync is enabled) is uploaded to the Sync 432 // Tests that a typed URL (after Sync is enabled) is uploaded to the Sync
433 // server. 433 // server.
434 // TODO(crbug.com/707846): Re-enable test. 434 - (void)testSyncTypedURLUpload {
435 - (void)DISABLED_testSyncTypedURLUpload {
436 const GURL mockURL("http://not-a-real-site/"); 435 const GURL mockURL("http://not-a-real-site/");
437 436
438 chrome_test_util::ClearBrowsingHistory(); 437 chrome_test_util::ClearBrowsingHistory();
439 438
440 [self setTearDownHandler:^{ 439 [self setTearDownHandler:^{
441 chrome_test_util::ClearBrowsingHistory(); 440 chrome_test_util::ClearBrowsingHistory();
442 }]; 441 }];
443 chrome_test_util::AddTypedURLOnClient(mockURL); 442 chrome_test_util::AddTypedURLOnClient(mockURL);
444 443
445 // Sign in to sync. 444 // Sign in to sync.
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 // Delete typed URL from client. 545 // Delete typed URL from client.
547 chrome_test_util::DeleteTypedUrlFromClient(mockURL); 546 chrome_test_util::DeleteTypedUrlFromClient(mockURL);
548 547
549 // Trigger sync and wait for typed URL to be deleted. 548 // Trigger sync and wait for typed URL to be deleted.
550 chrome_test_util::TriggerSyncCycle(syncer::TYPED_URLS); 549 chrome_test_util::TriggerSyncCycle(syncer::TYPED_URLS);
551 AssertNumberOfEntities(0, syncer::TYPED_URLS); 550 AssertNumberOfEntities(0, syncer::TYPED_URLS);
552 } 551 }
553 552
554 // Test that typed url is deleted from client after server sends tombstone for 553 // Test that typed url is deleted from client after server sends tombstone for
555 // that typed url. 554 // that typed url.
556 // TODO(crbug.com/707846): Re-enable test. 555 - (void)testSyncTypedURLDeleteFromServer {
557 - (void)DISABLE_testSyncTypedURLDeleteFromServer {
558 const GURL mockURL("http://not-a-real-site/"); 556 const GURL mockURL("http://not-a-real-site/");
559 557
560 chrome_test_util::ClearBrowsingHistory(); 558 chrome_test_util::ClearBrowsingHistory();
561 559
562 [self setTearDownHandler:^{ 560 [self setTearDownHandler:^{
563 chrome_test_util::ClearBrowsingHistory(); 561 chrome_test_util::ClearBrowsingHistory();
564 }]; 562 }];
565 chrome_test_util::AddTypedURLOnClient(mockURL); 563 chrome_test_util::AddTypedURLOnClient(mockURL);
566 564
567 // Sign in to sync. 565 // Sign in to sync.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 628
631 // Verify the correct number of bookmarks exist. 629 // Verify the correct number of bookmarks exist.
632 base::string16 matchString = base::SysNSStringToUTF16(title); 630 base::string16 matchString = base::SysNSStringToUTF16(title);
633 std::vector<bookmarks::TitledUrlMatch> matches; 631 std::vector<bookmarks::TitledUrlMatch> matches;
634 bookmarkModel->GetBookmarksMatching(matchString, 50, &matches); 632 bookmarkModel->GetBookmarksMatching(matchString, 50, &matches);
635 const size_t count = matches.size(); 633 const size_t count = matches.size();
636 GREYAssertEqual(expectedCount, count, @"Unexpected number of bookmarks"); 634 GREYAssertEqual(expectedCount, count, @"Unexpected number of bookmarks");
637 } 635 }
638 636
639 @end 637 @end
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/test/app/sync_test_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698