New issue
Advanced search Search tips

Issue 896173 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

Flaky failure in ios_chrome_unittests.AllForms/FormStructureBrowserTest.DataDrivenHeuristics

Project Member Reported by mrsuyi@chromium.org, Oct 17

Issue description

AllForms/FormStructureBrowserTest.DataDrivenHeuristics has flaky failures on all PhoneDevices for every iOS version.

Smoke:
https://uberchromegw.corp.google.com/i/internal.bling.main/builders/smoke/builds/26191

PhoneDevice:
https://uberchromegw.corp.google.com/i/internal.bling.main/builders/iphone11-device-x64/builds/7424
 
Cc: jbudorick@chromium.org
Owner: olivierrobin@chromium.org
Status: Started (was: Untriaged)
I can reproduce by opening a lot of file handles on my machine.
This make the loading of the page fail.
Is there a way to increase the limit of file handles on the host?
Ping.
I did more investigation

The issue is when the network is bad.
The loaded page has some resources (that it does not actually need).
If the network is good, there is no problem.
If there is no network, there is no problem either as the resources are not needed.

But if the resource is really bad, the page take a long time to load.

eugenebut: is there a way to prevent the web_state from loading resources in unittests?


What kind of resource does the page have? Can we remove those resources from the page? WKWebView does not have any callbacks for blocking subresources loading (like css, images or JavaScript).
The resources are JS and CSS.

We cannot really remove them.
The files are snapshot taken from real web sites that we use to test the form extractions.
These are cross platforms.

At the moment the page is loaded loadHTML, so if we can deny access to every resources, this could work.
otherwise we can try to change the scheme of every resource (and set it to dummy://) or something similar.

WKContentRuleList may allow blocking the subresources. How come that other platforms do not have this issue? Do they block subresources load?
This seems to be exactly what I need, thanks.
I think other platforms don't have the flaky wifi issue

Project Member

Comment 8 by bugdroid1@chromium.org, Nov 21

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

commit 44c61e5b751f518dfb3e1a38f37915ac504dba07
Author: Olivier Robin <olivierrobin@chromium.org>
Date: Wed Nov 21 15:55:06 2018

Block resources in FormStructureBrowserTest.

The files used for FormStructureBrowserTest are snapshots of real web
sites. They can have link to online resources but should not need them
for the test to pass.
But if the network is really bad, the page can wait for the resource
loading to finish and timeout.
Preventing the resource loading will make the test faster and more
robust.

Bug: 896173
Change-Id: I78f180aca959c50996b1af932cc31c1690795038
Reviewed-on: https://chromium-review.googlesource.com/c/1343089
Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Reviewed-by: Moe Ahmadi <mahmadi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610079}
[modify] https://crrev.com/44c61e5b751f518dfb3e1a38f37915ac504dba07/ios/chrome/browser/autofill/form_structure_browsertest.mm
[modify] https://crrev.com/44c61e5b751f518dfb3e1a38f37915ac504dba07/ios/web/public/test/web_test_with_web_state.h
[modify] https://crrev.com/44c61e5b751f518dfb3e1a38f37915ac504dba07/ios/web/public/test/web_test_with_web_state.mm

Project Member

Comment 9 by bugdroid1@chromium.org, Nov 21

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

commit 6bf9f30904f1c3681ddc840fe18d3972d03f40f5
Author: Anders Ruud <andruud@chromium.org>
Date: Wed Nov 21 16:09:37 2018

Revert "Block resources in FormStructureBrowserTest."

This reverts commit 44c61e5b751f518dfb3e1a38f37915ac504dba07.

Reason for revert: Broke compile on ios-webview: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8929233980627121728/+/steps/compile/0/stdout

Original change's description:
> Block resources in FormStructureBrowserTest.
> 
> The files used for FormStructureBrowserTest are snapshots of real web
> sites. They can have link to online resources but should not need them
> for the test to pass.
> But if the network is really bad, the page can wait for the resource
> loading to finish and timeout.
> Preventing the resource loading will make the test faster and more
> robust.
> 
> Bug: 896173
> Change-Id: I78f180aca959c50996b1af932cc31c1690795038
> Reviewed-on: https://chromium-review.googlesource.com/c/1343089
> Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
> Reviewed-by: Eugene But <eugenebut@chromium.org>
> Reviewed-by: Moe Ahmadi <mahmadi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#610079}

TBR=eugenebut@chromium.org,olivierrobin@chromium.org,mahmadi@chromium.org

Change-Id: Ia64b9afb000f40aa17a7b2fb66c0b213666c1fd8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 896173
Reviewed-on: https://chromium-review.googlesource.com/c/1346832
Reviewed-by: Anders Ruud <andruud@chromium.org>
Commit-Queue: Anders Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610088}
[modify] https://crrev.com/6bf9f30904f1c3681ddc840fe18d3972d03f40f5/ios/chrome/browser/autofill/form_structure_browsertest.mm
[modify] https://crrev.com/6bf9f30904f1c3681ddc840fe18d3972d03f40f5/ios/web/public/test/web_test_with_web_state.h
[modify] https://crrev.com/6bf9f30904f1c3681ddc840fe18d3972d03f40f5/ios/web/public/test/web_test_with_web_state.mm

Project Member

Comment 10 by bugdroid1@chromium.org, Nov 22

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

commit d15dd85fbe28ee8991802c55314bc97c0ee8a7cf
Author: Olivier Robin <olivierrobin@chromium.org>
Date: Thu Nov 22 10:38:10 2018

[Reland] Block resources in FormStructureBrowserTest.

The files used for FormStructureBrowserTest are snapshots of real web
sites. They can have link to online resources but should not need them
for the test to pass.
But if the network is really bad, the page can wait for the resource
loading to finish and timeout.
Preventing the resource loading will make the test faster and more
robust.

Bug: 896173
Change-Id: I16b02e1d7defd4d950e6ee4cd21bd0133b9ac957
Reviewed-on: https://chromium-review.googlesource.com/c/1346462
Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610366}
[modify] https://crrev.com/d15dd85fbe28ee8991802c55314bc97c0ee8a7cf/ios/chrome/browser/autofill/form_structure_browsertest.mm
[modify] https://crrev.com/d15dd85fbe28ee8991802c55314bc97c0ee8a7cf/ios/web/public/test/web_test_with_web_state.h
[modify] https://crrev.com/d15dd85fbe28ee8991802c55314bc97c0ee8a7cf/ios/web/public/test/web_test_with_web_state.mm

Project Member

Comment 11 by bugdroid1@chromium.org, Nov 22

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

commit f1bd7cf601c4712f31e9c5240c69fb0c283cfca2
Author: Olivier Robin <olivierrobin@chromium.org>
Date: Thu Nov 22 10:58:14 2018

Revert "[Reland] Block resources in FormStructureBrowserTest."

This reverts commit d15dd85fbe28ee8991802c55314bc97c0ee8a7cf.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> [Reland] Block resources in FormStructureBrowserTest.
> 
> The files used for FormStructureBrowserTest are snapshots of real web
> sites. They can have link to online resources but should not need them
> for the test to pass.
> But if the network is really bad, the page can wait for the resource
> loading to finish and timeout.
> Preventing the resource loading will make the test faster and more
> robust.
> 
> Bug: 896173
> Change-Id: I16b02e1d7defd4d950e6ee4cd21bd0133b9ac957
> Reviewed-on: https://chromium-review.googlesource.com/c/1346462
> Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
> Reviewed-by: Eugene But <eugenebut@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#610366}

TBR=eugenebut@chromium.org,olivierrobin@chromium.org

Change-Id: I6628a9daa5b9d5a28b3cd9cda86272fe22dec8c6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 896173
Reviewed-on: https://chromium-review.googlesource.com/c/1347284
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610372}
[modify] https://crrev.com/f1bd7cf601c4712f31e9c5240c69fb0c283cfca2/ios/chrome/browser/autofill/form_structure_browsertest.mm
[modify] https://crrev.com/f1bd7cf601c4712f31e9c5240c69fb0c283cfca2/ios/web/public/test/web_test_with_web_state.h
[modify] https://crrev.com/f1bd7cf601c4712f31e9c5240c69fb0c283cfca2/ios/web/public/test/web_test_with_web_state.mm

Project Member

Comment 12 by bugdroid1@chromium.org, Nov 22

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

commit 7cbbce326c5e6dfb6c8c14f6fe2e396b8997f015
Author: Olivier Robin <olivierrobin@chromium.org>
Date: Thu Nov 22 14:26:15 2018

Reland "[Reland] Block resources in FormStructureBrowserTest."

This is a reland of d15dd85fbe28ee8991802c55314bc97c0ee8a7cf

Original change's description:
> [Reland] Block resources in FormStructureBrowserTest.
>
> The files used for FormStructureBrowserTest are snapshots of real web
> sites. They can have link to online resources but should not need them
> for the test to pass.
> But if the network is really bad, the page can wait for the resource
> loading to finish and timeout.
> Preventing the resource loading will make the test faster and more
> robust.
>
> Bug: 896173
> Change-Id: I16b02e1d7defd4d950e6ee4cd21bd0133b9ac957
> Reviewed-on: https://chromium-review.googlesource.com/c/1346462
> Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
> Reviewed-by: Eugene But <eugenebut@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#610366}

Tbr: eugenebut@chromium.org
Bug: 896173
Change-Id: I713942404ec5ab47fb653f4fc2c04214f66fa866
Reviewed-on: https://chromium-review.googlesource.com/c/1348032
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610407}
[modify] https://crrev.com/7cbbce326c5e6dfb6c8c14f6fe2e396b8997f015/ios/chrome/browser/autofill/form_structure_browsertest.mm
[modify] https://crrev.com/7cbbce326c5e6dfb6c8c14f6fe2e396b8997f015/ios/web/public/test/web_test_with_web_state.h
[modify] https://crrev.com/7cbbce326c5e6dfb6c8c14f6fe2e396b8997f015/ios/web/public/test/web_test_with_web_state.mm

Sign in to add a comment