New issue
Advanced search Search tips

Issue 614168 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 4
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Task



Sign in to add a comment

Create integration tests to validate WebStateObserver

Project Member Reported by baxley@chromium.org, May 23 2016

Issue description

Currently no tests verify WebStateObserver callbacks, or UI affected by this (e.g. lock icon).

It would be useful to have tests here.
 
Cc: huangml@chromium.org
Owner: ----
Status: Untriaged (was: Assigned)
This bug has not been updated by its owner for more than a year. At this point it may not be relevant anymore.

Comment 2 by sczs@chromium.org, May 31 2017

Owner: baxley@chromium.org
Status: Assigned (was: Untriaged)
baxley@ is this still something that would be useful?
Components: Mobile>WebView>Glue
Labels: -Type-Bug -Pri-2 -Proj-EarlGrey Pri-3 Type-Task
Owner: ----
Status: Available (was: Assigned)
Actually we have many integration tests for this in ios_web_unittest and ios_web_inttest.

These callbacks are covered:
 - ProvisionalNavigationStarted
 - DidFinishNavigation
 - DidStartLoading
 - DidStopLoading
 - LoadProgressChanged
 - TitleWasSet
 - DidChangeVisibleSecurityState
 - DidSuppressDialog
 - FormActivityRegistered
 - FaviconUrlUpdated
 - RenderProcessGone

These callback need tests:
 - NavigationItemsPruned
 - NavigationItemCommitted
 - PageLoaded
 - InterstitialDismissed
 - DocumentSubmitted

This callback is deprecated:
 - NavigationItemChanged

New tests should be part of ios_web_inttest, not part of EG test suite. This is something that we'll probably do in Q3.


Owner: eugene...@chromium.org
Status: Assigned (was: Available)
Summary: Create integration tests to validate WebStateObserver (was: Create EarlGrey tests to validate WebStateObserver)
These callbacks are covered:
 - DidStartNavigation
 - DidFinishNavigation
 - DidStartLoading
 - DidStopLoading
 - LoadProgressChanged
 - TitleWasSet
 - DidChangeVisibleSecurityState
 - DidSuppressDialog
 - FormActivityRegistered
 - FaviconUrlUpdated
 - RenderProcessGone
 - DocumentSubmitted

These callback need tests:
 - NavigationItemsPruned
 - PageLoaded

This callback is deprecated:
 - NavigationItemChanged
 - NavigationItemCommitted
Project Member

Comment 5 by bugdroid1@chromium.org, Jan 30 2018

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

commit cef484a75d19ff1e6971295cb7f9e9db99976e2a
Author: Eugene But <eugenebut@google.com>
Date: Tue Jan 30 23:20:28 2018

Make ExabyteResponse a default handler for EmbeddedTestServer.

ExabyteResponse  is almost never ending response (with an Extabyte
content-length). This response will be used in iOS tests, so it is useful
to make it default.

Bug:  614168 ,789585
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Ie0edb7bbfc427bb83dc8bfbc9e143d1cd0e890e7
Reviewed-on: https://chromium-review.googlesource.com/890300
Commit-Queue: Eugene But <eugenebut@chromium.org>
Reviewed-by: Misha Efimov <mef@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533071}
[modify] https://crrev.com/cef484a75d19ff1e6971295cb7f9e9db99976e2a/components/cronet/android/test/native_test_server.cc
[modify] https://crrev.com/cef484a75d19ff1e6971295cb7f9e9db99976e2a/net/test/embedded_test_server/default_handlers.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Feb 1 2018

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

commit 5a178c9843bace7f3da1d73152b596531e956442
Author: Eugene But <eugenebut@google.com>
Date: Thu Feb 01 15:30:04 2018

Add integration test for failed load after sucessfull navigation.

This test uses ExabyteResponse which never stops respondind and then
shuts down the server after the navigation is comitted to fail the load.

Bug:  614168 ,789585
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I4571fbfa58c35072438a8cc74e4c2eeca5c2dd08
Reviewed-on: https://chromium-review.googlesource.com/895913
Reviewed-by: Danyao Wang <danyao@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533670}
[modify] https://crrev.com/5a178c9843bace7f3da1d73152b596531e956442/ios/web/web_state/navigation_and_load_callbacks_inttest.mm

Project Member

Comment 7 by bugdroid1@chromium.org, Feb 5 2018

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

commit df42e1a12bec272f7406d41fa1cb0e3768bc6c3e
Author: Eugene But <eugenebut@google.com>
Date: Mon Feb 05 22:12:34 2018

Change WebState::IsLoading to false if ShouldAllowRequest returned false.

This CL adds NavigationAndLoadCallbacksTest.DisallowRequest test and
fixes a bug when WebState::IsLoading does not flop to false.

Bug:  614168 ,789585
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I30e7fcd49fdbbc33a2a67f274a37e5243d4ea07b
Reviewed-on: https://chromium-review.googlesource.com/900092
Reviewed-by: Danyao Wang <danyao@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534502}
[modify] https://crrev.com/df42e1a12bec272f7406d41fa1cb0e3768bc6c3e/ios/web/web_state/navigation_and_load_callbacks_inttest.mm
[modify] https://crrev.com/df42e1a12bec272f7406d41fa1cb0e3768bc6c3e/ios/web/web_state/ui/crw_web_controller.mm

Project Member

Comment 8 by bugdroid1@chromium.org, Feb 7 2018

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

commit d495ed7d975f1599930d7953c576b8b8b6f03fb9
Author: Eugene But <eugenebut@chromium.org>
Date: Wed Feb 07 00:35:11 2018

Add NavigationAndLoadCallbacksTest.DisallowResponse test.

This tests load rejection when ShouldAllowResponse returns false.

Bug:  614168 ,789585
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I91c1da903fdda7910aadc7ffdf74c23a72f79bde
Reviewed-on: https://chromium-review.googlesource.com/900094
Reviewed-by: Danyao Wang <danyao@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534852}
[modify] https://crrev.com/d495ed7d975f1599930d7953c576b8b8b6f03fb9/ios/web/web_state/navigation_and_load_callbacks_inttest.mm

Project Member

Comment 9 by bugdroid1@chromium.org, Feb 7 2018

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

commit b8a3c81336fb7d26c0b7580666c649f0e4e121b3
Author: Eugene But <eugenebut@chromium.org>
Date: Wed Feb 07 07:11:33 2018

Added NavigationAndLoadCallbacksTest for stopping the navigation and load.

Bug:  614168 ,789585
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Id7852dce96ce70159a46cfadb080207b54c8bf69
Reviewed-on: https://chromium-review.googlesource.com/899952
Commit-Queue: Eugene But <eugenebut@chromium.org>
Reviewed-by: Danyao Wang <danyao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534940}
[modify] https://crrev.com/b8a3c81336fb7d26c0b7580666c649f0e4e121b3/ios/web/web_state/navigation_and_load_callbacks_inttest.mm

Cc: -eugene...@chromium.org
These callbacks are covered:
 - DidStartNavigation
 - DidFinishNavigation
 - DidStartLoading
 - DidStopLoading
 - LoadProgressChanged
 - TitleWasSet
 - DidChangeVisibleSecurityState
 - DidSuppressDialog
 - FormActivityRegistered
 - FaviconUrlUpdated
 - RenderProcessGone
 - DocumentSubmitted
 - PageLoaded

These callbacks need tests:
 - NavigationItemsPruned

This callbacks are deprecated:
 - NavigationItemChanged
 - NavigationItemCommitted

Cc: -baxley@chromium.org
Status: Available (was: Assigned)
Cc: eugene...@chromium.org
Owner: ----
Components: Mobile>iOSWeb
Components: -Mobile>WebView>Glue
Components: -Mobile>iOSWeb Mobile>iOSWeb>PublicAPI
Cc: -eugene...@chromium.org -huangml@chromium.org
Owner: eugene...@chromium.org
Status: Fixed (was: Available)
These callbacks are covered:
 - WasShown
 - WasHidden
 - DidStartNavigation
 - NavigationItemsPruned
 - DidFinishNavigation
 - DidStartLoading
 - DidStopLoading
 - PageLoaded
 - LoadProgressChanged
 - TitleWasSet
 - DidChangeVisibleSecurityState
 - FaviconUrlUpdated
 - RenderProcessGone

This callbacks are deprecated:
 - NavigationItemChanged
 - NavigationItemCommitted

There is no need to write tests for deprecated callbacks, so marking this as Fixed.

Sign in to add a comment