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

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

Issue 9447084: Refactor Pickle Read methods to use higher performance PickleIterator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile (racing with incoming CLs) Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/automation/automation_proxy.cc ('k') | chrome_frame/cfproxy_support.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) 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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 testing::EndsWith("favicon.ico")), 750 testing::EndsWith("favicon.ico")),
751 testing::Field(&AutomationURLRequest::method, StrEq("GET"))))) 751 testing::Field(&AutomationURLRequest::method, StrEq("GET")))))
752 .Times(testing::AnyNumber()) 752 .Times(testing::AnyNumber())
753 .WillRepeatedly(testing::WithArgs<0, 0>(testing::Invoke( 753 .WillRepeatedly(testing::WithArgs<0, 0>(testing::Invoke(
754 CreateFunctor(this, &ExternalTabUITestMockClient::ReplyEnd, 754 CreateFunctor(this, &ExternalTabUITestMockClient::ReplyEnd,
755 net::URLRequestStatus(net::URLRequestStatus::FAILED, 0))))); 755 net::URLRequestStatus(net::URLRequestStatus::FAILED, 0)))));
756 } 756 }
757 757
758 void ExternalTabUITestMockClient::InvalidateHandle( 758 void ExternalTabUITestMockClient::InvalidateHandle(
759 const IPC::Message& message) { 759 const IPC::Message& message) {
760 void* iter = NULL; 760 PickleIterator iter(message);
761 int handle; 761 int handle;
762 ASSERT_TRUE(message.ReadInt(&iter, &handle)); 762 ASSERT_TRUE(message.ReadInt(&iter, &handle));
763 763
764 // Call base class 764 // Call base class
765 AutomationProxy::InvalidateHandle(message); 765 AutomationProxy::InvalidateHandle(message);
766 HandleClosed(handle); 766 HandleClosed(handle);
767 } 767 }
768 768
769 // static 769 // static
770 ExternalTabSettings ExternalTabUITestMockClient::GetDefaultSettings() { 770 ExternalTabSettings ExternalTabUITestMockClient::GetDefaultSettings() {
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
1581 1581
1582 std::string data; 1582 std::string data;
1583 ASSERT_NO_FATAL_FAILURE(AssertReadPNG(snapshot_path_, &data)); 1583 ASSERT_NO_FATAL_FAILURE(AssertReadPNG(snapshot_path_, &data));
1584 EXPECT_STREQ(kReferenceMd5, base::MD5String(data).c_str()); 1584 EXPECT_STREQ(kReferenceMd5, base::MD5String(data).c_str());
1585 if (CommandLine::ForCurrentProcess()->HasSwitch("dump-test-image")) { 1585 if (CommandLine::ForCurrentProcess()->HasSwitch("dump-test-image")) {
1586 FilePath path(FILE_PATH_LITERAL("snapshot.png")); 1586 FilePath path(FILE_PATH_LITERAL("snapshot.png"));
1587 EXPECT_EQ(file_util::WriteFile(path, &data[0], data.length()), 1587 EXPECT_EQ(file_util::WriteFile(path, &data[0], data.length()),
1588 static_cast<int>(data.length())); 1588 static_cast<int>(data.length()));
1589 } 1589 }
1590 } 1590 }
OLDNEW
« no previous file with comments | « chrome/test/automation/automation_proxy.cc ('k') | chrome_frame/cfproxy_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698