New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 709131 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Evaluate and re-enable testLanguageDetectionInfobar and testAutoTranslate

Project Member Reported by liaoyuke@chromium.org, Apr 6 2017

Issue description

testLanguageDetectionInfobar and testAutoTranslate rely on wireless connection and these two tests fail reliably when running on devices with WIFI turned off.

Please evaluated if this test can be converted to not rely on wireless connection, if not, maybe considering moving this test to ExternalURLTestCase.
 
Hi Sylvain,

I'm assigning this to you because you are the owner of the translate feature.

Please re-assign if necessary.
Labels: -Pri-3 Pri-1
Cc: cma...@chromium.org

Comment 4 by cma...@chromium.org, Apr 17 2017

sdefresne@ will be back on 04/18
Labels: -ReleaseBlock-Beta
Those tests uses server-side translation, so will move them to ExternalURLTestCase. Removing the RBB label as moving them to that target is not blocking RBB.

Comment 6 Deleted

Comment 7 by cma...@chromium.org, Apr 19 2017

Labels: -ReleaseBlock-Beta
My bad. All good!
It is currently not possible to enable the tests if the network can go out as TranslateManager checks whether the device/simulator is connected to the network and abort the translation attempt if it is not (look for "if (net::NetworkChangeNotifier::IsOffline())" in TranslateManager::InitiateTranslation).


Note that there is a way to disable the NetworkChangeNotifier (via the creation of a net::NetworkChangeNotifier::DisableForTest instance) but resetting the NetworkChangeNotifier is not thread-safe and must be done before any thread tries to access the notifier, thus cannot be limited to just that test (as EG tests are integration tests, not unit tests, and thus other threads may be trying to access the singleton).
Since TranslateManager checks whether there is internet connection or not, instead of failing the test in case there is no network can we just skipped it?
Labels: ReleaseBlock-Beta
I would like to keep ReleaseBlock-Beta on this bug until we know what we want to do with it.
If the connection is flaky, it could be up when the test start, and down when TranslateManager checks it. There is no way to reliably skip the test if the network connection can disappear at any point. The only real option is to move this to external_url test suite that is expected to have flakes related to network.
BTW, all the tests in that test suite do fail if the network connection is down, however, since most of the test check that the translation infobar does not show up, they silently succeed but for the wrong reason (not because the condition tested but because of a lack of connectivity).
Project Member

Comment 14 by bugdroid1@chromium.org, Apr 20 2017

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

commit 9c339d21265de50d043f7ecb63ee96bf5fc221e2
Author: sdefresne <sdefresne@chromium.org>
Date: Thu Apr 20 08:03:10 2017

[ios] Create a new EG test suite for test depending on network.

Add a new EG test suite ios_chrome_external_url_egtests for tests
that have dependency on a working network connection (will be run
on dedicated bots).

Move all translate EG tests to the ios_chrome_external_url_egtests
as TranslateManager checks whether the network connection is up
before attempting the translation (note that all tests are moved
even though referenced bug only mention two tests, as the other
tests checks that the translation do not happens and succeed for
incorrect reason).

BUG= 709131 

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

[modify] https://crrev.com/9c339d21265de50d043f7ecb63ee96bf5fc221e2/ios/chrome/browser/translate/BUILD.gn
[modify] https://crrev.com/9c339d21265de50d043f7ecb63ee96bf5fc221e2/ios/chrome/browser/translate/translate_egtest.mm
[modify] https://crrev.com/9c339d21265de50d043f7ecb63ee96bf5fc221e2/ios/chrome/test/earl_grey/BUILD.gn

Project Member

Comment 15 by bugdroid1@chromium.org, Apr 20 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/ios_internal.git/+/0b3853960ef16fabca3bcc2c17a30429f3ad0e11

commit 0b3853960ef16fabca3bcc2c17a30429f3ad0e11
Author: sdefresne <sdefresne@google.com>
Date: Thu Apr 20 11:24:31 2017

Status: Fixed (was: Assigned)
Labels: Merge-TBD
[Auto-generated comment by a script] We noticed that this issue is targeted for M-59; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-59 label, otherwise remove Merge-TBD label. Thanks.
Labels: -Merge-TBD
Components: Tests>Disabled
Labels: Test-Disabled

Sign in to add a comment