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

Issue 7544026: Fix for flakiness in pyauto automation hook WaitForDownloadsToComplete. (Closed)

Created:
9 years, 4 months ago by dennis_jeffrey
Modified:
9 years, 4 months ago
CC:
chromium-reviews, John Grabowski, kkania, anantha, dyu1, krisr
Visibility:
Public.

Description

Re-write pyauto automation hook WaitForAllDownloadsToComplete. Now that the Chrome downloads system is more stable since when this hook was originally written, the hook is now updated to work for all downloads (it previously did not work well for dangerous downloads, or downloads from an incognito window). A new input to the automation hook also requires changes to several pyauto files that invoke the hook. BUG=69738, 91263 TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=96193

Patch Set 1 #

Total comments: 5

Patch Set 2 : Re-wrote the first patch set. #

Total comments: 12

Patch Set 3 : Addressed review comments. #

Patch Set 4 : Minor style edit. #

Patch Set 5 : Merged with trunk; awaiting green trybots. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -138 lines) Patch
M chrome/browser/automation/automation_provider_observers.h View 1 3 chunks +32 lines, -25 lines 0 comments Download
M chrome/browser/automation/automation_provider_observers.cc View 1 2 3 2 chunks +61 lines, -53 lines 0 comments Download
M chrome/browser/automation/testing_automation_provider.h View 1 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/automation/testing_automation_provider.cc View 1 2 chunks +13 lines, -20 lines 0 comments Download
M chrome/test/functional/downloads.py View 1 2 5 chunks +7 lines, -9 lines 0 comments Download
M chrome/test/functional/test_utils.py View 1 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/test/functional/translate.py View 1 1 chunk +3 lines, -1 line 0 comments Download
M chrome/test/pyautolib/download_info.py View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/test/pyautolib/pyauto.py View 1 2 1 chunk +20 lines, -21 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
dennis_jeffrey
9 years, 4 months ago (2011-08-01 21:24:24 UTC) #1
Nirnimesh
Awesome. LGTM
9 years, 4 months ago (2011-08-01 21:29:28 UTC) #2
Paweł Hajdan Jr.
NAK, doesn't seems to be the right solution. And this is chrome/test/OWNERS here. Please do ...
9 years, 4 months ago (2011-08-01 22:42:10 UTC) #3
Nirnimesh
http://codereview.chromium.org/7544026/diff/1/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/7544026/diff/1/chrome/browser/automation/testing_automation_provider.cc#newcode2948 chrome/browser/automation/testing_automation_provider.cc:2948: // It's possible that pending downloads may have completed ...
9 years, 4 months ago (2011-08-01 22:49:23 UTC) #4
dennis_jeffrey
Thanks for looking over this, Pawel. Let me know your thoughts. http://codereview.chromium.org/7544026/diff/1/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): ...
9 years, 4 months ago (2011-08-02 00:04:53 UTC) #5
Paweł Hajdan Jr.
Feel free to ping me on chat or come to my desk about this. I ...
9 years, 4 months ago (2011-08-02 16:53:20 UTC) #6
dennis_jeffrey
Thanks for the detailed reply, Pawel. I agree that a complete solution to this flakiness ...
9 years, 4 months ago (2011-08-02 17:09:10 UTC) #7
Nirnimesh
This is turning out to be another one of those tussles. All your suggestions are ...
9 years, 4 months ago (2011-08-02 17:22:53 UTC) #8
dennis_jeffrey
On 2011/08/02 17:22:53, Nirnimesh wrote: > This is turning out to be another one of ...
9 years, 4 months ago (2011-08-03 16:01:07 UTC) #9
Paweł Hajdan Jr.
On 2011/08/03 16:01:07, dennis_jeffrey wrote: > Hi guys - how about this: we change the ...
9 years, 4 months ago (2011-08-03 16:42:13 UTC) #10
krisr
In the future I prefer to not have automation hook changes require updates to multiple ...
9 years, 4 months ago (2011-08-03 17:04:43 UTC) #11
dennisjeffrey
In this case the current version of the automation hook was flaky and we could ...
9 years, 4 months ago (2011-08-03 17:18:37 UTC) #12
dennisjeffrey
> > Hi guys - how about this: we change the automation hook >> WaitForDownloadsToComplete ...
9 years, 4 months ago (2011-08-03 19:13:02 UTC) #13
Nirnimesh
On 2011/08/03 19:13:02, dennisjeffrey wrote: > > > > Hi guys - how about this: ...
9 years, 4 months ago (2011-08-03 19:41:06 UTC) #14
Nirnimesh
I also see a ModelChanged() in DownloadManager::Observer that looks interesting. // New or deleted download, ...
9 years, 4 months ago (2011-08-03 19:45:19 UTC) #15
dennis_jeffrey
I re-wrote the automation hook based on ideas provided by the Downloads folks, and modified ...
9 years, 4 months ago (2011-08-06 02:17:26 UTC) #16
Paweł Hajdan Jr.
Code I commented in the drive-by LGTM. http://codereview.chromium.org/7544026/diff/15001/chrome/browser/automation/automation_provider_observers.cc File chrome/browser/automation/automation_provider_observers.cc (right): http://codereview.chromium.org/7544026/diff/15001/chrome/browser/automation/automation_provider_observers.cc#newcode1522 chrome/browser/automation/automation_provider_observers.cc:1522: if (pending_downloads_.empty()) ...
9 years, 4 months ago (2011-08-08 16:36:13 UTC) #17
Nirnimesh
http://codereview.chromium.org/7544026/diff/15001/chrome/browser/automation/automation_provider_observers.cc File chrome/browser/automation/automation_provider_observers.cc (right): http://codereview.chromium.org/7544026/diff/15001/chrome/browser/automation/automation_provider_observers.cc#newcode1487 chrome/browser/automation/automation_provider_observers.cc:1487: (*it)->GetAsInteger(&val); wrap this inside if() http://codereview.chromium.org/7544026/diff/15001/chrome/browser/automation/automation_provider_observers.cc#newcode1514 chrome/browser/automation/automation_provider_observers.cc:1514: if (download->state() ...
9 years, 4 months ago (2011-08-08 17:26:16 UTC) #18
dennis_jeffrey
http://codereview.chromium.org/7544026/diff/15001/chrome/browser/automation/automation_provider_observers.cc File chrome/browser/automation/automation_provider_observers.cc (right): http://codereview.chromium.org/7544026/diff/15001/chrome/browser/automation/automation_provider_observers.cc#newcode1487 chrome/browser/automation/automation_provider_observers.cc:1487: (*it)->GetAsInteger(&val); On 2011/08/08 17:26:17, Nirnimesh wrote: > wrap this ...
9 years, 4 months ago (2011-08-08 22:29:51 UTC) #19
Nirnimesh
9 years, 4 months ago (2011-08-09 17:25:27 UTC) #20
LGTM

Powered by Google App Engine
This is Rietveld 408576698