diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-03 17:18:04 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-03 17:18:04 +0000 |
commit | bc0caef9b0af84365b6dd546cd21673c9790ca58 (patch) | |
tree | 54881e9c8bc957f65901a53978d18865135392dd /chrome/browser/renderer_host | |
parent | 4e9f6be54df1f1f6f9cfe243624ef976f15d452f (diff) | |
download | chromium_src-bc0caef9b0af84365b6dd546cd21673c9790ca58.zip chromium_src-bc0caef9b0af84365b6dd546cd21673c9790ca58.tar.gz chromium_src-bc0caef9b0af84365b6dd546cd21673c9790ca58.tar.bz2 |
This CL adds unit-tests for the SafeBrowsingBlockingPage class.
This required:
- creating a factory to create SafeBrowsingBlockingPage
instances (so unit-tests can provide their own sub-classes).
- making the code posts tasks on the current message loop
when there is no IO thread. This should only happen in
tests scenarios where we only have 1 thread.
BUG=6731
TEST=Run the unit-tests. In Chrome, navigate to pages flagged as malware (ex: ianfette.org) and make sure the safe browsing feature still works as expected.
Review URL: http://codereview.chromium.org/56135
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13088 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r-- | chrome/browser/renderer_host/mock_render_process_host.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/mock_render_process_host.cc b/chrome/browser/renderer_host/mock_render_process_host.cc index b25f3ad..2e6e61e 100644 --- a/chrome/browser/renderer_host/mock_render_process_host.cc +++ b/chrome/browser/renderer_host/mock_render_process_host.cc @@ -7,6 +7,8 @@ MockRenderProcessHost::MockRenderProcessHost(Profile* profile) : RenderProcessHost(profile), transport_dib_(NULL) { + static int prev_pid = 0; + SetProcessID(++prev_pid); } MockRenderProcessHost::~MockRenderProcessHost() { |