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

Issue 5544008: Add a browser test for safebrowsing service.... (Closed)

Created:
10 years ago by lzheng
Modified:
9 years, 7 months ago
CC:
chromium-reviews, ben+cc_chromium.org
Visibility:
Public.

Description

Add a browser test for safebrowsing service. BUG=none TEST=safe_browsing_service_browsertest Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=69072

Patch Set 1 : '' #

Patch Set 2 : rename functions #

Total comments: 32

Patch Set 3 : Address Pawel's comments. #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 13

Patch Set 6 : '' #

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+455 lines, -35 lines) Patch
M chrome/browser/safe_browsing/protocol_manager.h View 1 2 3 4 5 6 7 chunks +63 lines, -20 lines 0 comments Download
M chrome/browser/safe_browsing/protocol_manager.cc View 1 2 3 4 5 6 2 chunks +48 lines, -4 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_database.h View 1 2 3 4 5 6 3 chunks +26 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_database.cc View 1 2 3 4 5 6 1 chunk +21 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_service.cc View 1 2 3 4 5 6 1 chunk +10 lines, -8 lines 0 comments Download
A chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc View 1 2 3 4 5 1 chunk +285 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
lzheng
I added a browsertest so we could do more controlled test in SafeBrowsingService.
10 years ago (2010-12-06 23:57:49 UTC) #1
Paweł Hajdan Jr.
Drive-by with minor test comments. No need to wait for another review by me. http://codereview.chromium.org/5544008/diff/17001/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc ...
10 years ago (2010-12-07 08:17:22 UTC) #2
Scott Hess - ex-Googler
Seems a little funky, be thinking about useful ways to make this more testable without ...
10 years ago (2010-12-07 21:22:56 UTC) #3
lzheng
Thanks for the comment. New change uploaded. Another look? http://codereview.chromium.org/5544008/diff/17001/chrome/browser/safe_browsing/protocol_manager.cc File chrome/browser/safe_browsing/protocol_manager.cc (right): http://codereview.chromium.org/5544008/diff/17001/chrome/browser/safe_browsing/protocol_manager.cc#newcode79 chrome/browser/safe_browsing/protocol_manager.cc:79: ...
10 years ago (2010-12-08 01:57:32 UTC) #4
Scott Hess - ex-Googler
lgtm, fix the leaking factories. http://codereview.chromium.org/5544008/diff/38001/chrome/browser/safe_browsing/protocol_manager.h File chrome/browser/safe_browsing/protocol_manager.h (right): http://codereview.chromium.org/5544008/diff/38001/chrome/browser/safe_browsing/protocol_manager.h#newcode141 chrome/browser/safe_browsing/protocol_manager.h:141: base::Time last_update() const { ...
10 years ago (2010-12-10 22:20:59 UTC) #5
lzheng
Thanks. Addressed the comments. FYI: The db_ and pm_ pointers are owned by SafeBrowsingService, it ...
10 years ago (2010-12-11 01:15:20 UTC) #6
Scott Hess - ex-Googler
10 years ago (2010-12-13 20:33:52 UTC) #7
lgtm.

I'm nervous that it won't be passed by valgrind, though.

http://codereview.chromium.org/5544008/diff/38001/chrome/browser/safe_browsin...
File chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc (right):

http://codereview.chromium.org/5544008/diff/38001/chrome/browser/safe_browsin...
chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc:109:
TestSafeBrowsingDatabase* db_;
On 2010/12/11 01:15:20, lzheng wrote:
> On 2010/12/10 22:20:59, shess wrote:
> > Should this be scoped_ptr<>?
> No, see comments above. It is owned by the safebrowsing service.

Sorry, I think I was conflating the factory instances with the instances
generated by the factories.

Powered by Google App Engine
This is Rietveld 408576698