| 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/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 #include "app/message_box_flags.h" | 9 #include "app/message_box_flags.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 mock_->host_window_style_ &= ~WS_VISIBLE; | 919 mock_->host_window_style_ &= ~WS_VISIBLE; |
| 920 tab = mock_->CreateTabWithUrl(GURL()); | 920 tab = mock_->CreateTabWithUrl(GURL()); |
| 921 EXPECT_TRUE(tab->GetCookieByName(url, "robert", &value_result)); | 921 EXPECT_TRUE(tab->GetCookieByName(url, "robert", &value_result)); |
| 922 EXPECT_EQ("", value_result); | 922 EXPECT_EQ("", value_result); |
| 923 EXPECT_CALL(*mock_, HandleClosed(1)).Times(1); | 923 EXPECT_CALL(*mock_, HandleClosed(1)).Times(1); |
| 924 mock_->DestroyHostWindow(); | 924 mock_->DestroyHostWindow(); |
| 925 CloseBrowserAndServer(); | 925 CloseBrowserAndServer(); |
| 926 tab = NULL; | 926 tab = NULL; |
| 927 } | 927 } |
| 928 | 928 |
| 929 TEST_F(ExternalTabUITest, TabPostMessage) { | 929 // FLAKY: http://crbug.com/44617 |
| 930 TEST_F(ExternalTabUITest, FLAKY_TabPostMessage) { |
| 930 scoped_refptr<TabProxy> tab; | 931 scoped_refptr<TabProxy> tab; |
| 931 TimedMessageLoopRunner loop(MessageLoop::current()); | 932 TimedMessageLoopRunner loop(MessageLoop::current()); |
| 932 ASSERT_THAT(mock_, testing::NotNull()); | 933 ASSERT_THAT(mock_, testing::NotNull()); |
| 933 | 934 |
| 934 EXPECT_CALL(*mock_, OnNavigationStateChanged(_, _, _)) | 935 EXPECT_CALL(*mock_, OnNavigationStateChanged(_, _, _)) |
| 935 .Times(testing::AnyNumber()); | 936 .Times(testing::AnyNumber()); |
| 936 EXPECT_CALL(*mock_, OnLoad(_, _)).Times(testing::AnyNumber()); | 937 EXPECT_CALL(*mock_, OnLoad(_, _)).Times(testing::AnyNumber()); |
| 937 | 938 |
| 938 std::string content = | 939 std::string content = |
| 939 "data:text/html,<html><head><script>" | 940 "data:text/html,<html><head><script>" |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1504 | 1505 |
| 1505 // Allow some time for the popup to show up and close. | 1506 // Allow some time for the popup to show up and close. |
| 1506 PlatformThread::Sleep(sleep_timeout_ms()); | 1507 PlatformThread::Sleep(sleep_timeout_ms()); |
| 1507 | 1508 |
| 1508 std::wstring expected(L"string"); | 1509 std::wstring expected(L"string"); |
| 1509 std::wstring jscript = CreateJSString(L"\"" + expected + L"\""); | 1510 std::wstring jscript = CreateJSString(L"\"" + expected + L"\""); |
| 1510 std::wstring actual; | 1511 std::wstring actual; |
| 1511 ASSERT_TRUE(tab->ExecuteAndExtractString(L"", jscript, &actual)); | 1512 ASSERT_TRUE(tab->ExecuteAndExtractString(L"", jscript, &actual)); |
| 1512 ASSERT_EQ(expected, actual); | 1513 ASSERT_EQ(expected, actual); |
| 1513 } | 1514 } |
| OLD | NEW |