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

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

Issue 9460019: Reduce flakiness in chrome_frame_tests.exe by having each run in a clean environment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed compile break 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 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 "chrome_frame/test/chrome_frame_automation_mock.h" 5 #include "chrome_frame/test/chrome_frame_automation_mock.h"
6 #include "chrome_frame/test/chrome_frame_test_utils.h" 6 #include "chrome_frame/test/chrome_frame_test_utils.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 const int kLongWaitTimeout = 25 * 1000; 9 const int kLongWaitTimeout = 25 * 1000;
10 const int kShortWaitTimeout = 5 * 1000;
11 10
12 // This test has been marked as flaky as it randomly times out on the CF 11 TEST(ChromeFrame, Launch) {
13 // builders
14 // http://code.google.com/p/chromium/issues/detail?id=81479
15 TEST(ChromeFrame, DISABLED_Launch) {
16 MessageLoopForUI loop; 12 MessageLoopForUI loop;
17 AutomationMockLaunch mock_launch(&loop, kLongWaitTimeout); 13 AutomationMockLaunch mock_launch(&loop, kLongWaitTimeout);
18 14
19 loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), kLongWaitTimeout); 15 loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), kLongWaitTimeout);
20 16
21 mock_launch.Navigate("about:blank"); 17 mock_launch.Navigate("about:blank");
22 loop.RunWithDispatcher(NULL); 18 loop.RunWithDispatcher(NULL);
23 EXPECT_TRUE(mock_launch.launch_result()); 19 EXPECT_TRUE(mock_launch.launch_result());
24 } 20 }
25 21
(...skipping 12 matching lines...) Expand all
38 MessageLoopForUI loop; 34 MessageLoopForUI loop;
39 AutomationMockPostMessage mock_postmessage(&loop, kLongWaitTimeout); 35 AutomationMockPostMessage mock_postmessage(&loop, kLongWaitTimeout);
40 36
41 loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), kLongWaitTimeout); 37 loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), kLongWaitTimeout);
42 38
43 mock_postmessage.NavigateRelativeFile(L"postmessage_basic_frame.html"); 39 mock_postmessage.NavigateRelativeFile(L"postmessage_basic_frame.html");
44 loop.RunWithDispatcher(NULL); 40 loop.RunWithDispatcher(NULL);
45 EXPECT_FALSE(mock_postmessage.postmessage_result()); 41 EXPECT_FALSE(mock_postmessage.postmessage_result());
46 } 42 }
47 43
48 // Marking this test as flaky as it fails randomly on the CF builders. 44 TEST(ChromeFrame, RequestStart) {
49 // http://code.google.com/p/chromium/issues/detail?id=81479
50 TEST(ChromeFrame, DISABLED_RequestStart) {
51 MessageLoopForUI loop; 45 MessageLoopForUI loop;
52 AutomationMockHostNetworkRequestStart mock_request_start(&loop, 46 AutomationMockHostNetworkRequestStart mock_request_start(&loop,
53 kLongWaitTimeout); 47 kLongWaitTimeout);
54 48
55 loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), kLongWaitTimeout); 49 loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), kLongWaitTimeout);
56 50
57 mock_request_start.NavigateRelative(L"postmessage_basic_frame.html"); 51 mock_request_start.NavigateRelative(L"postmessage_basic_frame.html");
58 loop.RunWithDispatcher(NULL); 52 loop.RunWithDispatcher(NULL);
59 EXPECT_TRUE(mock_request_start.request_start_result()); 53 EXPECT_TRUE(mock_request_start.request_start_result());
60 } 54 }
61 55
OLDNEW
« no previous file with comments | « chrome_frame/test/chrome_frame_automation_mock.h ('k') | chrome_frame/test/chrome_frame_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698