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

Side by Side Diff: chrome_frame/test/mock_ie_event_sink_actions.h

Issue 7069023: Reenable the ChromeFrame ContextMenuTest.CFSaveLinkAs test. Increased the timeout for the file sa... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
« no previous file with comments | « no previous file | chrome_frame/test/ui_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_ACTIONS_H_ 5 #ifndef CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_ACTIONS_H_
6 #define CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_ACTIONS_H_ 6 #define CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_ACTIONS_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 if (got_selection) { 340 if (got_selection) {
341 EXPECT_EQ(expected_text, actual_text); 341 EXPECT_EQ(expected_text, actual_text);
342 } 342 }
343 } 343 }
344 344
345 // Polling actions 345 // Polling actions
346 346
347 ACTION_P3(CloseWhenFileSaved, mock, file, timeout_ms) { 347 ACTION_P3(CloseWhenFileSaved, mock, file, timeout_ms) {
348 base::Time start = base::Time::Now(); 348 base::Time start = base::Time::Now();
349 while (!file_util::PathExists(file)) { 349 while (!file_util::PathExists(file)) {
350 base::PlatformThread::Sleep(200);
351 if ((base::Time::Now() - start).InMilliseconds() > timeout_ms) { 350 if ((base::Time::Now() - start).InMilliseconds() > timeout_ms) {
352 ADD_FAILURE() << "File was not saved within timeout"; 351 ADD_FAILURE() << "File was not saved within timeout";
353 break; 352 break;
354 } 353 }
354 base::PlatformThread::Sleep(200);
355 } 355 }
356 mock->event_sink()->CloseWebBrowser(); 356 mock->event_sink()->CloseWebBrowser();
357 } 357 }
358 358
359 ACTION_P2(WaitForFileSave, file, timeout_ms) { 359 ACTION_P2(WaitForFileSave, file, timeout_ms) {
360 base::Time start = base::Time::Now(); 360 base::Time start = base::Time::Now();
361 while (!file_util::PathExists(file)) { 361 while (!file_util::PathExists(file)) {
362 base::PlatformThread::Sleep(200); 362 base::PlatformThread::Sleep(200);
363 if ((base::Time::Now() - start).InMilliseconds() > timeout_ms) { 363 if ((base::Time::Now() - start).InMilliseconds() > timeout_ms) {
364 ADD_FAILURE() << "File was not saved within timeout"; 364 ADD_FAILURE() << "File was not saved within timeout";
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 next_delay = next_delay + kInterval; 399 next_delay = next_delay + kInterval;
400 400
401 loop->PostDelayedTask(FROM_HERE, NewRunnableFunction( 401 loop->PostDelayedTask(FROM_HERE, NewRunnableFunction(
402 simulate_input::SendCharA, VK_RETURN, simulate_input::NONE), 402 simulate_input::SendCharA, VK_RETURN, simulate_input::NONE),
403 next_delay); 403 next_delay);
404 } 404 }
405 405
406 } // namespace chrome_frame_test 406 } // namespace chrome_frame_test
407 407
408 #endif // CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_ACTIONS_H_ 408 #endif // CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_ACTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome_frame/test/ui_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698