OLD | NEW |
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 | 10 |
11 // Note that this test fails occasionally. Disabling it altogether (rather than | 11 TEST(ChromeFrame, Launch) { |
12 // marking as flaky to see if the failure cascades down to the next test. | |
13 // http://crbug.com/81479 | |
14 TEST(ChromeFrame, DISABLED_Launch) { | |
15 MessageLoopForUI loop; | 12 MessageLoopForUI loop; |
16 AutomationMockLaunch mock_launch(&loop, kLongWaitTimeout); | 13 AutomationMockLaunch mock_launch(&loop, kLongWaitTimeout); |
17 | 14 |
18 loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), kLongWaitTimeout); | 15 loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), kLongWaitTimeout); |
19 | 16 |
20 mock_launch.Navigate("about:blank"); | 17 mock_launch.Navigate("about:blank"); |
21 loop.RunWithDispatcher(NULL); | 18 loop.RunWithDispatcher(NULL); |
22 EXPECT_TRUE(mock_launch.launch_result()); | 19 EXPECT_TRUE(mock_launch.launch_result()); |
23 } | 20 } |
24 | 21 |
(...skipping 24 matching lines...) Expand all Loading... |
49 AutomationMockHostNetworkRequestStart mock_request_start(&loop, | 46 AutomationMockHostNetworkRequestStart mock_request_start(&loop, |
50 kLongWaitTimeout); | 47 kLongWaitTimeout); |
51 | 48 |
52 loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), kLongWaitTimeout); | 49 loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), kLongWaitTimeout); |
53 | 50 |
54 mock_request_start.NavigateRelative(L"postmessage_basic_frame.html"); | 51 mock_request_start.NavigateRelative(L"postmessage_basic_frame.html"); |
55 loop.RunWithDispatcher(NULL); | 52 loop.RunWithDispatcher(NULL); |
56 EXPECT_TRUE(mock_request_start.request_start_result()); | 53 EXPECT_TRUE(mock_request_start.request_start_result()); |
57 } | 54 } |
58 | 55 |
OLD | NEW |