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

Unified Diff: services/view_manager/view_coordinate_conversions_unittest.cc

Issue 772893004: Adds constants and runner for animations (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Merge Created 6 years 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 | « services/view_manager/test_server_view_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/view_manager/view_coordinate_conversions_unittest.cc
diff --git a/services/view_manager/view_coordinate_conversions_unittest.cc b/services/view_manager/view_coordinate_conversions_unittest.cc
index f7eba915ec64d0a4b4c5abe31bbbce2f0c2cdcca..786717524dac0a8d1bca58bee7c8920f8f4cecdd 100644
--- a/services/view_manager/view_coordinate_conversions_unittest.cc
+++ b/services/view_manager/view_coordinate_conversions_unittest.cc
@@ -4,6 +4,7 @@
#include "services/view_manager/server_view.h"
#include "services/view_manager/server_view_delegate.h"
+#include "services/view_manager/test_server_view_delegate.h"
#include "services/view_manager/view_coordinate_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/rect.h"
@@ -11,46 +12,11 @@
namespace mojo {
namespace service {
-namespace {
-
-class MockServerViewDelegate : public ServerViewDelegate {
- public:
- MockServerViewDelegate() {}
- ~MockServerViewDelegate() override {}
-
- private:
- // ServerViewDelegate:
- void OnWillDestroyView(ServerView* view) override {}
- void OnViewDestroyed(const ServerView* view) override {}
- void OnWillChangeViewHierarchy(ServerView* view,
- ServerView* new_parent,
- ServerView* old_parent) override {}
- void OnViewHierarchyChanged(const ServerView* view,
- const ServerView* new_parent,
- const ServerView* old_parent) override {}
- void OnViewBoundsChanged(const ServerView* view,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) override {}
- void OnViewSurfaceIdChanged(const ServerView* view) override {}
- void OnViewReordered(const ServerView* view,
- const ServerView* relative,
- OrderDirection direction) override {}
- void OnWillChangeViewVisibility(ServerView* view) override {}
- void OnViewSharedPropertyChanged(
- const ServerView* view,
- const std::string& name,
- const std::vector<uint8_t>* new_data) override {}
- void OnScheduleViewPaint(const ServerView* view) override {}
-
- DISALLOW_COPY_AND_ASSIGN(MockServerViewDelegate);
-};
-
-} // namespace
using ViewCoordinateConversionsTest = testing::Test;
TEST_F(ViewCoordinateConversionsTest, ConvertRectBetweenViews) {
- MockServerViewDelegate d1, d2, d3;
+ TestServerViewDelegate d1, d2, d3;
ServerView v1(&d1, ViewId()), v2(&d2, ViewId()), v3(&d3, ViewId());
v1.SetBounds(gfx::Rect(1, 2, 100, 100));
v2.SetBounds(gfx::Rect(3, 4, 100, 100));
« no previous file with comments | « services/view_manager/test_server_view_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698