Index: components/mus/public/cpp/tests/view_unittest.cc |
diff --git a/components/mus/public/cpp/tests/view_unittest.cc b/components/mus/public/cpp/tests/view_unittest.cc |
index c991ca3b9855695bc7ced6cf80f9d67b29f5d2fc..ca5c3b7453d5b3c9675ac15c3b784c61c58639e6 100644 |
--- a/components/mus/public/cpp/tests/view_unittest.cc |
+++ b/components/mus/public/cpp/tests/view_unittest.cc |
@@ -12,7 +12,7 @@ |
#include "components/mus/public/cpp/view_property.h" |
#include "testing/gtest/include/gtest/gtest.h" |
-namespace mus { |
+namespace mojo { |
// View ------------------------------------------------------------------------ |
@@ -423,7 +423,7 @@ |
struct Change { |
View* view; |
View* relative_view; |
- mojo::OrderDirection direction; |
+ OrderDirection direction; |
}; |
typedef std::vector<Change> Changes; |
@@ -442,13 +442,13 @@ |
// Overridden from ViewObserver: |
void OnViewReordering(View* view, |
View* relative_view, |
- mojo::OrderDirection direction) override { |
+ OrderDirection direction) override { |
OnViewReordered(view, relative_view, direction); |
} |
void OnViewReordered(View* view, |
View* relative_view, |
- mojo::OrderDirection direction) override { |
+ OrderDirection direction) override { |
Change change; |
change.view = view; |
change.relative_view = relative_view; |
@@ -488,11 +488,11 @@ |
ASSERT_EQ(2U, changes.size()); |
EXPECT_EQ(&v11, changes[0].view); |
EXPECT_EQ(&v13, changes[0].relative_view); |
- EXPECT_EQ(mojo::ORDER_DIRECTION_ABOVE, changes[0].direction); |
+ EXPECT_EQ(ORDER_DIRECTION_ABOVE, changes[0].direction); |
EXPECT_EQ(&v11, changes[1].view); |
EXPECT_EQ(&v13, changes[1].relative_view); |
- EXPECT_EQ(mojo::ORDER_DIRECTION_ABOVE, changes[1].direction); |
+ EXPECT_EQ(ORDER_DIRECTION_ABOVE, changes[1].direction); |
} |
{ |
@@ -508,11 +508,11 @@ |
ASSERT_EQ(2U, changes.size()); |
EXPECT_EQ(&v11, changes[0].view); |
EXPECT_EQ(&v12, changes[0].relative_view); |
- EXPECT_EQ(mojo::ORDER_DIRECTION_BELOW, changes[0].direction); |
+ EXPECT_EQ(ORDER_DIRECTION_BELOW, changes[0].direction); |
EXPECT_EQ(&v11, changes[1].view); |
EXPECT_EQ(&v12, changes[1].relative_view); |
- EXPECT_EQ(mojo::ORDER_DIRECTION_BELOW, changes[1].direction); |
+ EXPECT_EQ(ORDER_DIRECTION_BELOW, changes[1].direction); |
} |
{ |
@@ -520,7 +520,7 @@ |
// Move v11 above v12. |
// Resulting order: v12. v11, v13 |
- v11.Reorder(&v12, mojo::ORDER_DIRECTION_ABOVE); |
+ v11.Reorder(&v12, ORDER_DIRECTION_ABOVE); |
EXPECT_EQ(&v12, v1.children().front()); |
EXPECT_EQ(&v13, v1.children().back()); |
@@ -528,11 +528,11 @@ |
ASSERT_EQ(2U, changes.size()); |
EXPECT_EQ(&v11, changes[0].view); |
EXPECT_EQ(&v12, changes[0].relative_view); |
- EXPECT_EQ(mojo::ORDER_DIRECTION_ABOVE, changes[0].direction); |
+ EXPECT_EQ(ORDER_DIRECTION_ABOVE, changes[0].direction); |
EXPECT_EQ(&v11, changes[1].view); |
EXPECT_EQ(&v12, changes[1].relative_view); |
- EXPECT_EQ(mojo::ORDER_DIRECTION_ABOVE, changes[1].direction); |
+ EXPECT_EQ(ORDER_DIRECTION_ABOVE, changes[1].direction); |
} |
{ |
@@ -540,7 +540,7 @@ |
// Move v11 below v12. |
// Resulting order: v11, v12, v13 |
- v11.Reorder(&v12, mojo::ORDER_DIRECTION_BELOW); |
+ v11.Reorder(&v12, ORDER_DIRECTION_BELOW); |
EXPECT_EQ(&v11, v1.children().front()); |
EXPECT_EQ(&v13, v1.children().back()); |
@@ -548,11 +548,11 @@ |
ASSERT_EQ(2U, changes.size()); |
EXPECT_EQ(&v11, changes[0].view); |
EXPECT_EQ(&v12, changes[0].relative_view); |
- EXPECT_EQ(mojo::ORDER_DIRECTION_BELOW, changes[0].direction); |
+ EXPECT_EQ(ORDER_DIRECTION_BELOW, changes[0].direction); |
EXPECT_EQ(&v11, changes[1].view); |
EXPECT_EQ(&v12, changes[1].relative_view); |
- EXPECT_EQ(mojo::ORDER_DIRECTION_BELOW, changes[1].direction); |
+ EXPECT_EQ(ORDER_DIRECTION_BELOW, changes[1].direction); |
} |
} |
@@ -565,7 +565,7 @@ |
: base::StringPrintf("%d,%d", HiWord(id), LoWord(id)); |
} |
-std::string RectToString(const mojo::Rect& rect) { |
+std::string RectToString(const Rect& rect) { |
return base::StringPrintf("%d,%d %dx%d", rect.x, rect.y, rect.width, |
rect.height); |
} |
@@ -586,16 +586,16 @@ |
private: |
// Overridden from ViewObserver: |
void OnViewBoundsChanging(View* view, |
- const mojo::Rect& old_bounds, |
- const mojo::Rect& new_bounds) override { |
+ const Rect& old_bounds, |
+ const Rect& new_bounds) override { |
changes_.push_back(base::StringPrintf( |
"view=%s old_bounds=%s new_bounds=%s phase=changing", |
ViewIdToString(view->id()).c_str(), RectToString(old_bounds).c_str(), |
RectToString(new_bounds).c_str())); |
} |
void OnViewBoundsChanged(View* view, |
- const mojo::Rect& old_bounds, |
- const mojo::Rect& new_bounds) override { |
+ const Rect& old_bounds, |
+ const Rect& new_bounds) override { |
changes_.push_back(base::StringPrintf( |
"view=%s old_bounds=%s new_bounds=%s phase=changed", |
ViewIdToString(view->id()).c_str(), RectToString(old_bounds).c_str(), |
@@ -614,7 +614,7 @@ |
TestView v1; |
{ |
BoundsChangeObserver observer(&v1); |
- mojo::Rect rect; |
+ Rect rect; |
rect.width = rect.height = 100; |
v1.SetBounds(rect); |
@@ -871,4 +871,4 @@ |
o.PropertyChangeInfoAndClear()); |
} |
-} // namespace mus |
+} // namespace mojo |