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

Side by Side Diff: chrome_frame/test/ready_mode_unittest.cc

Issue 10007043: Attempt to fix ChromeFrameTestWithWebServer tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added retry logic for WidgetModeIE_Version. Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <atlbase.h> 5 #include <atlbase.h>
6 #include <atlapp.h> 6 #include <atlapp.h>
7 #include <atlmisc.h> 7 #include <atlmisc.h>
8 #include <atlwin.h> 8 #include <atlwin.h>
9 9
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 bool ClickOnCaption(const std::wstring& caption) { 206 bool ClickOnCaption(const std::wstring& caption) {
207 ClickOnCaptionData data = {caption.c_str(), false}; 207 ClickOnCaptionData data = {caption.c_str(), false};
208 208
209 ::EnumChildWindows(hwnd_, ClickOnCaptionProc, 209 ::EnumChildWindows(hwnd_, ClickOnCaptionProc,
210 reinterpret_cast<LPARAM>(&data)); 210 reinterpret_cast<LPARAM>(&data));
211 return data.found; 211 return data.found;
212 } 212 }
213 213
214 void RunUntilCloseInfobar() { 214 void RunUntilCloseInfobar() {
215 EXPECT_CALL(frame_, CloseInfobar()).WillOnce(QUIT_LOOP(message_loop_)); 215 EXPECT_CALL(frame_, CloseInfobar()).WillOnce(QUIT_LOOP(message_loop_));
216 ASSERT_NO_FATAL_FAILURE(message_loop_.RunFor(5)); // seconds 216 ASSERT_NO_FATAL_FAILURE(message_loop_.RunFor(
217 base::TimeDelta::FromSeconds(5)));
217 } 218 }
218 219
219 chrome_frame_test::TimedMsgLoop message_loop_; 220 chrome_frame_test::TimedMsgLoop message_loop_;
220 }; // class ReadyPromptWindowButtonTest 221 }; // class ReadyPromptWindowButtonTest
221 222
222 TEST_F(ReadyPromptTest, ReadyPromptContentTest) { 223 TEST_F(ReadyPromptTest, ReadyPromptContentTest) {
223 // owned by ReadyPromptContent 224 // owned by ReadyPromptContent
224 MockReadyModeState* state = new MockReadyModeState(); 225 MockReadyModeState* state = new MockReadyModeState();
225 MockUrlLauncher* url_launcher = new MockUrlLauncher(); 226 MockUrlLauncher* url_launcher = new MockUrlLauncher();
226 227
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 277
277 TEST_F(ReadyPromptWindowButtonTest, ClickIgnore) { 278 TEST_F(ReadyPromptWindowButtonTest, ClickIgnore) {
278 EXPECT_CALL(*state_, PermanentlyDeclineChromeFrame()); 279 EXPECT_CALL(*state_, PermanentlyDeclineChromeFrame());
279 ASSERT_TRUE(ClickOnCaption(L"Ignore")); 280 ASSERT_TRUE(ClickOnCaption(L"Ignore"));
280 RunUntilCloseInfobar(); 281 RunUntilCloseInfobar();
281 } 282 }
282 283
283 // TODO(erikwright): test WebBrowserAdapter 284 // TODO(erikwright): test WebBrowserAdapter
284 // TODO(erikwright): an integration test of ReadyMode::Configure with a mock 285 // TODO(erikwright): an integration test of ReadyMode::Configure with a mock
285 // IWebBrowser2? 286 // IWebBrowser2?
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698