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

Unified Diff: remoting/host/session_manager_unittest.cc

Issue 3013015: Initial pass at integrating Differ into the chromoting host code.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | « remoting/host/session_manager.cc ('k') | remoting/host/simple_host_process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/session_manager_unittest.cc
===================================================================
--- remoting/host/session_manager_unittest.cc (revision 55264)
+++ remoting/host/session_manager_unittest.cc (working copy)
@@ -53,8 +53,12 @@
}
ACTION_P2(RunCallback, rects, data) {
- RectVector& dirty_rects = data->mutable_dirty_rects();
- dirty_rects.insert(dirty_rects.end(), rects.begin(), rects.end());
+ InvalidRects& dirty_rects = data->mutable_dirty_rects();
+ InvalidRects temp_rects;
+ std::set_union(dirty_rects.begin(), dirty_rects.end(),
+ rects.begin(), rects.end(),
+ std::inserter(temp_rects, temp_rects.begin()));
+ dirty_rects.swap(temp_rects);
arg0->Run(data);
delete arg0;
}
@@ -79,8 +83,8 @@
TEST_F(SessionManagerTest, OneRecordCycle) {
Init();
- RectVector update_rects;
- update_rects.push_back(gfx::Rect(0, 0, 10, 10));
+ InvalidRects update_rects;
+ update_rects.insert(gfx::Rect(0, 0, 10, 10));
DataPlanes planes;
for (int i = 0; i < DataPlanes::kPlaneCount; ++i) {
planes.data[i] = reinterpret_cast<uint8*>(i);
@@ -98,7 +102,6 @@
record_->AddClient(client_);
// First the capturer is called.
- EXPECT_CALL(*capturer_, InvalidateFullScreen());
EXPECT_CALL(*capturer_, CaptureInvalidRects(NotNull()))
.WillOnce(RunCallback(update_rects, data));
@@ -115,7 +118,6 @@
.Times(AtLeast(0))
.WillRepeatedly(Return(0));
-
// Start the recording.
record_->Start();
« no previous file with comments | « remoting/host/session_manager.cc ('k') | remoting/host/simple_host_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698