Commit b4dc5a2e authored by Eugene But's avatar Eugene But Committed by Commit Bot

Added Accessibility EG Tests for Download Manager UI.

Added the following tests:
 - testAccessibilityOnNotStartedDownloadToolbar
 - testAccessibilityOnCompletedDownloadToolbar

Bug: 854232
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I2c49197f02881548cdae817a9753798507ddfc3b
Reviewed-on: https://chromium-review.googlesource.com/1184323Reviewed-by: default avatarKurt Horimoto <kkhorimoto@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585517}
parent 607c2083
......@@ -8,6 +8,7 @@
#include "ios/chrome/browser/chrome_url_constants.h"
#include "ios/chrome/grit/ios_strings.h"
#import "ios/chrome/test/app/tab_test_util.h"
#include "ios/chrome/test/earl_grey/accessibility_util.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"
......@@ -160,4 +161,30 @@ bool WaitForOpenInButton() {
GREYAssert(WaitForOpenInButton(), @"Open in... button did not show up");
}
// Tests accessibility on Download Manager UI when download is not started.
- (void)testAccessibilityOnNotStartedDownloadToolbar {
[ChromeEarlGrey loadURL:self.testServer->GetURL("/")];
[ChromeEarlGrey waitForWebViewContainingText:"Download"];
[ChromeEarlGrey tapWebViewElementWithID:@"download"];
[[EarlGrey selectElementWithMatcher:DownloadButton()]
assertWithMatcher:grey_notNil()];
chrome_test_util::VerifyAccessibilityForCurrentScreen();
}
// Tests accessibility on Download Manager UI when download is complete.
- (void)testAccessibilityOnCompletedDownloadToolbar {
[ChromeEarlGrey loadURL:self.testServer->GetURL("/")];
[ChromeEarlGrey waitForWebViewContainingText:"Download"];
[ChromeEarlGrey tapWebViewElementWithID:@"download"];
[[EarlGrey selectElementWithMatcher:DownloadButton()]
performAction:grey_tap()];
GREYAssert(WaitForOpenInButton(), @"Open in... button did not show up");
chrome_test_util::VerifyAccessibilityForCurrentScreen();
}
@end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment