OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "app/app_switches.h" | 7 #include "app/app_switches.h" |
8 #include "app/message_box_flags.h" | 8 #include "app/message_box_flags.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 EXPECT_CALL(*mock_, HandleClosed(1)).Times(1); | 1075 EXPECT_CALL(*mock_, HandleClosed(1)).Times(1); |
1076 | 1076 |
1077 EXPECT_CALL(*mock_, OnRequestRead(1, 4, testing::Gt(0))) | 1077 EXPECT_CALL(*mock_, OnRequestRead(1, 4, testing::Gt(0))) |
1078 .Times(1) | 1078 .Times(1) |
1079 .WillOnce(QUIT_LOOP_SOON(&loop, 300)); | 1079 .WillOnce(QUIT_LOOP_SOON(&loop, 300)); |
1080 | 1080 |
1081 tab = mock_->CreateTabWithUrl(GURL(url)); | 1081 tab = mock_->CreateTabWithUrl(GURL(url)); |
1082 loop.RunFor(action_max_timeout_ms()); | 1082 loop.RunFor(action_max_timeout_ms()); |
1083 } | 1083 } |
1084 | 1084 |
1085 TEST_F(ExternalTabUITest, HostNetworkStackAbortRequest) { | 1085 // Flaky, http://crbug.com/61023. |
| 1086 TEST_F(ExternalTabUITest, FLAKY_HostNetworkStackAbortRequest) { |
1086 scoped_refptr<TabProxy> tab; | 1087 scoped_refptr<TabProxy> tab; |
1087 TimedMessageLoopRunner loop(MessageLoop::current()); | 1088 TimedMessageLoopRunner loop(MessageLoop::current()); |
1088 ASSERT_THAT(mock_, testing::NotNull()); | 1089 ASSERT_THAT(mock_, testing::NotNull()); |
1089 EXPECT_CALL(*mock_, OnNavigationStateChanged(_, _, _)) | 1090 EXPECT_CALL(*mock_, OnNavigationStateChanged(_, _, _)) |
1090 .Times(testing::AnyNumber()); | 1091 .Times(testing::AnyNumber()); |
1091 | 1092 |
1092 std::string url = "http://placetogo.org"; | 1093 std::string url = "http://placetogo.org"; |
1093 const IPC::AutomationURLResponse http_200 = {"", "HTTP/0.9 200\r\n\r\n", }; | 1094 const IPC::AutomationURLResponse http_200 = {"", "HTTP/0.9 200\r\n\r\n", }; |
1094 | 1095 |
1095 testing::InSequence sequence; | 1096 testing::InSequence sequence; |
(...skipping 20 matching lines...) Expand all Loading... |
1116 EXPECT_CALL(*mock_, HandleClosed(1)).Times(1); | 1117 EXPECT_CALL(*mock_, HandleClosed(1)).Times(1); |
1117 | 1118 |
1118 EXPECT_CALL(*mock_, OnRequestEnd(1, 2, testing::_)) | 1119 EXPECT_CALL(*mock_, OnRequestEnd(1, 2, testing::_)) |
1119 .Times(1) | 1120 .Times(1) |
1120 .WillOnce(QUIT_LOOP_SOON(&loop, 300)); | 1121 .WillOnce(QUIT_LOOP_SOON(&loop, 300)); |
1121 | 1122 |
1122 tab = mock_->CreateTabWithUrl(GURL(url)); | 1123 tab = mock_->CreateTabWithUrl(GURL(url)); |
1123 loop.RunFor(action_max_timeout_ms()); | 1124 loop.RunFor(action_max_timeout_ms()); |
1124 } | 1125 } |
1125 | 1126 |
1126 TEST_F(ExternalTabUITest, HostNetworkStackUnresponsiveRenderer) { | 1127 // Flaky, http://crbug.com/61023. |
| 1128 TEST_F(ExternalTabUITest, FLAKY_HostNetworkStackUnresponsiveRenderer) { |
1127 scoped_refptr<TabProxy> tab; | 1129 scoped_refptr<TabProxy> tab; |
1128 TimedMessageLoopRunner loop(MessageLoop::current()); | 1130 TimedMessageLoopRunner loop(MessageLoop::current()); |
1129 ASSERT_THAT(mock_, testing::NotNull()); | 1131 ASSERT_THAT(mock_, testing::NotNull()); |
1130 EXPECT_CALL(*mock_, OnNavigationStateChanged(_, _, _)) | 1132 EXPECT_CALL(*mock_, OnNavigationStateChanged(_, _, _)) |
1131 .Times(testing::AnyNumber()); | 1133 .Times(testing::AnyNumber()); |
1132 EXPECT_CALL(*mock_, OnLoad(_, _)).Times(testing::AnyNumber()); | 1134 EXPECT_CALL(*mock_, OnLoad(_, _)).Times(testing::AnyNumber()); |
1133 | 1135 |
1134 std::string url = "http://placetogo.org"; | 1136 std::string url = "http://placetogo.org"; |
1135 const IPC::AutomationURLResponse http_200 = {"", "HTTP/0.9 200\r\n\r\n", }; | 1137 const IPC::AutomationURLResponse http_200 = {"", "HTTP/0.9 200\r\n\r\n", }; |
1136 | 1138 |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1499 | 1501 |
1500 // Allow some time for the popup to show up and close. | 1502 // Allow some time for the popup to show up and close. |
1501 PlatformThread::Sleep(sleep_timeout_ms()); | 1503 PlatformThread::Sleep(sleep_timeout_ms()); |
1502 | 1504 |
1503 std::wstring expected(L"string"); | 1505 std::wstring expected(L"string"); |
1504 std::wstring jscript = CreateJSString(L"\"" + expected + L"\""); | 1506 std::wstring jscript = CreateJSString(L"\"" + expected + L"\""); |
1505 std::wstring actual; | 1507 std::wstring actual; |
1506 ASSERT_TRUE(tab->ExecuteAndExtractString(L"", jscript, &actual)); | 1508 ASSERT_TRUE(tab->ExecuteAndExtractString(L"", jscript, &actual)); |
1507 ASSERT_EQ(expected, actual); | 1509 ASSERT_EQ(expected, actual); |
1508 } | 1510 } |
OLD | NEW |