Chromium Code Reviews
DescriptionReland of predictors: Basic browsertest checks predictor learning.
Reason for reland:
The reason of the test flakiness was fixed.
ResourcePrefetchPredictor needs to be initialized before learn any
data. Initialization starts when the first main frame load complete for
given profile. In our case it was about:blank page after tab creation.
This initialization requires work in DB thread to be done. So there was
a race condition in which next navigation could appear earlier than
initialization in DB thread will be done.
This bug could be easily reproduced by adding sleep in
ResourcePrefetchPredictorTables::GetAllData function.
For now we explicitly check that initialization of
ResourcePrefetchPredictor was done before any navigation.
Original issue's description:
> Revert of predictors: Basic browsertest checks predictor learning. (patchset #9 id:160001 of https://codereview.chromium.org/2449323005/ )
>
> Reason for revert:
> Created a flaky test: first occurrence at
>
> https://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%281%29/builds/28933
>
> Original issue's description:
> > predictors: Basic browsertest checks predictor learning.
> >
> > First stage for implementing ResourcePrefetchPredictor browsertests is to check
> > that the prefetch database is really filled after some navigations in browser.
> > Browsertest class provides convenient way to declare expected resources in the
> > test and then checks expectations internally that allows to write readable
> > tests.
> >
> > BUG=650253
> >
> > Committed: https://crrev.com/e636e3bcc172f220dfadfd2121d238c9908185bb
> > Cr-Commit-Position: refs/heads/master@{#429966}
>
> TBR=pasko@chromium.org,lizeb@chromium.org,alexilin@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=650253
>
> Committed: https://crrev.com/3250e71949fa7d226e9c843ee28277b988306229
> Cr-Commit-Position: refs/heads/master@{#430137}
BUG=650253
Committed: https://crrev.com/f2d707775a8184e7bd18d2334ff2a679f3a90439
Cr-Commit-Position: refs/heads/master@{#430561}
Patch Set 1 #Patch Set 2 : Wait for ResourcePrefetchPredictor initialization. #
Total comments: 2
Patch Set 3 : Ensure initialization earlier. #Patch Set 4 : Rebase. #Messages
Total messages: 25 (14 generated)
|