Tests aren't working in android N |
||||||||
Issue descriptionChrome Version: (copy from chrome://version) OS: (e.g. Win7, OSX 10.9.5, etc...) What steps will reproduce the problem? (1) Build chrome_public_test_apk (2) Run chrome_public_test_apk What is the expected result? The tests should display an error about why the test failed. What happens instead? The tests show the following stack trace. C 380.418s Main java.lang.SecurityException: COLUMN_LOCAL_FILENAME is deprecated; use ContentResolver.openFileDescriptor() instead C 380.418s Main at android.app.DownloadManager$CursorTranslator.getString(DownloadManager.java:1499) C 380.418s Main at org.chromium.chrome.browser.download.DownloadTestRule.getPathFromCursor(DownloadTestRule.java:142) C 380.418s Main at org.chromium.chrome.browser.download.DownloadTestRule.cleanUpAllDownloads(DownloadTestRule.java:121) C 380.418s Main at org.chromium.chrome.browser.download.DownloadTestRule.setUp(DownloadTestRule.java:228) C 380.418s Main at org.chromium.chrome.browser.download.DownloadTestRule.access$200(DownloadTestRule.java:40) C 380.418s Main at org.chromium.chrome.browser.download.DownloadTestRule$1.evaluate(DownloadTestRule.java:218) C 380.418s Main at org.chromium.chrome.test.ChromeActivityTestRule$1.evaluate(ChromeActivityTestRule.java:65) C 380.418s Main at android.support.test.internal.statement.UiThreadStatement.evaluate(UiThreadStatement.java:55) C 380.419s Main at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:270) C 380.419s Main at org.junit.rules.RunRules.evaluate(RunRules.java:20) C 380.419s Main at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) C 380.419s Main at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) C 380.419s Main at org.chromium.base.test.BaseJUnit4ClassRunner.runChild(BaseJUnit4ClassRunner.java:175) C 380.419s Main at org.chromium.base.test.BaseJUnit4ClassRunner.runChild(BaseJUnit4ClassRunner.java:40) C 380.419s Main at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) C 380.419s Main at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) C 380.419s Main at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) C 380.419s Main at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) C 380.419s Main at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) C 380.419s Main at org.junit.runners.ParentRunner.run(ParentRunner.java:363) C 380.419s Main at org.chromium.base.test.BaseJUnit4ClassRunner.run(BaseJUnit4ClassRunner.java:164) C 380.419s Main at org.junit.runners.Suite.runChild(Suite.java:128) C 380.420s Main at org.junit.runners.Suite.runChild(Suite.java:27) C 380.420s Main at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) C 380.420s Main at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) C 380.420s Main at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) C 380.420s Main at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) C 380.420s Main at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) C 380.438s Main at org.junit.runners.ParentRunner.run(ParentRunner.java:363) C 380.438s Main at org.junit.runner.JUnitCore.run(JUnitCore.java:137) C 380.438s Main at org.junit.runner.JUnitCore.run(JUnitCore.java:115) C 380.438s Main at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:59) C 380.438s Main at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:262) C 380.438s Main at org.chromium.base.test.BaseChromiumAndroidJUnitRunner.onStart(BaseChromiumAndroidJUnitRunner.java:98) C 380.438s Main at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1932)
,
Sep 15 2017
Min could you take a look/do you know who originally wrote it and should investigate? Thanks!
,
Oct 9 2017
The use of "local_filename" was initially added by Bo in a CL in 2011 in downstream Clank, the CL has hash I492b785c93d506ccf247f754b51338ad526ddfd7. That was a long time ago ;)
,
Oct 9 2017
,
Oct 9 2017
,
Oct 9 2017
qinmin@ I'm stealing this from you and will upload a potential fix soon, for you to review. I'm not familiar with this code so please review with care :)
,
Oct 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0d8aff019b81c4d17a3add4a94473500e2f52b8b commit 0d8aff019b81c4d17a3add4a94473500e2f52b8b Author: Gustav Sennton <gsennton@google.com> Date: Wed Oct 11 18:00:48 2017 [test] Remove use of deprecated DownloadManager constant. DownloadManager.COLUMN_LOCAL_FILENAME was deprecated in Nougat. This CL removes the use of that constant, by fetching the filename of a downloaded file using the DownloadManager.COLUMN_TITLE constant. BUG= 765498 Change-Id: I2a8eb008a76c5d8f6e41140dd1a4fc762da14eb7 Reviewed-on: https://chromium-review.googlesource.com/707594 Reviewed-by: Min Qin <qinmin@chromium.org> Commit-Queue: Gustav Sennton <gsennton@chromium.org> Cr-Commit-Position: refs/heads/master@{#508031} [modify] https://crrev.com/0d8aff019b81c4d17a3add4a94473500e2f52b8b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadTestRule.java
,
Oct 12 2017
This landed in https://build.chromium.org/p/chromium.android.fyi/builders/Nougat%20Phone%20Tester/builds/3989 and the DownloadTests are no longer failing :D
,
Nov 20 2017
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by danielpark@chromium.org
, Sep 15 2017