• Mikel Astiz's avatar
    Add support for sync integration tests that span restarts · 938efa5c
    Mikel Astiz authored
    Historically, sync integration tests were incompatible with testing an
    actual browser restarts, leading to (best case) weird workarounds or
    (more often) lack of test coverage for very basic functionality (e.g.
    loading of persisted data).
    
    Browser tests do support a mechanism for this, which involves prefixing
    test names with PRE_, designed to reuse the very same profile path in
    multiple tests and hence carry over state.
    
    The only reason why this didn't work for sync integration tests is that
    we created random directories on every test run: instead, this patch
    makes the profile path deterministic.
    
    In this patch, a couple of tests are migrated to the new scheme, as
    a proof-of-concept.
    
    Bug: 856696
    Change-Id: I6bf33bcb78d834984ff5230f7119cb79eb8bab55
    Reviewed-on: https://chromium-review.googlesource.com/c/1341996
    Commit-Queue: Mikel Astiz <mastiz@chromium.org>
    Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
    Reviewed-by: default avatarMarc Treib <treib@chromium.org>
    Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#610152}
    938efa5c
sync_test.h 21.5 KB