Commit b8527f90 authored by Rohit Rao's avatar Rohit Rao Committed by Commit Bot

[ios] Disables PrintControllerTests on iOS11 when UIRefresh is enabled.

These tests cannot invoke Print via the share menu on iOS11, so they
are redundant with the tests in JSPrintTestCase.

BUG=825431,683280

Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I0e9965dfddf1e49d583a5304d7392cd59ac63bca
Reviewed-on: https://chromium-review.googlesource.com/990533Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549268}
parent 280aa846
...@@ -47,7 +47,14 @@ const char kHTMLURL[] = "http://test"; ...@@ -47,7 +47,14 @@ const char kHTMLURL[] = "http://test";
// Tests that the AirPrint menu successfully loads when a normal web page is // Tests that the AirPrint menu successfully loads when a normal web page is
// loaded. // loaded.
// TODO(crbug.com/683280): Does this test serve any purpose on iOS11?
- (void)testPrintNormalPage { - (void)testPrintNormalPage {
if (base::ios::IsRunningOnIOS11OrLater() && IsUIRefreshPhase1Enabled()) {
EARL_GREY_TEST_SKIPPED(
@"Dispatcher-based printing does not work on iOS11 when the "
@"UIRefresh flag is enabled.");
}
GURL url = web::test::HttpServer::MakeUrl(kHTMLURL); GURL url = web::test::HttpServer::MakeUrl(kHTMLURL);
std::map<GURL, std::string> responses; std::map<GURL, std::string> responses;
std::string response = "Test"; std::string response = "Test";
...@@ -61,7 +68,14 @@ const char kHTMLURL[] = "http://test"; ...@@ -61,7 +68,14 @@ const char kHTMLURL[] = "http://test";
} }
// Tests that the AirPrint menu successfully loads when a PDF is loaded. // Tests that the AirPrint menu successfully loads when a PDF is loaded.
// TODO(crbug.com/683280): Does this test serve any purpose on iOS11?
- (void)testPrintPDF { - (void)testPrintPDF {
if (base::ios::IsRunningOnIOS11OrLater() && IsUIRefreshPhase1Enabled()) {
EARL_GREY_TEST_SKIPPED(
@"Dispatcher-based printing does not work on iOS11 when the "
@"UIRefresh flag is enabled.");
}
web::test::SetUpFileBasedHttpServer(); web::test::SetUpFileBasedHttpServer();
GURL url = web::test::HttpServer::MakeUrl(kPDFURL); GURL url = web::test::HttpServer::MakeUrl(kPDFURL);
chrome_test_util::LoadUrl(url); chrome_test_util::LoadUrl(url);
...@@ -73,6 +87,7 @@ const char kHTMLURL[] = "http://test"; ...@@ -73,6 +87,7 @@ const char kHTMLURL[] = "http://test";
// EarlGrey does not have the ability to interact with the share menu in // EarlGrey does not have the ability to interact with the share menu in
// iOS11, so use the dispatcher to trigger the print view controller instead. // iOS11, so use the dispatcher to trigger the print view controller instead.
if (base::ios::IsRunningOnIOS11OrLater()) { if (base::ios::IsRunningOnIOS11OrLater()) {
DCHECK(!IsUIRefreshPhase1Enabled());
[chrome_test_util::DispatcherForActiveViewController() printTab]; [chrome_test_util::DispatcherForActiveViewController() printTab];
} else { } else {
[ChromeEarlGreyUI openShareMenu]; [ChromeEarlGreyUI openShareMenu];
......
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