Commit 8bfc4250 authored by Eugene But's avatar Eugene But Committed by Commit Bot

[ios] Increase timeout for ARQuickLookEGTest to address EG2 flakiness

Bug: 1060374
Change-Id: I75f2df23ef35ff16e912fd0c037333a329bdd459
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2097333
Commit-Queue: Ali Juma <ajuma@chromium.org>
Auto-Submit: Eugene But <eugenebut@chromium.org>
Reviewed-by: default avatarAli Juma <ajuma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749218}
parent 97929c95
...@@ -37,6 +37,11 @@ using base::test::ios::kWaitForUIElementTimeout; ...@@ -37,6 +37,11 @@ using base::test::ios::kWaitForUIElementTimeout;
namespace { namespace {
#if defined(CHROME_EARL_GREY_2)
// Use separate timeout for EG2 tests to accomodate for IPC delays.
const NSTimeInterval kWaitForARPresentationTimeout = 30.0;
#endif // CHROME_EARL_GREY_2
// USDZ landing page and download request handler. // USDZ landing page and download request handler.
std::unique_ptr<net::test_server::HttpResponse> GetResponse( std::unique_ptr<net::test_server::HttpResponse> GetResponse(
const net::test_server::HttpRequest& request) { const net::test_server::HttpRequest& request) {
...@@ -111,8 +116,9 @@ std::unique_ptr<net::test_server::HttpResponse> GetResponse( ...@@ -111,8 +116,9 @@ std::unique_ptr<net::test_server::HttpResponse> GetResponse(
// presentation. // presentation.
XCUIApplication* app = [[XCUIApplication alloc] init]; XCUIApplication* app = [[XCUIApplication alloc] init];
XCUIElement* goodTitle = app.staticTexts[@"good"]; XCUIElement* goodTitle = app.staticTexts[@"good"];
GREYAssert([goodTitle waitForExistenceWithTimeout:kWaitForDownloadTimeout], GREYAssert(
@"AR preview dialog UI was not presented"); [goodTitle waitForExistenceWithTimeout:kWaitForARPresentationTimeout],
@"AR preview dialog UI was not presented");
#else #else
#error Must define either CHROME_EARL_GREY_1 or CHROME_EARL_GREY_2. #error Must define either CHROME_EARL_GREY_1 or CHROME_EARL_GREY_2.
#endif #endif
...@@ -143,7 +149,7 @@ std::unique_ptr<net::test_server::HttpResponse> GetResponse( ...@@ -143,7 +149,7 @@ std::unique_ptr<net::test_server::HttpResponse> GetResponse(
XCUIApplication* app = [[XCUIApplication alloc] init]; XCUIApplication* app = [[XCUIApplication alloc] init];
XCUIElement* goodTitle = app.staticTexts[@"good"]; XCUIElement* goodTitle = app.staticTexts[@"good"];
GREYAssertFalse( GREYAssertFalse(
[goodTitle waitForExistenceWithTimeout:kWaitForDownloadTimeout], [goodTitle waitForExistenceWithTimeout:kWaitForARPresentationTimeout],
@"AR preview dialog UI was presented"); @"AR preview dialog UI was presented");
#else #else
#error Must define either CHROME_EARL_GREY_1 or CHROME_EARL_GREY_2. #error Must define either CHROME_EARL_GREY_1 or CHROME_EARL_GREY_2.
...@@ -175,7 +181,7 @@ std::unique_ptr<net::test_server::HttpResponse> GetResponse( ...@@ -175,7 +181,7 @@ std::unique_ptr<net::test_server::HttpResponse> GetResponse(
XCUIApplication* app = [[XCUIApplication alloc] init]; XCUIApplication* app = [[XCUIApplication alloc] init];
XCUIElement* goodTitle = app.staticTexts[@"good"]; XCUIElement* goodTitle = app.staticTexts[@"good"];
GREYAssertFalse( GREYAssertFalse(
[goodTitle waitForExistenceWithTimeout:kWaitForDownloadTimeout], [goodTitle waitForExistenceWithTimeout:kWaitForARPresentationTimeout],
@"AR preview dialog UI was presented"); @"AR preview dialog UI was presented");
#else #else
#error Must define either CHROME_EARL_GREY_1 or CHROME_EARL_GREY_2. #error Must define either CHROME_EARL_GREY_1 or CHROME_EARL_GREY_2.
...@@ -207,7 +213,7 @@ std::unique_ptr<net::test_server::HttpResponse> GetResponse( ...@@ -207,7 +213,7 @@ std::unique_ptr<net::test_server::HttpResponse> GetResponse(
XCUIApplication* app = [[XCUIApplication alloc] init]; XCUIApplication* app = [[XCUIApplication alloc] init];
XCUIElement* goodTitle = app.staticTexts[@"good"]; XCUIElement* goodTitle = app.staticTexts[@"good"];
GREYAssertFalse( GREYAssertFalse(
[goodTitle waitForExistenceWithTimeout:kWaitForDownloadTimeout], [goodTitle waitForExistenceWithTimeout:kWaitForARPresentationTimeout],
@"AR preview dialog UI was presented"); @"AR preview dialog UI was presented");
#else #else
#error Must define either CHROME_EARL_GREY_1 or CHROME_EARL_GREY_2. #error Must define either CHROME_EARL_GREY_1 or CHROME_EARL_GREY_2.
......
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