New issue
Advanced search Search tips

Issue 852659 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 729800



Sign in to add a comment

Integration tests all hit NOTIMPLEMENTED

Project Member Reported by ntfschr@chromium.org, Jun 14 2018

Issue description

I'm trying to run integration tests on my Nexus 5X (Android OMR1), and I'm suddenly hitting a NOTIMPLEMENTED [1] on *every* test run.

I've checked this against the following test suites:

 * SafeBrowsingTest
 * AwContentsClientFullScreenTest
 * ClientOnPageFinishedTest
 * PostMessageTest
 * ... (I suspect this affects every test suite)

Note: there are 2 NOTIMPLEMENTED()s in that file. I only hit the one inside AddCallbackForAllChanges(). It is triggered before test cases actually start, so it appears that this is triggered during chromium startup.

I see 100% consistent repro on:

 * Nexus 5X / OMR1
 * Nexus 5X / M
 * Pixel 1 XL / N

Anyone else see this issue? In case it matters, my checkout is synced to e0491c0ba5ffc685fadbf6c2c3439d2f3d38dd07.

---

This was last touched in 2a189167cb95cc86a19d6e20e72a439307359aac, but it was previously a CHECK, so that probably didn't introduce the regression. pwnall@ do you know if anything has changed recently regarding this?

[1] https://cs.chromium.org/chromium/src/android_webview/browser/net/aw_cookie_change_dispatcher_wrapper.cc?l=161&rcl=66da0a7ac0283b79781efed0f59cd9305a939230
 

Comment 1 by pwnall@chromium.org, Jun 14 2018

Blocking: 729800
Cc: -pwnall@chromium.org
Owner: pwnall@chromium.org
Status: Assigned (was: Untriaged)
Thank you for the bug report!

https://crrev.com/c/979334 adds a call to AddGlobalChangeListener in the CookieManager mojo interface. The implementation uses AddCallbackForAllChanges(), so it was technically always broken on Android. This was used in chrome/browser/extensions/extension_cookie_notifier.cc which is desktop-only, and my CL added a call in src/content/browser/cookie_store/cookie_store_manager.cc which is used both on Desktop and Android.

Marking this as blocking the Async Cookies API.

Comment 2 by pwnall@chromium.org, Jun 14 2018

ntfschr@: How would I run the integration tests?
Cc: boliu@chromium.org
http://go/clank-webview/testing-webview. See "instrumentation tests." Make sure DCHECKs are enabled.

---

As a general question (not directed specifically at pwnall@): How did this even land on trunk? Do we not build with DCHECKs for webview instrumentation on trunk? That seems ridiculous...

Comment 4 by pwnall@chromium.org, Jun 15 2018

Thank you very much for the pointer to the integration tests!

"ridiculous" might be perceived as hostile, I think it's better to phrase things in terms of opportunities for improvement :)
My apologies--hostility was not my intention.

I think our product's stability will be greatly improved if we can have DCHECKs enabled during CQ--this seems ideal to prevent other layers from accidentally violating DCHECK assertions in the android_webview/ layer. I was under the (mistaken) impression this was already the case.

Comment 6 by boliu@chromium.org, Jun 15 2018

cq bots that run tests are all release builds with dcheck_always_on=true. debug builds are just too slow. I'm not sure what happens with NOTIMPLEMENTED in that configuration though, have to look up the implementation.
Labels: -Pri-1 Pri-3
TL;DR I confused NOTIMPLEMENTED (which is a log message) with NOTREACHED (which crashes when DCHECKs are enabled).

NOTIMPLEMENTED is unrelated to DCHECKs. This is just LOG(ERROR) [1], and doesn't crash. Documentation is ambiguous, but I interpret NOTIMPLEMENTED as, "this method isn't actually implemented yet, but it's OK if we call it on accident, and the caller should behave reasonably if it calls this." This is my first time seeing NOTIMPLEMENTED, so correct me if I'm wrong.

Based on this, it seems like there was no bug for CQ to catch, so CQ is working as intended.

When I ran the tests locally, I thought I needed to comment out the NOTIMPLEMENTED to avoid a crash. I must have been mistaken, or something else must have caused the crash.

So, I'll lower the priority since this was my misunderstanding. pwnall@ can re-adjust priority as appropriate.

[1] https://cs.chromium.org/chromium/src/base/logging.h?l=1169&rcl=10bcc4d1db5c4b506aff7fa9f5e9e0d8226c84c6

Comment 8 by pwnall@chromium.org, Jun 15 2018

Hm, I was not able to reproduce the crashes. The bug makes sense to me and I think I can fix it without the repro, but it'd be nice to have that and confirm that crashes are gone.

My gn configuration:

is_component_build = true
is_debug = true
target_os = "android"
use_goma = true

The tests I've tried:

$ out/Android/bin/run_webview_instrumentation_test_apk -f "AwContentsClientFullScreenTest.*"
C  148.672s Main  ********************************************************************************
C  148.672s Main  Summary
C  148.672s Main  ********************************************************************************
C  148.672s Main  [==========] 16 tests ran.
C  148.672s Main  [  PASSED  ] 16 tests.
C  148.673s Main  ********************************************************************************

$ out/Android/bin/run_webview_instrumentation_test_apk -f "SafeBrowsingTest.*"
C  510.898s Main  ********************************************************************************
C  510.899s Main  Summary
C  510.899s Main  ********************************************************************************
C  510.899s Main  [==========] 80 tests ran.
C  510.899s Main  [  PASSED  ] 80 tests.
C  510.899s Main  ********************************************************************************

I'm using a Pixel C on OPM4. 
> Hm, I was not able to reproduce the crashes.

See #c7. I think this is only logspam, not a crash (not sure where my crash was coming from). You can check the log with:

$ adb logcat | grep 'Not implemented reached in'
ntfschr@: Hm, I think I added NOTIMPLEMENTED because I saw it in other cookie change dispatch code, or because of review feedback. I'll admit that at the moment I thought it's equivalent to NOTREACHED, so I thought that switching from CHECK to NOTIMPLEMENTED was a no-op.


boliu@: Do we run layout tests on WebView?

Comment 11 by boliu@chromium.org, Jun 15 2018

> boliu@: Do we run layout tests on WebView?

I believe we run layout tests on android using content shell, which doesn't have any code from chrome/ or android_webview/

Sign in to add a comment