New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 747109 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2017
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Make WebappActivityTestRule easier to understand

Project Member Reported by pkotw...@chromium.org, Jul 20 2017

Issue description

WebappActivityTestRule#startWebappActivity() is currently hard to understand

In particular:
- It is unclear what WebappActivityTestRule#waitUntilIdle() waits for. Does it return before or after Tab#loadUrl() is called? (I did some local testing and have confirmed that it returns prior to Tab#loadUrl() is called at least some of the time)
- If WebappActivityTestRule#waitUntilIdle() returns after the page has finished loading, WebappActivityTestRule#waitUntilIdle() is also called after the splash screen hide animation has started. It is possible that the splash screen is fully hidden when WebappActivityTestRule#waitUntilIdle() in which case mActivityTestRule#waitUntilSplashScreenAppears() would fail

I suggest having two methods in WebappActivityTestRule:
startWebappActivity() which will return when about:blank has finished loading
startWebappActivityWithSlowLoadingPage() which will return once the Tab has been created. You can use EmbeddedTestServer.java with the special URL "/slow?1967" to get the URL to a page which takes a long time - 1967 seconds to load

It would be nice if we can get WebappActivityTestRule#startWebappActivity(), WebappActivityTestRule#startWebappActivityWithSlowLoadingPage(), WebApkIntegrationTest#WebApkIntegrationTest(), and MultiActivityTestComment#waitForFullLoad() to share as much code as possible
 
Owner: ranj@chromium.org
Status: Assigned (was: Untriaged)
Assigning to Ran to make things 1000x better
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 29 2017

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

commit c99ebede6f15e72b0f98358b8e710353c6357abc
Author: Ran Ji <ranj@chromium.org>
Date: Tue Aug 29 19:04:25 2017

Fix flakiness for splash screen tests

Fix some possible causes for flakiness:
1. Extend page load time so the splashscreen will not disappear during test.
2. Clean WebappStorage when running tests. Some tests fail because we don't
clear the WebappStorage, and they pass in re-run when run on their own.
3. Wait till splashscreen icon is loaded.

Bug:  747109 
Change-Id: Ia14a614032464533b456e132cba49bd70f5ef8e3
Reviewed-on: https://chromium-review.googlesource.com/611660
Commit-Queue: Ran Ji <ranj@chromium.org>
Reviewed-by: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498187}
[modify] https://crrev.com/c99ebede6f15e72b0f98358b8e710353c6357abc/chrome/android/BUILD.gn
[modify] https://crrev.com/c99ebede6f15e72b0f98358b8e710353c6357abc/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestRule.java
[modify] https://crrev.com/c99ebede6f15e72b0f98358b8e710353c6357abc/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappDisplayModeTest.java
[modify] https://crrev.com/c99ebede6f15e72b0f98358b8e710353c6357abc/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java
[modify] https://crrev.com/c99ebede6f15e72b0f98358b8e710353c6357abc/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenBackgroundColorTest.java
[modify] https://crrev.com/c99ebede6f15e72b0f98358b8e710353c6357abc/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenHomescreenIconTest.java
[modify] https://crrev.com/c99ebede6f15e72b0f98358b8e710353c6357abc/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenIconTest.java
[modify] https://crrev.com/c99ebede6f15e72b0f98358b8e710353c6357abc/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenTest.java
[modify] https://crrev.com/c99ebede6f15e72b0f98358b8e710353c6357abc/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenThemeColorTest.java

Comment 3 Deleted

Comment 4 by ranj@chromium.org, Sep 6 2017

Status: Fixed (was: Verified)

Sign in to add a comment