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

Unified Diff: chrome/browser/renderer_host/render_widget_host_unittest.cc

Issue 112042: Prevent an extra copy of data types that get passed into IPC messages when... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/tuple.h ('k') | chrome/common/ipc_fuzzing_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_widget_host_unittest.cc
===================================================================
--- chrome/browser/renderer_host/render_widget_host_unittest.cc (revision 16437)
+++ chrome/browser/renderer_host/render_widget_host_unittest.cc (working copy)
@@ -275,11 +275,11 @@
const IPC::Message* set_background =
process_->sink().GetUniqueMessageMatching(ViewMsg_SetBackground::ID);
ASSERT_TRUE(set_background);
- SkBitmap sent_background;
+ Tuple1<SkBitmap> sent_background;
ViewMsg_SetBackground::Read(set_background, &sent_background);
- EXPECT_EQ(background.getSize(), sent_background.getSize());
+ EXPECT_EQ(background.getSize(), sent_background.a.getSize());
EXPECT_TRUE(0 == memcmp(background.getPixels(),
- sent_background.getPixels(),
+ sent_background.a.getPixels(),
background.getSize()));
#else
// TODO(port): When custom backgrounds are implemented for other ports, this
@@ -377,9 +377,9 @@
const IPC::Message* restored = process_->sink().GetUniqueMessageMatching(
ViewMsg_WasRestored::ID);
ASSERT_TRUE(restored);
- bool needs_repaint;
+ Tuple1<bool> needs_repaint;
ViewMsg_WasRestored::Read(restored, &needs_repaint);
- EXPECT_TRUE(needs_repaint);
+ EXPECT_TRUE(needs_repaint.a);
}
TEST_F(RenderWidgetHostTest, HandleKeyEventsWeSent) {
« no previous file with comments | « base/tuple.h ('k') | chrome/common/ipc_fuzzing_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698