summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-15 17:22:28 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-15 17:22:28 +0000
commit0f1afed8d9f9f1849006fc6d93305d14986d16b6 (patch)
tree317787b597343760331431458fba0486bc49670f /chrome/test/automation
parent9010941b17ea056d5dd8e28707262fa91d36b000 (diff)
downloadchromium_src-0f1afed8d9f9f1849006fc6d93305d14986d16b6.zip
chromium_src-0f1afed8d9f9f1849006fc6d93305d14986d16b6.tar.gz
chromium_src-0f1afed8d9f9f1849006fc6d93305d14986d16b6.tar.bz2
Keep deinlining stuff.
BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5783004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69273 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation')
-rw-r--r--chrome/test/automation/automation_proxy_uitest.cc42
-rw-r--r--chrome/test/automation/automation_proxy_uitest.h4
2 files changed, 28 insertions, 18 deletions
diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc
index f25ce10..76c22d5 100644
--- a/chrome/test/automation/automation_proxy_uitest.cc
+++ b/chrome/test/automation/automation_proxy_uitest.cc
@@ -637,6 +637,10 @@ ExternalTabUITestMockClient::ExternalTabUITestMockClient(int execution_timeout)
host_window_(NULL) {
}
+ExternalTabUITestMockClient::~ExternalTabUITestMockClient() {
+ EXPECT_TRUE(host_window_ == NULL);
+}
+
void ExternalTabUITestMockClient::ReplyStarted(
const IPC::AutomationURLResponse* response,
int tab_handle, int request_id) {
@@ -661,7 +665,8 @@ void ExternalTabUITestMockClient::ReplyEnd(const URLRequestStatus& status,
}
void ExternalTabUITestMockClient::Reply404(int tab_handle, int request_id) {
- const IPC::AutomationURLResponse notfound = {"", "HTTP/1.1 404\r\n\r\n"};
+ const IPC::AutomationURLResponse notfound("", "HTTP/1.1 404\r\n\r\n", 0,
+ base::Time(), "", 0);
ReplyStarted(&notfound, tab_handle, request_id);
ReplyEOF(tab_handle, request_id);
}
@@ -708,18 +713,25 @@ void ExternalTabUITestMockClient::InvalidateHandle(
}
// Most of the time we need external tab with these settings.
-const IPC::ExternalTabSettings ExternalTabUITestMockClient::default_settings = {
- NULL, gfx::Rect(), // will be replaced by CreateHostWindowAndTab
- WS_CHILD | WS_VISIBLE,
- false, // is_off_the_record
- true, // load_requests_via_automation
- true, // handle_top_level_requests
- GURL() // initial_url
-};
+const IPC::ExternalTabSettings ExternalTabUITestMockClient::default_settings(
+ NULL, gfx::Rect(), // will be replaced by CreateHostWindowAndTab
+ WS_CHILD | WS_VISIBLE,
+ false, // is_off_the_record
+ true, // load_requests_via_automation
+ true, // handle_top_level_requests
+ GURL(), // initial_url
+ GURL(), // referrer
+ false, // infobars_enabled
+ false); // route_all_top_level_navigations
// static
-const IPC::AutomationURLResponse ExternalTabUITestMockClient::http_200 =
- {"", "HTTP/0.9 200\r\n\r\n", };
+const IPC::AutomationURLResponse ExternalTabUITestMockClient::http_200(
+ "",
+ "HTTP/0.9 200\r\n\r\n",
+ 0,
+ base::Time(),
+ "",
+ 0);
void ExternalTabUITestMockClient::OnMessageReceived(const IPC::Message& msg) {
IPC_BEGIN_MESSAGE_MAP(ExternalTabUITestMockClient, msg)
@@ -1102,7 +1114,6 @@ TEST_F(ExternalTabUITest, FLAKY_HostNetworkStackAbortRequest) {
.Times(testing::AnyNumber());
std::string url = "http://placetogo.org";
- const IPC::AutomationURLResponse http_200 = {"", "HTTP/0.9 200\r\n\r\n", };
testing::InSequence sequence;
EXPECT_CALL(*mock_, OnRequestStart(1, 2, testing::AllOf(
@@ -1112,7 +1123,8 @@ TEST_F(ExternalTabUITest, FLAKY_HostNetworkStackAbortRequest) {
// We can simply do CreateFunctor(1, 2, &http_200) since we know the
// tab handle and request id, but using WithArgs<> is much more fancy :)
.WillOnce(testing::WithArgs<0, 1>(testing::Invoke(CreateFunctor(mock_,
- &ExternalTabUITestMockClient::ReplyStarted, &http_200))));
+ &ExternalTabUITestMockClient::ReplyStarted,
+ &ExternalTabUITestMockClient::http_200))));
// Return some trivial page, that have a link to a "logo.gif" image
const std::string data = "<!DOCTYPE html><title>Hello";
@@ -1145,7 +1157,6 @@ TEST_F(ExternalTabUITest, FLAKY_HostNetworkStackUnresponsiveRenderer) {
EXPECT_CALL(*mock_, OnLoad(_, _)).Times(testing::AnyNumber());
std::string url = "http://placetogo.org";
- const IPC::AutomationURLResponse http_200 = {"", "HTTP/0.9 200\r\n\r\n", };
EXPECT_CALL(*mock_, OnRequestStart(1, 3, testing::_))
.Times(testing::AnyNumber());
@@ -1159,7 +1170,8 @@ TEST_F(ExternalTabUITest, FLAKY_HostNetworkStackUnresponsiveRenderer) {
// We can simply do CreateFunctor(1, 2, &http_200) since we know the
// tab handle and request id, but using WithArgs<> is much more fancy :)
.WillOnce(testing::WithArgs<0, 1>(testing::Invoke(CreateFunctor(mock_,
- &ExternalTabUITestMockClient::ReplyStarted, &http_200))));
+ &ExternalTabUITestMockClient::ReplyStarted,
+ &ExternalTabUITestMockClient::http_200))));
const std::string head = "<html><title>Hello</title><body>";
diff --git a/chrome/test/automation/automation_proxy_uitest.h b/chrome/test/automation/automation_proxy_uitest.h
index 55da8cc..1f2c9f3 100644
--- a/chrome/test/automation/automation_proxy_uitest.h
+++ b/chrome/test/automation/automation_proxy_uitest.h
@@ -35,9 +35,7 @@ class AutomationProxyVisibleTest : public UITest {
class ExternalTabUITestMockClient : public AutomationProxy {
public:
explicit ExternalTabUITestMockClient(int execution_timeout);
- ~ExternalTabUITestMockClient() {
- EXPECT_TRUE(host_window_ == NULL);
- }
+ virtual ~ExternalTabUITestMockClient();
MOCK_METHOD2(OnDidNavigate, void(int tab_handle,
const IPC::NavigationInfo& nav_info));