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

Unified Diff: remoting/host/resizing_host_observer_unittest.cc

Issue 12678008: Reworked the plumbing required to pass the client resolution to the desktop resizer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/resizing_host_observer_unittest.cc
diff --git a/remoting/host/resizing_host_observer_unittest.cc b/remoting/host/resizing_host_observer_unittest.cc
index f318bc5d8ea5724e3cad69ae6749b448fff78463..cc4019aa89649e0634149f8410be5e20579ef49a 100644
--- a/remoting/host/resizing_host_observer_unittest.cc
+++ b/remoting/host/resizing_host_observer_unittest.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "remoting/host/desktop_resizer.h"
#include "remoting/host/resizing_host_observer.h"
+#include "remoting/host/screen_resolution.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkSize.h"
@@ -15,6 +16,8 @@ std::ostream& operator<<(std::ostream& os, const SkISize& size) {
return os << size.width() << "x" << size.height();
}
+const int kDefaultDPI = 96;
Jamie 2013/03/15 22:06:27 Anonymous namespace?
alexeypa (please no reviews) 2013/03/15 22:32:12 Not needed. See my previous comment.
+
namespace remoting {
class FakeDesktopResizer : public DesktopResizer {
@@ -79,7 +82,8 @@ class ResizingHostObserverTest : public testing::Test {
}
SkISize GetBestSize(const SkISize& client_size) {
- resizing_host_observer_->OnClientResolutionChanged(SkIPoint(), client_size);
+ resizing_host_observer_->SetScreenResolution(ScreenResolution(
+ client_size, SkIPoint::Make(kDefaultDPI, kDefaultDPI)));
return desktop_resizer_->GetCurrentSize();
}

Powered by Google App Engine
This is Rietveld 408576698