I didn't write any of the existing browser death tests myself, but I think they are reasonable, as long as
death_test_style is "threadsafe", which it is for Chromium -- except on Android. (I agree that the default forking behavior i.e. death_test_style=fast doesn't make sense for browser tests)
In the threadsafe mode, IIUC, the parent runs the test until it reaches the EXPECT/ASSERT_DEATH call, at which point it starts an independent child process which re-runs the test up to and then including that call. The parent then verifies that the child printed out something expected when it died.
I think this is exactly what we want?
The parent running the parts of the test outside of the expect/assert_death ensures that all other expectations/assertions pass.
Really I think the only problem is reusing the user data dir. And I have a draft
CL to enable changing it in the upstream googletest framework -- with a followup CL to chromium, the parent can create a temporary dir for the child and clean it up after the test finishes.
Ryan