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

Unified Diff: chrome/browser/sync/sync_global_error_unittest.cc

Issue 9479008: Re-factor location bar/toolbar code to get rid of the browser dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ut fix Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/sync_global_error_unittest.cc
diff --git a/chrome/browser/sync/sync_global_error_unittest.cc b/chrome/browser/sync/sync_global_error_unittest.cc
index 7405def645fbe7ebfd7a521e4fcfd266fba812df..0f7943eddf2ba28c70c7e6752ac650801a8debeb 100644
--- a/chrome/browser/sync/sync_global_error_unittest.cc
+++ b/chrome/browser/sync/sync_global_error_unittest.cc
@@ -17,9 +17,10 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+using ::testing::NiceMock;
using ::testing::Return;
using ::testing::ReturnRef;
-using ::testing::NiceMock;
+using ::testing::_;
using content::BrowserThread;
namespace {
@@ -28,7 +29,8 @@ class BrowserMock: public Browser {
public:
explicit BrowserMock(Type type, Profile* profile) : Browser(type, profile) {}
- MOCK_METHOD1(ExecuteCommand, void(int command_id));
+ MOCK_METHOD2(ExecuteCommandWithDisposition,
+ void(int command_id, WindowOpenDisposition));
};
// Same as BrowserWithTestWindowTest, but uses MockBrowser to test calls to
@@ -87,7 +89,8 @@ void VerifySyncGlobalErrorResult(NiceMock<ProfileSyncServiceMock>* service,
#if defined(OS_CHROMEOS)
if (error_state != GoogleServiceAuthError::NONE) {
// In CrOS sign-in/sign-out is made to fix the error.
- EXPECT_CALL(*static_cast<BrowserMock*>(browser), ExecuteCommand(IDC_EXIT));
+ EXPECT_CALL(*static_cast<BrowserMock*>(browser),
+ ExecuteCommandWithDisposition(IDC_EXIT, _));
error->ExecuteMenuItem(browser);
}
#else

Powered by Google App Engine
This is Rietveld 408576698