Test ClearBrowsingDataPreferencesTest#testImportantSitesDialogNoFiltering failure
Reported by
gordana....@mips.com,
Apr 10 2018
|
|
Issue descriptionSteps to reproduce the problem: 1. Build ChromiumPublic.apk 2. Turn off wifi on the device 3. Run the test: out-gn/chromium-android/bin/run_chrome_public_test_apk --gtest-filter=ClearBrowsingDataPreferencesTest#testImportantSitesDialogNoFiltering What is the expected behavior? Test to pass. What went wrong? Test failed with error: chromium: [INFO:CONSOLE(0)] "Blocked script execution in 'http://127.0.0.1:39719/chrome/test/data/android/storage_persistance.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.", source: http://127.0.0.1:39719/chrome/test/data/android/storage_persistance.html (0) Did this work before? No Chrome version: r537781 Channel: dev OS Version: Nougat mr2 Flash Version: It happens that test testImportantSitesDialogNoFiltering fails when wifi is turned off if the page is completely loaded before important dialog is shown. The test fails with error: chromium: [INFO:CONSOLE(0)] "Blocked script execution in 'http://127.0.0.1:39719/chrome/test/data/android/storage_persistance.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.", source: http://127.0.0.1:39719/chrome/test/data/android/storage_persistance.html (0) This actually happens due to page being completely loaded in loadUrl(): https://cs.chromium.org/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferencesTest.java?l=418 before important dialog is being shown: https://cs.chromium.org/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferencesTest.java?l=428 i.e. WebContentsImpl::DocumentOnLoadCompleted() is called https://cs.chromium.org/chromium/src/content/browser/web_contents/web_contents_impl.cc?l=5289 which consequently sets current_page_quality_ to PageQuality::HIGH: https://cs.chromium.org/chromium/src/components/offline_pages/core/snapshot_controller.cc?l=161 so that once a dialog is shown and OnHide() is called this check in recent_tab_helper.cc is not satisfied: https://cs.chromium.org/chromium/src/chrome/browser/offline_pages/recent_tab_helper.cc?l=324 and last_n snapshot is created. If the snapshot is created, in the next loadUrl() call: https://cs.chromium.org/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferencesTest.java?l=435 attempt to load an offline page will be made: https://cs.chromium.org/chromium/src/chrome/browser/offline_pages/offline_page_request_job.cc?l=919 but it will fail with result = -1 for file_path = /data/user/0/org.chromium.chrome/cache/Offline Pages/archives/7c482bec-4e72-4345-ae0e-025e5f845a3f.mhtml |
|
►
Sign in to add a comment |
|
Comment 1 by dtapu...@chromium.org
, Apr 10 2018