Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Issue 569011: Beginnings of a unit test for downloads that occur in a new window.... (Closed)

Created:
10 years, 10 months ago by tommi (sloooow) - chröme
Modified:
9 years, 7 months ago
Reviewers:
amit
CC:
chromium-reviews, Paul Godavari, Paweł Hajdan Jr.
Visibility:
Public.

Description

Beginnings of a unit test for downloads that occur in a new window. For now this works for IE regularly (no cf in the picture) and triggers a download in a new window. It is disabled since support for this scenario is not yet ready in CF. I'm adding a couple of things to WebBrowserEventSink: - A way to gracefully close IE. This way we allow IE to quit on its own and don't go the "kill" route unless necessary. This should help with reducing cases where we've killed IE and the next time it is started it presents the user with an "IE crashed" dialog which could cause subsequent unit tests to fail. Another thing this adds is support for the OnQuit event that can be useful to add to unit tests as an expected event. - A new OnFileDownload event. I also updated several tests to expect this event. TEST=Adds a unit test. BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=39190

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 8

Patch Set 5 : '' #

Total comments: 7

Patch Set 6 : '' #

Total comments: 3

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+429 lines, -130 lines) Patch
M chrome_frame/test/chrome_frame_test_utils.h View 1 2 3 4 5 6 8 chunks +38 lines, -4 lines 0 comments Download
M chrome_frame/test/chrome_frame_test_utils.cc View 1 2 3 4 5 6 8 chunks +88 lines, -2 lines 0 comments Download
A chrome_frame/test/data/download_file.zip View Binary file 0 comments Download
A chrome_frame/test/data/full_tab_download_from_new_window.html View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
M chrome_frame/test/test_mock_with_web_server.h View 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download
M chrome_frame/test/test_mock_with_web_server.cc View 2 3 4 5 6 51 chunks +278 lines, -124 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
tommi (sloooow) - chröme
10 years, 10 months ago (2010-02-11 22:20:32 UTC) #1
amit
nice! http://codereview.chromium.org/569011/diff/5002/4004 File chrome_frame/test/chrome_frame_test_utils.cc (right): http://codereview.chromium.org/569011/diff/5002/4004#newcode761 chrome_frame/test/chrome_frame_test_utils.cc:761: ::WaitForSingleObject(process, wait_for_process_on_uninitialize_timeout_); Other tests could benefit by closing ...
10 years, 10 months ago (2010-02-11 23:23:21 UTC) #2
tommi (sloooow) - chröme
http://codereview.chromium.org/569011/diff/5002/4004 File chrome_frame/test/chrome_frame_test_utils.cc (right): http://codereview.chromium.org/569011/diff/5002/4004#newcode761 chrome_frame/test/chrome_frame_test_utils.cc:761: ::WaitForSingleObject(process, wait_for_process_on_uninitialize_timeout_); On 2010/02/11 23:23:21, amit wrote: > Other ...
10 years, 10 months ago (2010-02-12 17:00:36 UTC) #3
amit
In general, your new graceful Quit method seems like a better way of doing things. ...
10 years, 10 months ago (2010-02-12 17:17:23 UTC) #4
tommi (sloooow) - chröme
Patch updated. I updated all the tests to use CloseWebBrowserWithOnQuitEvent and expect the OnQuit event.
10 years, 10 months ago (2010-02-13 00:30:38 UTC) #5
amit
http://codereview.chromium.org/569011/diff/5003/4022 File chrome_frame/test/chrome_frame_test_utils.cc (right): http://codereview.chromium.org/569011/diff/5003/4022#newcode313 chrome_frame/test/chrome_frame_test_utils.cc:313: AllowSetForegroundWindow(ASFW_ANY); nice :) http://codereview.chromium.org/569011/diff/5003/4022#newcode460 chrome_frame/test/chrome_frame_test_utils.cc:460: DWORD elapsed = ::GetTickCount() ...
10 years, 10 months ago (2010-02-16 20:03:37 UTC) #6
tommi (sloooow) - chröme
changes uploaded http://codereview.chromium.org/569011/diff/5003/4022 File chrome_frame/test/chrome_frame_test_utils.cc (right): http://codereview.chromium.org/569011/diff/5003/4022#newcode460 chrome_frame/test/chrome_frame_test_utils.cc:460: DWORD elapsed = ::GetTickCount() - now; On ...
10 years, 10 months ago (2010-02-16 22:07:36 UTC) #7
amit
LGTM http://codereview.chromium.org/569011/diff/5004/5006 File chrome_frame/test/chrome_frame_test_utils.h (right): http://codereview.chromium.org/569011/diff/5004/5006#newcode262 chrome_frame/test/chrome_frame_test_utils.h:262: HRESULT CloseWebBrowserWithOnQuitEvent(); nit: Since this is a graceful ...
10 years, 10 months ago (2010-02-16 23:45:31 UTC) #8
tommi (sloooow) - chröme
10 years, 10 months ago (2010-02-17 04:18:32 UTC) #9
thanks.  all done.

On 2010/02/16 23:45:31, amit wrote:
> LGTM
> 
> http://codereview.chromium.org/569011/diff/5004/5006
> File chrome_frame/test/chrome_frame_test_utils.h (right):
> 
> http://codereview.chromium.org/569011/diff/5004/5006#newcode262
> chrome_frame/test/chrome_frame_test_utils.h:262: HRESULT
> CloseWebBrowserWithOnQuitEvent();
> nit: Since this is a graceful shutdown (as opposed to Kill), should we use a
> more compact form: CloseWebBrowser()?
> 
> http://codereview.chromium.org/569011/diff/5004/5009
> File chrome_frame/test/test_mock_with_web_server.cc (right):
> 
> http://codereview.chromium.org/569011/diff/5004/5009#newcode34
> chrome_frame/test/test_mock_with_web_server.cc:34: class CloseIeAtEndOfScope {
> nice :)
> 
> http://codereview.chromium.org/569011/diff/5004/5009#newcode51
> chrome_frame/test/test_mock_with_web_server.cc:51: class
> ComStackObjectWithUninitialize : public CComObjectStackEx<Base> {
> nice++

Powered by Google App Engine
This is Rietveld 408576698