New issue
Advanced search Search tips

Issue 779255 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

org.chromium.chrome.browser.tabmodel.UndoTabModelTest fails on Android O

Project Member Reported by mariakho...@chromium.org, Oct 27 2017

Issue description

From: https://luci-logdog.appspot.com/v/?s=chromium%2Fandroid%2Fswarming%2Flogcats%2F397755a3e0c58a11%2F%2B%2Flogcat_logcat_org.chromium.chrome.browser.payments.CurrencyFormatterTest.testMultipleConversions_20171027T155503-UTC_01e8f4600ce4c8e7

org.chromium.chrome.browser.tabmodel.UndoTabModelTest#testOpenRecentlyClosedTabMultiWindowFallback

 823.997s run_tests_on_device(FA6AB0304324)    INSTRUMENTATION_STATUS: stack=java.lang.AssertionError: Window 2 should have 2 tab. expected:<2> but was:<3>
I  823.997s run_tests_on_device(FA6AB0304324)    	at org.junit.Assert.fail(Assert.java:88)
I  823.997s run_tests_on_device(FA6AB0304324)    	at org.junit.Assert.failNotEquals(Assert.java:834)
I  823.997s run_tests_on_device(FA6AB0304324)    	at org.junit.Assert.assertEquals(Assert.java:645)
I  823.997s run_tests_on_device(FA6AB0304324)    	at org.chromium.chrome.browser.tabmodel.UndoTabModelTest.testOpenRecentlyClosedTabMultiWindowFallback(UndoTabModelTest.java:1678)


org.chromium.chrome.browser.tabmodel.UndoTabModelTest#testOpenRecentlyClosedTabMultiWindow

839.519s run_tests_on_device(FA6AB0304025)    INSTRUMENTATION_STATUS: stack=java.lang.NullPointerException: Attempt to invoke interface method 'boolean org.chromium.content_public.browser.WebContents.isLoadingToDifferentDocument()' on a null object reference
I  839.519s run_tests_on_device(FA6AB0304025)    	at org.chromium.chrome.test.util.ChromeTabUtils.waitForTabPageLoaded(ChromeTabUtils.java:153)
I  839.519s run_tests_on_device(FA6AB0304025)    	at org.chromium.chrome.test.util.ChromeTabUtils.newTabFromMenu(ChromeTabUtils.java:339)
I  839.519s run_tests_on_device(FA6AB0304025)    	at org.chromium.chrome.test.util.ChromeTabUtils.fullyLoadUrlInNewTab(ChromeTabUtils.java:366)
I  839.519s run_tests_on_device(FA6AB0304025)    	at org.chromium.chrome.browser.tabmodel.UndoTabModelTest.testOpenRecentlyClosedTabMultiWindow(UndoTabModelTest.java:1596)
 
This also happen on N device.

On O device, startMainActivityOnBlankPage will sometimes hang, which might be another issue.
Cc: twelling...@chromium.org
After some investigation, I think it might related to 602498, that tab models merges at some point, however, in the test, this also happen for some reason, and the second window steal the about://blank tab from the first window.
You can disable tab model merging for tests using the command line flag ChromeSwitches.DISABLE_TAB_MERGING_FOR_TESTING.
Thanks, it works, let me add this flag to the tests at this point.
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 4 2017

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

commit 6c702b19a1ebb7aacf44c0708386eb9bdf1742fe
Author: Xing Liu <xingliu@chromium.org>
Date: Fri Nov 03 23:08:51 2017

Fix UndoTabModelTest#testOpenRecentlyClosedTabMultiWindow* tests.

Add two commandline flags to two test cases. Since the new feature
probably change the behavior, and the second window will steal the
first tab in first window.

Bug:  779255 
Change-Id: I7b7725d6dd56b921e85b2f1e89245939f6839953
Reviewed-on: https://chromium-review.googlesource.com/752010
Reviewed-by: Theresa <twellington@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513944}
[modify] https://crrev.com/6c702b19a1ebb7aacf44c0708386eb9bdf1742fe/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/UndoTabModelTest.java

Status: Fixed (was: Assigned)
Thanks!

Sign in to add a comment