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

Side by Side Diff: chrome/test/automation/automation_proxy_uitest.cc

Issue 2881028: GTTF: test server cleanup: (Closed)
Patch Set: final Created 10 years, 5 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
« no previous file with comments | « chrome/renderer/external_extension_uitest.cc ('k') | chrome/test/in_process_browser_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) 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 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 QUIT_LOOP_SOON(&loop, 50))); 965 QUIT_LOOP_SOON(&loop, 50)));
966 966
967 EXPECT_CALL(*mock_, HandleClosed(1)).Times(1); 967 EXPECT_CALL(*mock_, HandleClosed(1)).Times(1);
968 968
969 tab = mock_->CreateTabWithUrl(GURL(content)); 969 tab = mock_->CreateTabWithUrl(GURL(content));
970 loop.RunFor(action_max_timeout_ms()); 970 loop.RunFor(action_max_timeout_ms());
971 } 971 }
972 972
973 TEST_F(ExternalTabUITest, FLAKY_PostMessageTarget) { 973 TEST_F(ExternalTabUITest, FLAKY_PostMessageTarget) {
974 const wchar_t kDocRoot[] = L"chrome/test/data/external_tab"; 974 const wchar_t kDocRoot[] = L"chrome/test/data/external_tab";
975 scoped_refptr<HTTPTestServer> server( 975 scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
976 HTTPTestServer::CreateServer(kDocRoot, NULL));
977 ASSERT_THAT(server.get(), testing::NotNull()); 976 ASSERT_THAT(server.get(), testing::NotNull());
978 977
979 scoped_refptr<TabProxy> tab; 978 scoped_refptr<TabProxy> tab;
980 TimedMessageLoopRunner loop(MessageLoop::current()); 979 TimedMessageLoopRunner loop(MessageLoop::current());
981 ASSERT_THAT(mock_, testing::NotNull()); 980 ASSERT_THAT(mock_, testing::NotNull());
982 EXPECT_CALL(*mock_, OnNavigationStateChanged(_, _, _)) 981 EXPECT_CALL(*mock_, OnNavigationStateChanged(_, _, _))
983 .Times(testing::AnyNumber()); 982 .Times(testing::AnyNumber());
984 EXPECT_CALL(*mock_, OnLoad(_, _)).Times(testing::AnyNumber()); 983 EXPECT_CALL(*mock_, OnLoad(_, _)).Times(testing::AnyNumber());
985 984
986 std::string kTestMessage("Hello from gtest"); 985 std::string kTestMessage("Hello from gtest");
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 1489
1491 // Allow some time for the popup to show up and close. 1490 // Allow some time for the popup to show up and close.
1492 PlatformThread::Sleep(sleep_timeout_ms()); 1491 PlatformThread::Sleep(sleep_timeout_ms());
1493 1492
1494 std::wstring expected(L"string"); 1493 std::wstring expected(L"string");
1495 std::wstring jscript = CreateJSString(L"\"" + expected + L"\""); 1494 std::wstring jscript = CreateJSString(L"\"" + expected + L"\"");
1496 std::wstring actual; 1495 std::wstring actual;
1497 ASSERT_TRUE(tab->ExecuteAndExtractString(L"", jscript, &actual)); 1496 ASSERT_TRUE(tab->ExecuteAndExtractString(L"", jscript, &actual));
1498 ASSERT_EQ(expected, actual); 1497 ASSERT_EQ(expected, actual);
1499 } 1498 }
OLDNEW
« no previous file with comments | « chrome/renderer/external_extension_uitest.cc ('k') | chrome/test/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698