diff options
author | thakis <thakis@chromium.org> | 2015-09-16 19:48:48 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-17 02:49:24 +0000 |
commit | 35b19f7d5d7b7b68878d6c766e93e148f8b06998 (patch) | |
tree | 546289030a5e80740af920e59ce31827d907bd2a /components/mus/public/cpp/tests/view_unittest.cc | |
parent | eef6f20ef572c4c128612384a63384aaa7d23fe7 (diff) | |
download | chromium_src-35b19f7d5d7b7b68878d6c766e93e148f8b06998.zip chromium_src-35b19f7d5d7b7b68878d6c766e93e148f8b06998.tar.gz chromium_src-35b19f7d5d7b7b68878d6c766e93e148f8b06998.tar.bz2 |
Revert of Mandoline UI Process: Update namespaces and file names (patchset #9 id:150001 of https://codereview.chromium.org/1340983002/ )
Reason for revert:
Speculative, might've broken mojo_apptests on http://build.chromium.org/p/chromium.linux/builders/Linux%20GN/builds/32066
Original issue's description:
> Mandoline UI Process: Update namespaces and file names
>
> This CL updates namespaces in components/mus to mus from mojo, surfaces, gles2, and view_manager.
>
> BUG=531533
> TBR=jam@chromium.org for trivial pdf_viewer change.
>
> Committed: https://crrev.com/49b0d73f3ebb4801fc518751145504af3a2f70ed
> Cr-Commit-Position: refs/heads/master@{#349229}
TBR=sky@chromium.org,fsamuel@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=531533
Review URL: https://codereview.chromium.org/1351013002
Cr-Commit-Position: refs/heads/master@{#349332}
Diffstat (limited to 'components/mus/public/cpp/tests/view_unittest.cc')
-rw-r--r-- | components/mus/public/cpp/tests/view_unittest.cc | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/components/mus/public/cpp/tests/view_unittest.cc b/components/mus/public/cpp/tests/view_unittest.cc index c991ca3..ca5c3b7 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 @@ class OrderChangeObserver : public ViewObserver { struct Change { View* view; View* relative_view; - mojo::OrderDirection direction; + OrderDirection direction; }; typedef std::vector<Change> Changes; @@ -442,13 +442,13 @@ class OrderChangeObserver : public ViewObserver { // 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 @@ TEST_F(ViewObserverTest, Order) { 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 @@ TEST_F(ViewObserverTest, Order) { 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 @@ TEST_F(ViewObserverTest, Order) { // 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 @@ TEST_F(ViewObserverTest, Order) { 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 @@ TEST_F(ViewObserverTest, Order) { // 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 @@ TEST_F(ViewObserverTest, Order) { 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 @@ std::string ViewIdToString(Id id) { : 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 @@ class BoundsChangeObserver : public ViewObserver { 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 @@ TEST_F(ViewObserverTest, SetBounds) { TestView v1; { BoundsChangeObserver observer(&v1); - mojo::Rect rect; + Rect rect; rect.width = rect.height = 100; v1.SetBounds(rect); @@ -871,4 +871,4 @@ TEST_F(ViewObserverTest, LocalPropertyChanged) { o.PropertyChangeInfoAndClear()); } -} // namespace mus +} // namespace mojo |