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

Issue 5610006: Converted download UI tests to Browser tests. (Closed)

Created:
10 years ago by ahendrickson
Modified:
9 years, 7 months ago
CC:
chromium-reviews, rdsmith+dwatch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Converted download UI tests to Browser tests. Converted NavigateWithURLAsync/WaitForDownloadShelfVisible calls to NavigateToURLWithDisposition. This waits until the navigation is done before returning, avoiding the need for the 'sleep and wait' loop. BUG=none TEST=Run browser_tests --gtest_filter=DownloadTest.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=70900

Patch Set 1 #

Patch Set 2 : Merged from trunk. #

Patch Set 3 : Cleaned up code. Fixed failing tests. #

Total comments: 59

Patch Set 4 : Merge with trunk, and address comments. #

Total comments: 21

Patch Set 5 : Implemented Randy's comments. #

Patch Set 6 : Merged with trunk. #

Total comments: 33

Patch Set 7 : Changes per Pawel & Brett's comments. #

Total comments: 6

Patch Set 8 : Removed WaitForWindowClosed(). #

Total comments: 21

Patch Set 9 : Addressed Randy & Pawel's comments. #

Patch Set 10 : Checked that WaitForBrowserNotInSet() does not return an excluded browser. #

Total comments: 4

Patch Set 11 : More cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+804 lines, -50 lines) Patch
M chrome/browser/download/download_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +654 lines, -44 lines 0 comments Download
M chrome/test/in_process_browser_test.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/in_process_browser_test.cc View 1 2 3 4 5 6 7 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/test/ui_test_utils.h View 1 2 3 4 5 6 7 6 chunks +41 lines, -0 lines 0 comments Download
M chrome/test/ui_test_utils.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +98 lines, -6 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
Randy Smith (Not in Mondays)
http://codereview.chromium.org/5610006/diff/15001/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): http://codereview.chromium.org/5610006/diff/15001/chrome/browser/download/download_browsertest.cc#newcode244 chrome/browser/download/download_browsertest.cc:244: ASSERT_TRUE(CreateAndSetDownloadsDirectory()); My understanding is that we can't use ASSERT_* ...
10 years ago (2010-12-13 21:44:48 UTC) #1
ahendrickson
http://codereview.chromium.org/5610006/diff/15001/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): http://codereview.chromium.org/5610006/diff/15001/chrome/browser/download/download_browsertest.cc#newcode244 chrome/browser/download/download_browsertest.cc:244: ASSERT_TRUE(CreateAndSetDownloadsDirectory()); On 2010/12/13 21:44:58, rdsmith wrote: > My understanding ...
10 years ago (2010-12-16 19:26:40 UTC) #2
Randy Smith (Not in Mondays)
Here's the next round. There are a couple of things I think it'd be useful ...
10 years ago (2010-12-19 23:52:49 UTC) #3
ahendrickson
http://codereview.chromium.org/5610006/diff/21001/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): http://codereview.chromium.org/5610006/diff/21001/chrome/browser/download/download_browsertest.cc#newcode233 chrome/browser/download/download_browsertest.cc:233: // Sanity check default values for window / tab ...
10 years ago (2010-12-22 22:16:52 UTC) #4
ahendrickson
Now ready for review.
10 years ago (2010-12-23 17:15:21 UTC) #5
ahendrickson
NOW it's ready for review $-).
10 years ago (2010-12-23 17:16:45 UTC) #6
Randy Smith (Not in Mondays)
http://codereview.chromium.org/5610006/diff/29001/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): http://codereview.chromium.org/5610006/diff/29001/chrome/browser/download/download_browsertest.cc#newcode40 chrome/browser/download/download_browsertest.cc:40: } while(false) Include a comment about how this macro ...
10 years ago (2010-12-23 18:00:34 UTC) #7
Paweł Hajdan Jr.
http://codereview.chromium.org/5610006/diff/29001/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): http://codereview.chromium.org/5610006/diff/29001/chrome/browser/download/download_browsertest.cc#newcode33 chrome/browser/download/download_browsertest.cc:33: #define MOCK_ASSERT_TRUE(test) \ I'd strongly prefer to avoid that ...
9 years, 11 months ago (2011-01-03 09:06:47 UTC) #8
brettw
http://codereview.chromium.org/5610006/diff/29001/chrome/test/in_process_browser_test.h File chrome/test/in_process_browser_test.h (right): http://codereview.chromium.org/5610006/diff/29001/chrome/test/in_process_browser_test.h#newcode125 chrome/test/in_process_browser_test.h:125: // Creates an incognito browser; This comment is useless, ...
9 years, 11 months ago (2011-01-04 18:44:12 UTC) #9
ahendrickson
http://codereview.chromium.org/5610006/diff/29001/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): http://codereview.chromium.org/5610006/diff/29001/chrome/browser/download/download_browsertest.cc#newcode33 chrome/browser/download/download_browsertest.cc:33: #define MOCK_ASSERT_TRUE(test) \ On 2011/01/03 09:06:47, Paweł Hajdan Jr. ...
9 years, 11 months ago (2011-01-05 00:32:09 UTC) #10
Paweł Hajdan Jr.
http://codereview.chromium.org/5610006/diff/51001/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): http://codereview.chromium.org/5610006/diff/51001/chrome/browser/download/download_browsertest.cc#newcode40 chrome/browser/download/download_browsertest.cc:40: #define MOCK_ASSERT_TRUE(test) \ If you really want some kind ...
9 years, 11 months ago (2011-01-05 08:05:51 UTC) #11
ahendrickson
http://codereview.chromium.org/5610006/diff/51001/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): http://codereview.chromium.org/5610006/diff/51001/chrome/browser/download/download_browsertest.cc#newcode40 chrome/browser/download/download_browsertest.cc:40: #define MOCK_ASSERT_TRUE(test) \ On 2011/01/05 08:05:52, Paweł Hajdan Jr. ...
9 years, 11 months ago (2011-01-06 16:47:28 UTC) #12
Randy Smith (Not in Mondays)
http://codereview.chromium.org/5610006/diff/58002/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): http://codereview.chromium.org/5610006/diff/58002/chrome/browser/download/download_browsertest.cc#newcode5 chrome/browser/download/download_browsertest.cc:5: #include <stack> Do we still need this? http://codereview.chromium.org/5610006/diff/58002/chrome/browser/download/download_browsertest.cc#newcode230 chrome/browser/download/download_browsertest.cc:230: ...
9 years, 11 months ago (2011-01-06 18:31:17 UTC) #13
Paweł Hajdan Jr.
http://codereview.chromium.org/5610006/diff/58002/chrome/test/ui_test_utils.cc File chrome/test/ui_test_utils.cc (right): http://codereview.chromium.org/5610006/diff/58002/chrome/test/ui_test_utils.cc#newcode55 chrome/test/ui_test_utils.cc:55: void NavigateToURLWithDispositionBlockUntilNavigationsComplete( nit: This forward-declaration is really weird and ...
9 years, 11 months ago (2011-01-06 20:45:48 UTC) #14
ahendrickson
http://codereview.chromium.org/5610006/diff/58002/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): http://codereview.chromium.org/5610006/diff/58002/chrome/browser/download/download_browsertest.cc#newcode5 chrome/browser/download/download_browsertest.cc:5: #include <stack> On 2011/01/06 18:31:17, rdsmith wrote: > Do ...
9 years, 11 months ago (2011-01-06 22:33:39 UTC) #15
Randy Smith (Not in Mondays)
http://codereview.chromium.org/5610006/diff/58002/chrome/test/ui_test_utils.cc File chrome/test/ui_test_utils.cc (right): http://codereview.chromium.org/5610006/diff/58002/chrome/test/ui_test_utils.cc#newcode451 chrome/test/ui_test_utils.cc:451: new_browser = WaitForNewBrowser(); On 2011/01/06 22:33:39, ahendrickson wrote: > ...
9 years, 11 months ago (2011-01-06 23:27:35 UTC) #16
ahendrickson
Added a DCHECK in WaitForBrowserNotInSet().
9 years, 11 months ago (2011-01-07 16:42:57 UTC) #17
Randy Smith (Not in Mondays)
On 2011/01/07 16:42:57, ahendrickson wrote: > Added a DCHECK in WaitForBrowserNotInSet(). LGTM.
9 years, 11 months ago (2011-01-07 18:54:20 UTC) #18
Paweł Hajdan Jr.
LGTM with 2 comments. http://codereview.chromium.org/5610006/diff/74001/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): http://codereview.chromium.org/5610006/diff/74001/chrome/browser/download/download_browsertest.cc#newcode375 chrome/browser/download/download_browsertest.cc:375: if (!downloaded_file_deleted) nit: Just return ...
9 years, 11 months ago (2011-01-08 08:07:56 UTC) #19
ahendrickson
9 years, 11 months ago (2011-01-09 01:14:16 UTC) #20
http://codereview.chromium.org/5610006/diff/74001/chrome/browser/download/dow...
File chrome/browser/download/download_browsertest.cc (right):

http://codereview.chromium.org/5610006/diff/74001/chrome/browser/download/dow...
chrome/browser/download/download_browsertest.cc:375: if
(!downloaded_file_deleted)
On 2011/01/08 08:07:56, Paweł Hajdan Jr. wrote:
> nit: Just return download_file_deleted, sorry I missed it before.

Done.

http://codereview.chromium.org/5610006/diff/74001/chrome/test/ui_test_utils.cc
File chrome/test/ui_test_utils.cc (right):

http://codereview.chromium.org/5610006/diff/74001/chrome/test/ui_test_utils.c...
chrome/test/ui_test_utils.cc:55: void
NavigateToURLWithDispositionBlockUntilNavigationsComplete(
On 2011/01/08 08:07:56, Paweł Hajdan Jr. wrote:
> Instead of the forward-declaration, could you just put the function's body
> before any of places that call it?

Done.

Powered by Google App Engine
This is Rietveld 408576698