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

Issue 715349 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Unable to access origin specific persistent state across browser_tests

Project Member Reported by jrumm...@chromium.org, Apr 26 2017

Issue description

The documentation on browser tests [1] mentions how tests can span restarts by using PRE_Foo that will run before Foo. The documentation for in_process_browser_test.h[2] has:

// IN_PROC_BROWSER_TEST_F(Foo, PRE_Bar) {
//   do something
// }
//
// IN_PROC_BROWSER_TEST_F(Foo, Bar) {
//   verify something persisted from before
// }

However, in practice it seems to be limited. I'm unable to retrieve any data that's stored per-origin (e.g. cookies) as the second instance runs on a different port (using net::EmbeddedTestServer), and thus the origin is different.

Examples logs:
PRE_Foo (saves a cookie, and then reads it back)
[9598:9598:0424/181912.156846:INFO:CONSOLE(277)] "18:19:12.155 -  Saving cookies:mysession=10C280D85198ED80F10985AA824470", source: http://127.0.0.1:46803/eme_player_js/utils.js (277)
[9598:9598:0424/181912.170298:INFO:CONSOLE(277)] "18:19:12.168 -  Checking cookies:mysession=10C280D85198ED80F10985AA824470", source: http://127.0.0.1:46803/eme_player_js/utils.js (277)

Foo (just reads the cookie, hoping to get the mysession value saved)
[9816:9816:0424/181918.078491:INFO:CONSOLE(277)] "18:19:18.062 -  Checking cookies:", source: http://127.0.0.1:40593/eme_player_js/utils.js (277)

I'm adding features that allow encrypted media licenses to be saved, and it would be great if we could verify that they are preserved across restarts.

Not sure what bucket this belongs in (test?, infrastructure?, something else?). cc'ing jam@ since he added the documentation in [2] a long time ago, for ideas.

[1] https://www.chromium.org/developers/testing/browser-tests
[2] https://cs.chromium.org/chromium/src/chrome/test/base/in_process_browser_test.h?l=100
 

Sign in to add a comment