summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test/infobar_unittests.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome_frame/test/infobar_unittests.cc')
-rw-r--r--chrome_frame/test/infobar_unittests.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/chrome_frame/test/infobar_unittests.cc b/chrome_frame/test/infobar_unittests.cc
index b84c79a..63e910c 100644
--- a/chrome_frame/test/infobar_unittests.cc
+++ b/chrome_frame/test/infobar_unittests.cc
@@ -195,6 +195,22 @@ template <typename WINDOW, typename DELEGATE> void ExpectNcCalcSizeSequence(
EXPECT_CALL(*mock_window,
OnSize(0, CSize(modified_rect->right - modified_rect->left,
modified_rect->bottom - modified_rect->top)));
+
+ EXPECT_CALL(*mock_window, OnNcCalcSize(true, testing::_))
+ .Times(testing::Between(0, 1))
+ .WillOnce(RespondToNcCalcSize(0, natural_rect));
+ EXPECT_CALL(*delegate,
+ AdjustDisplacedWindowDimensions(EqualRect(natural_rect)))
+ .Times(testing::Between(0, 1))
+ .WillOnce(testing::SetArgumentPointee<0>(*modified_rect));
+ EXPECT_CALL(*mock_window, OnMove(CPoint(modified_rect->left,
+ modified_rect->top)))
+ .Times(testing::Between(0, 1));
+ EXPECT_CALL(*mock_window,
+ OnSize(0, CSize(modified_rect->right - modified_rect->left,
+ modified_rect->bottom - modified_rect->top)))
+ .Times(testing::Between(0, 1));
+
}
template <typename WINDOW, typename DELEGATE, typename MANAGER>
@@ -211,6 +227,9 @@ template <typename WINDOW, typename DELEGATE, typename MANAGER>
// and subclasses the displaced window on demand.
manager->UpdateLayout();
+ testing::Mock::VerifyAndClearExpectations(mock_window);
+ testing::Mock::VerifyAndClearExpectations(delegate);
+
ExpectNcCalcSizeSequence(
mock_window, delegate, &natural_rects[1], &natural_rects[1]);
// The second time through, trigger it through the original window.