diff options
author | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-03 12:43:20 +0000 |
---|---|---|
committer | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-03 12:43:20 +0000 |
commit | fe7a6b5cd166d0619b59fae6ddc5bce4587ff670 (patch) | |
tree | cd868a6068d9d8d03ea9ca8384de1fc03896749b /chrome_frame/test/chrome_frame_test_utils.h | |
parent | 66c3000a4f211f01aca85e09ca2b85dc8da2290a (diff) | |
download | chromium_src-fe7a6b5cd166d0619b59fae6ddc5bce4587ff670.zip chromium_src-fe7a6b5cd166d0619b59fae6ddc5bce4587ff670.tar.gz chromium_src-fe7a6b5cd166d0619b59fae6ddc5bce4587ff670.tar.bz2 |
More compact mock tests
Factor out the common expectations for navigations in macros so as
to avoid code duplication and make tests more readable.
Next step is probably to create a testing::ExpectionSet and use
functions instead of macros.
BUG=none
TEST=all the modified tests
Review URL: http://codereview.chromium.org/661390
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40511 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test/chrome_frame_test_utils.h')
-rw-r--r-- | chrome_frame/test/chrome_frame_test_utils.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/chrome_frame/test/chrome_frame_test_utils.h b/chrome_frame/test/chrome_frame_test_utils.h index 6799913..c11ead7 100644 --- a/chrome_frame/test/chrome_frame_test_utils.h +++ b/chrome_frame/test/chrome_frame_test_utils.h @@ -23,6 +23,8 @@ #include "chrome_frame/test_utils.h" #include "chrome_frame/test/simulate_input.h" +#include "testing/gmock/include/gmock/gmock.h" + // Include without path to make GYP build see it. #include "chrome_tab.h" // NOLINT @@ -208,13 +210,10 @@ END_SINK_MAP() DLOG(INFO) << __FUNCTION__; } - STDMETHOD(OnBeforeNavigate2)(IDispatch* dispatch, VARIANT* url, + STDMETHOD_(void, OnBeforeNavigate2)(IDispatch* dispatch, VARIANT* url, VARIANT* flags, VARIANT* target_frame_name, VARIANT* post_data, VARIANT* headers, - VARIANT_BOOL* cancel) { - return S_OK; - } - + VARIANT_BOOL* cancel) {} STDMETHOD_(void, OnDownloadBegin)() {} STDMETHOD_(void, OnNavigateComplete2)(IDispatch* dispatch, VARIANT* url) {} STDMETHOD_(void, OnNewWindow2)(IDispatch** dispatch, VARIANT_BOOL* cancel) {} |