Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Issue 10832106: Allow writing browser_tests that involve a restart. The way to do this: (Closed)

Created:
8 years, 4 months ago by jam
Modified:
8 years, 4 months ago
Reviewers:
sky
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Visibility:
Public.

Description

Allow writing browser_tests that involve a restart. The way to do this: IN_PROC_BROWSER_TEST_F(Foo, PRE_Bar) { do something } IN_PROC_BROWSER_TEST_F(Foo, Bar) { verify something persisted from before } This is recursive, so PRE_PRE_Bar works. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=150096

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 3

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -39 lines) Patch
M chrome/browser/prefs/pref_service_browsertest.cc View 1 2 3 4 5 1 chunk +20 lines, -0 lines 0 comments Download
M chrome/test/base/in_process_browser_test.h View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download
M content/test/test_launcher.cc View 1 2 3 4 5 chunks +73 lines, -39 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
jam
Scott: here's an implementation based on your suggestion. I'm open to suggestions on the prefix's ...
8 years, 4 months ago (2012-08-02 05:49:11 UTC) #1
sky
LGTM. Is there anything special you need to do for sharding? http://codereview.chromium.org/10832106/diff/14002/content/test/test_launcher.cc File content/test/test_launcher.cc (right): ...
8 years, 4 months ago (2012-08-02 15:21:55 UTC) #2
jam
8 years, 4 months ago (2012-08-05 21:44:02 UTC) #3
On 2012/08/02 15:21:55, sky wrote:
> LGTM. Is there anything special you need to do for sharding?

it's already handled. because of the change at line 486, the tests starting with
PRE_ get ignored when running through the tests (either for sharding, or for
normal operation). Only when the test that has  PRE_ version runs do we look for
PRE_ versions.

http://codereview.chromium.org/10832106/diff/14002/content/test/test_launcher.cc
File content/test/test_launcher.cc (right):

http://codereview.chromium.org/10832106/diff/14002/content/test/test_launcher...
content/test/test_launcher.cc:307: std::string pre_test_name = test_name;
On 2012/08/02 15:21:55, sky wrote:
> move 307/308 inside if (test_case)

Done.

Powered by Google App Engine
This is Rietveld 408576698