New issue
Advanced search Search tips

Issue 807306 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocking:
issue 794108



Sign in to add a comment

Make testSearchResultsPersistAfterEntryInspection robust for cases of memory pressure

Project Member Reported by fhorschig@chromium.org, Jan 30 2018

Issue description

Chrome Version: 66
OS: Android

What steps will reproduce the problem?
(1) Set Settings > Developer options > Don't keep activities to "on".
(2) Run SavePasswordsPreferencesTest.testSearchResultsPersistAfterEntryInspection

What is the expected result?
The search results shoudl persist after the navigation back and the test should pass.
e.g. SavePasswordsPreferences#onSaveInstanceState could store the search query and onCreate could reinstantiate the results page.

What happens instead?
The test fails, i.e. due to the excessive killing of background activities, the settings page gets recreated after the user returns from inspecting the single entry, and upon recreation fails to restore the search results.
 
Blocking: 794108
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 30 2018

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

commit 774b016f02601c9a8da69b0a5f191a6e681df053
Author: Friedrich Horschig <fhorschig@chromium.org>
Date: Tue Jan 30 19:42:50 2018

Save password search query in activity state

When under memory pressure, the activity is destroyed and the search
result lost.
By explicitly saving the query in the instance state bundle, the search
results can be recovered even though the activity is recreated.

Bug:  807306 
Change-Id: Ice12994cdeefc7ee293114207b5faa93cebda5a5
Reviewed-on: https://chromium-review.googlesource.com/893187
Reviewed-by: Theresa <twellington@chromium.org>
Commit-Queue: Friedrich Horschig <fhorschig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532998}
[modify] https://crrev.com/774b016f02601c9a8da69b0a5f191a6e681df053/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java
[modify] https://crrev.com/774b016f02601c9a8da69b0a5f191a6e681df053/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferencesTest.java

Status: Fixed (was: Assigned)
Done. The tests also cover that the search bar - not just the query - is restored to it's opened and filled state.
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 31 2018

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

commit 582aaa8638862661b3334d57af797078d0a93c77
Author: Friedrich Horschig <fhorschig@chromium.org>
Date: Wed Jan 31 16:14:04 2018

Restore save password preferences with aborted search

When the search view is collapsed, the search should be reset entirely.

Bug:  807574 ,  807306 
Change-Id: Id13eb9e119459d05751e06b515671eccacc776f2
Reviewed-on: https://chromium-review.googlesource.com/895485
Reviewed-by: Theresa <twellington@chromium.org>
Commit-Queue: Friedrich Horschig <fhorschig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533289}
[modify] https://crrev.com/582aaa8638862661b3334d57af797078d0a93c77/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java
[modify] https://crrev.com/582aaa8638862661b3334d57af797078d0a93c77/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferencesTest.java

Status: Started (was: Fixed)
Reopened: The rework in #4 broke this again - and conveniently, I accidentally removed the assertion to test that.

The small fix waits for merging: crrev/c/916601
Project Member

Comment 6 by bugdroid1@chromium.org, Feb 13 2018

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

commit d4557938aa7c9145a09114a19b435baa777ad24f
Author: Friedrich Horschig <fhorschig@chromium.org>
Date: Tue Feb 13 19:11:00 2018

Fix and test persistent password search

This CL fixes a regression of the rework happening in crrev/c/895485.

Bug:  807306 
Change-Id: Ic34dde3d328d35bb694e6f692cfd2397524eaa8e
Reviewed-on: https://chromium-review.googlesource.com/916601
Commit-Queue: Friedrich Horschig <fhorschig@chromium.org>
Reviewed-by: Theresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536409}
[modify] https://crrev.com/d4557938aa7c9145a09114a19b435baa777ad24f/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java
[modify] https://crrev.com/d4557938aa7c9145a09114a19b435baa777ad24f/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferencesTest.java

Status: Fixed (was: Started)
Cc: -vabr@chromium.org

Sign in to add a comment