New issue
Advanced search Search tips

Issue 693517 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

StackViewTestCase.testCloseAllTabs is flaky on simulator

Project Member Reported by lpromero@chromium.org, Feb 17 2017

Issue description

App Version (from "Chrome Settings > About Chrome"): 946d9b8
iOS Version: all
Device: Simulators

StackViewTestCase.testCloseAllTabs: 
../../ios/chrome/browser/ui/stack_view/stack_view_egtest.mm:58: error: -[StackViewTestCase testCloseAllTabs] : Exception: NoMatchingElementException

Exception Name: NoMatchingElementException
Exception Reason: UI element cannot be found.Exception with Assertion: {
  "Assert Criteria" : "assertWithMatcher: (matcherForSufficientlyVisible(>=0.750000) && notNil)",
  "Element Matcher" : "View matching (null)",
  "Recovery Suggestion" : "Check if element exists in the UI, modify assert criteria, or adjust element matcher"
}

Exception Details: Error Trace: [
  {
    "Description" : "Interaction cannot continue because the desired element was not found.",
    "Domain" : "com.google.earlgrey.ElementInteractionErrorDomain",
    "Code" : "0",
    "File Name" : "GREYElementInteraction.m",
    "Function Name" : "-[GREYElementInteraction matchedElementsWithTimeout:error:]",
    "Line" : "142",
    "TestCase Class" : "StackViewTestCase",
    "TestCase Method" : "testCloseAllTabs"
  }
]


Bundle ID: com.google.gtest.ios-chrome-ui-egtests

Stack Trace: (
	0   EarlGrey                            0x000000011d968ad0 -[GREYDefaultFailureHandler handleException:details:] + 1488
	1   EarlGrey                            0x000000011d95c19d -[GREYElementInteraction grey_handleFailureOfAssertion:assertionError:userProvidedOutError:] + 4765
	2   EarlGrey                            0x000000011d95896e __39-[GREYElementInteraction assert:error:]_block_invoke + 2158
	3   EarlGrey                            0x000000011d983eb4 __59-[GREYUIThreadExecutor executeSyncWithTimeout:block:error:]_block_invoke + 68
	4   EarlGrey                            0x000000011d980b60 __54-[GREYRunLoopSpinner grey_checkConditionInActiveMode:]_block_invoke + 384
	5   CoreFoundation                      0x000000011abe225c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
	6   CoreFoundation                      0x000000011abc7304 __CFRunLoopDoBlocks + 356
	7   CoreFoundation                      0x000000011abc6a75 __CFRunLoopRun + 901
	8   CoreFoundation                      0x000000011abc6494 CFRunLoopRunSpecific + 420
	9   EarlGrey                            0x000000011d9808cf -[GREYRunLoopSpinner grey_checkConditionInActiveMode:] + 399
	10  EarlGrey                            0x000000011d97f6a7 -[GREYRunLoopSpinner spinWithStopConditionBlock:] + 983
	11  EarlGrey                            0x000000011d983b03 -[GREYUIThreadExecutor executeSyncWithTimeout:block:error:] + 1491
	12  EarlGrey                            0x000000011d957879 -[GREYElementInteraction assert:error:] + 2121
	13  EarlGrey                            0x000000011d958c92 -[GREYElementInteraction assertWithMatcher:error:] + 146
	14  EarlGrey                            0x000000011d958bcf -[GREYElementInteraction assertWithMatcher:] + 79
	15  ios_chrome_ui_egtests               0x000000010f847a80 _ZN12_GLOBAL__N_127CheckForStackViewVisibilityEb + 672
	16  ios_chrome_ui_egtests               0x000000010f842f8c _ZN12_GLOBAL__N_113OpenStackViewEv + 540
	17  ios_chrome_ui_egtests               0x000000010f845d20 _ZN12_GLOBAL__N_113OpenToolsMenuEv + 16
	18  ios_chrome_ui_egtests               0x000000010f845ab0 _ZN12_GLOBAL__N_133OpenNewIncognitoTabUsingStackViewEv + 16
	19  ios_chrome_ui_egtests               0x000000010f8432e3 -[StackViewTestCase testCloseAllTabs] + 99
	20  CoreFoundation                      0x000000011abc405c __invoking___ + 140
	21  CoreFoundation                      0x000000011abc3ee1 -[NSInvocation invoke] + 289
	22  EarlGrey                            0x000000011d94c4a8 -[GREYTestCaseInvocation invoke] + 104
	23  XCTest                              0x000000011bea4f77 __24-[XCTestCase invokeTest]_block_invoke_2 + 481
	24  XCTest                              0x000000011bedd7df -[XCTestContext performInScope:] + 190
	25  XCTest                              0x000000011bea4d83 -[XCTestCase invokeTest] + 255
	26  EarlGrey                            0x000000011d93c79e -[XCTestCase(GREYAdditions) grey_invokeTest] + 1230
	27  XCTest                              0x000000011bea559c -[XCTestCase performTest:] + 457
	28  XCTest                              0x000000011bea2664 -[XCTestSuite performTest:] + 491
	29  XCTest                              0x000000011bea2664 -[XCTestSuite performTest:] + 491
	30  XCTest                              0x000000011bea2664 -[XCTestSuite performTest:] + 491
	31  XCTest                              0x000000011be8e618 __25-[XCTestDriver _runSuite]_block_invoke + 51
	32  XCTest                              0x000000011beafd2b -[XCTestObservationCenter _observeTestExecutionForBlock:] + 602
	33  XCTest                              0x000000011be8e4b5 -[XCTestDriver _runSuite] + 436
	34  XCTest                              0x000000011be8f302 -[XCTestDriver _checkForTestManager] + 287
	35  XCTest                              0x000000011beded67 _XCTestMain + 628
	36  CoreFoundation                      0x000000011abe225c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
	37  CoreFoundation                      0x000000011abc7304 __CFRunLoopDoBlocks + 356
	38  CoreFoundation                      0x000000011abc6a75 __CFRunLoopRun + 901
	39  CoreFoundation                      0x000000011abc6494 CFRunLoopRunSpecific + 420
	40  GraphicsServices                    0x0000000120455a6f GSEventRunModal + 161
	41  UIKit                               0x00000001192fdf34 UIApplicationMain + 159
	42  ios_chrome_ui_egtests               0x000000010e3bf5db main + 1051
	43  libdyld.dylib                       0x000000012292668d start + 1
	44  ???                                 0x0000000000000005 0x0 + 5
)
https://uberchromegw.corp.google.com/i/internal.bling.main/builders/iphone10-simulator-x64/builds/3822/steps/ios_chrome_ui_egtests%20%28iPhone%205s%20iOS%2010.0%29%20on%20Mac/logs/StackViewTestCase.testCloseAllTabs
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/df0a54379f002c5e6f6b8c78816da930da60ca12

commit df0a54379f002c5e6f6b8c78816da930da60ca12
Author: lpromero <lpromero@chromium.org>
Date: Fri Feb 17 13:20:14 2017

Mark StackViewTestCase.testCloseAllTabs as flaky on simulator

BUG= 693517 
TBR=kkhorimoto@chromium.org

Review-Url: https://codereview.chromium.org/2702713002
Cr-Commit-Position: refs/heads/master@{#451292}

[modify] https://crrev.com/df0a54379f002c5e6f6b8c78816da930da60ca12/ios/chrome/browser/ui/stack_view/stack_view_egtest.mm

Labels: -Restrict-View-Google
Status: Started (was: Assigned)
https://codereview.chromium.org/2706403006

Comment 4 by cma...@chromium.org, Feb 28 2017

ping!
Project Member

Comment 5 by bugdroid1@chromium.org, Mar 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/389418d676c37f1c98ac289da1b57b68888bd701

commit 389418d676c37f1c98ac289da1b57b68888bd701
Author: kkhorimoto <kkhorimoto@chromium.org>
Date: Tue Mar 07 23:47:30 2017

Check that tab switcher is active/inactive before visibility check.

As shown in the referenced bug, testCloseAllTabs was failing because the
stack view visibility check was checking for a nil stack view.  This is
likely occurring because the visibility check was occurring before the
touch event that should show the tab switcher is handled.  Adding this
condition will wait for the touch event to be handled before checking
for visibility.

BUG= 693517 

Review-Url: https://codereview.chromium.org/2706403006
Cr-Commit-Position: refs/heads/master@{#455293}

[modify] https://crrev.com/389418d676c37f1c98ac289da1b57b68888bd701/ios/chrome/browser/ui/stack_view/BUILD.gn
[modify] https://crrev.com/389418d676c37f1c98ac289da1b57b68888bd701/ios/chrome/browser/ui/stack_view/stack_view_egtest.mm

Labels: Merge-Request-58
Status: Fixed (was: Started)
Project Member

Comment 7 by sheriffbot@chromium.org, Mar 8 2017

Labels: -Merge-Request-58 Hotlist-Merge-Approved Merge-Approved-58
Your change meets the bar and is auto-approved for M58. Please go ahead and merge the CL to branch 3029 manually. Please contact milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), bhthompson@(cros), govind@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 8 by bugdroid1@chromium.org, Mar 8 2017

Labels: -merge-approved-58 merge-merged-3029
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/93e9aa4f35bdab24144198126026bfd57ba6af48

commit 93e9aa4f35bdab24144198126026bfd57ba6af48
Author: Kurt Horimoto <kkhorimoto@chromium.org>
Date: Wed Mar 08 01:25:16 2017

Check that tab switcher is active/inactive before visibility check.

As shown in the referenced bug, testCloseAllTabs was failing because the
stack view visibility check was checking for a nil stack view.  This is
likely occurring because the visibility check was occurring before the
touch event that should show the tab switcher is handled.  Adding this
condition will wait for the touch event to be handled before checking
for visibility.

BUG= 693517 

Review-Url: https://codereview.chromium.org/2706403006
Cr-Commit-Position: refs/heads/master@{#455293}
(cherry picked from commit 389418d676c37f1c98ac289da1b57b68888bd701)

Review-Url: https://codereview.chromium.org/2734283002 .
Cr-Commit-Position: refs/branch-heads/3029@{#56}
Cr-Branched-From: 939b32ee5ba05c396eef3fd992822fcca9a2e262-refs/heads/master@{#454471}

[modify] https://crrev.com/93e9aa4f35bdab24144198126026bfd57ba6af48/ios/chrome/browser/ui/stack_view/BUILD.gn
[modify] https://crrev.com/93e9aa4f35bdab24144198126026bfd57ba6af48/ios/chrome/browser/ui/stack_view/stack_view_egtest.mm

Sign in to add a comment