| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/services/public/cpp/view_manager/view_tree_node.h" | 5 #include "mojo/services/public/cpp/view_manager/view_tree_node.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "mojo/services/public/cpp/view_manager/lib/view_tree_node_private.h" | 9 #include "mojo/services/public/cpp/view_manager/lib/view_tree_node_private.h" |
| 10 #include "mojo/services/public/cpp/view_manager/util.h" | 10 #include "mojo/services/public/cpp/view_manager/util.h" |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 p111.phase = ViewTreeNodeObserver::DISPOSITION_CHANGING; | 343 p111.phase = ViewTreeNodeObserver::DISPOSITION_CHANGING; |
| 344 EXPECT_TRUE(TreeChangeParamsMatch(p111, o111.received_params().front())); | 344 EXPECT_TRUE(TreeChangeParamsMatch(p111, o111.received_params().front())); |
| 345 p111.phase = ViewTreeNodeObserver::DISPOSITION_CHANGED; | 345 p111.phase = ViewTreeNodeObserver::DISPOSITION_CHANGED; |
| 346 EXPECT_TRUE(TreeChangeParamsMatch(p111, o111.received_params().back())); | 346 EXPECT_TRUE(TreeChangeParamsMatch(p111, o111.received_params().back())); |
| 347 } | 347 } |
| 348 | 348 |
| 349 namespace { | 349 namespace { |
| 350 | 350 |
| 351 typedef std::vector<std::string> Changes; | 351 typedef std::vector<std::string> Changes; |
| 352 | 352 |
| 353 std::string NodeIdToString(TransportNodeId id) { | 353 std::string NodeIdToString(Id id) { |
| 354 return (id == 0) ? "null" : | 354 return (id == 0) ? "null" : |
| 355 base::StringPrintf("%d,%d", HiWord(id), LoWord(id)); | 355 base::StringPrintf("%d,%d", HiWord(id), LoWord(id)); |
| 356 } | 356 } |
| 357 | 357 |
| 358 std::string RectToString(const gfx::Rect& rect) { | 358 std::string RectToString(const gfx::Rect& rect) { |
| 359 return base::StringPrintf("%d,%d %dx%d", | 359 return base::StringPrintf("%d,%d %dx%d", |
| 360 rect.x(), rect.y(), rect.width(), rect.height()); | 360 rect.x(), rect.y(), rect.width(), rect.height()); |
| 361 } | 361 } |
| 362 | 362 |
| 363 std::string PhaseToString(ViewTreeNodeObserver::DispositionChangePhase phase) { | 363 std::string PhaseToString(ViewTreeNodeObserver::DispositionChangePhase phase) { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 "node=0,1 old_bounds=0,0 0x0 new_bounds=0,0 100x100 phase=changing", | 415 "node=0,1 old_bounds=0,0 0x0 new_bounds=0,0 100x100 phase=changing", |
| 416 changes[0]); | 416 changes[0]); |
| 417 EXPECT_EQ( | 417 EXPECT_EQ( |
| 418 "node=0,1 old_bounds=0,0 0x0 new_bounds=0,0 100x100 phase=changed", | 418 "node=0,1 old_bounds=0,0 0x0 new_bounds=0,0 100x100 phase=changed", |
| 419 changes[1]); | 419 changes[1]); |
| 420 } | 420 } |
| 421 } | 421 } |
| 422 | 422 |
| 423 } // namespace view_manager | 423 } // namespace view_manager |
| 424 } // namespace mojo | 424 } // namespace mojo |
| OLD | NEW |