forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[iOS] Fixing NOTREACHED when entering passphrase
Removing NOTREACHED in -[SyncEncryptionPassphraseTableViewController reportDismissalUserAction]. This method is called when the view is presented by the infobar. Once the passphrase is entered (or the view is canceled by the user), then the navigation controller is dismissed, and this method is called. This bug probably exists from the origin but never caught since NOTREACHED() was not crashing in canary until recently. Bug: 1075647 Change-Id: I8b7a3da1620c6cc60a221d1b0d09ed712b8cf46d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2181366 Commit-Queue: Jérôme Lebel <jlebel@chromium.org> Reviewed-by: Marc Treib <treib@chromium.org> Reviewed-by: Gauthier Ambard <gambard@chromium.org> Reviewed-by: Eugene But <eugenebut@chromium.org> Cr-Commit-Position: refs/heads/master@{#767537}
- Loading branch information
Jérôme Lebel
authored and
Commit Bot
committed
May 11, 2020
1 parent
390249f
commit 254af47
Showing
12 changed files
with
133 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...hrome/browser/ui/settings/sync/sync_encryption_passphrase_table_view_controller_egtest.mm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright 2020 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#import <UIKit/UIKit.h> | ||
#import "ios/chrome/browser/ui/authentication/signin_earl_grey_ui.h" | ||
#import "ios/chrome/browser/ui/authentication/signin_earlgrey_utils.h" | ||
#import "ios/chrome/grit/ios_strings.h" | ||
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" | ||
#import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" | ||
#import "ios/chrome/test/earl_grey/chrome_matchers.h" | ||
#import "ios/chrome/test/earl_grey/chrome_test_case.h" | ||
#import "ios/testing/earl_grey/earl_grey_test.h" | ||
|
||
#if !defined(__has_feature) || !__has_feature(objc_arc) | ||
#error "This file requires ARC support." | ||
#endif | ||
|
||
using chrome_test_util::ButtonWithAccessibilityLabelId; | ||
using chrome_test_util::NavigationBarCancelButton; | ||
|
||
@interface SyncEncryptionPassphraseTestCase : ChromeTestCase | ||
@end | ||
|
||
@implementation SyncEncryptionPassphraseTestCase | ||
|
||
// Tests to open the sync passphrase view, and to close it. | ||
- (void)testShowSyncPassphraseAndDismiss { | ||
[ChromeEarlGrey addBookmarkWithSyncPassphrase:@"hello"]; | ||
// Signin. | ||
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyUtils fakeIdentity1]; | ||
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity]; | ||
[ChromeEarlGrey openNewTab]; | ||
[[EarlGrey selectElementWithMatcher:ButtonWithAccessibilityLabelId( | ||
IDS_IOS_SYNC_ENTER_PASSPHRASE)] | ||
performAction:grey_tap()]; | ||
[[EarlGrey selectElementWithMatcher:NavigationBarCancelButton()] | ||
performAction:grey_tap()]; | ||
// Wait until the settings is fully removed. | ||
[[GREYUIThreadExecutor sharedInstance] drainUntilIdle]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters