[Nav Bug] Only cache session when disabling web usage and add inttest.
This is a logic bug introduced in crrev.com/c/789791. If SetWebUsageEnabled(true) is called twice consecutively, the session at the time of the first call will incorrectly be restored during the second call. The navigation history between the two calls will be lost. This was exposed in TabUsageRecorderTestCase/testColdLaunchReloadCount egtest. Bug: 781916 Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs Change-Id: I6f7226fb42ba7d647b9229514a574afc57703ae3 Reviewed-on: https://chromium-review.googlesource.com/803740Reviewed-by:Eugene But <eugenebut@chromium.org> Commit-Queue: Danyao Wang <danyao@chromium.org> Cr-Commit-Position: refs/heads/master@{#521123}
Showing
Please register or sign in to comment