OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <map> | 5 #include <map> |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/rand_util.h" | 8 #include "base/rand_util.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 static_cast<internal::RootView*>(widget->GetRootView()); | 405 static_cast<internal::RootView*>(widget->GetRootView()); |
406 | 406 |
407 root->AddChildView(v1); | 407 root->AddChildView(v1); |
408 v1->AddChildView(v2); | 408 v1->AddChildView(v2); |
409 | 409 |
410 v1->Reset(); | 410 v1->Reset(); |
411 v2->Reset(); | 411 v2->Reset(); |
412 | 412 |
413 gfx::Point p1(110, 120); | 413 gfx::Point p1(110, 120); |
414 ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, p1, p1, | 414 ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, p1, p1, |
415 ui::EF_LEFT_MOUSE_BUTTON); | 415 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON); |
416 root->OnMousePressed(pressed); | 416 root->OnMousePressed(pressed); |
417 EXPECT_EQ(v2->last_mouse_event_type_, ui::ET_MOUSE_PRESSED); | 417 EXPECT_EQ(v2->last_mouse_event_type_, ui::ET_MOUSE_PRESSED); |
418 EXPECT_EQ(v2->location_.x(), 10); | 418 EXPECT_EQ(v2->location_.x(), 10); |
419 EXPECT_EQ(v2->location_.y(), 20); | 419 EXPECT_EQ(v2->location_.y(), 20); |
420 // Make sure v1 did not receive the event | 420 // Make sure v1 did not receive the event |
421 EXPECT_EQ(v1->last_mouse_event_type_, 0); | 421 EXPECT_EQ(v1->last_mouse_event_type_, 0); |
422 | 422 |
423 // Drag event out of bounds. Should still go to v2 | 423 // Drag event out of bounds. Should still go to v2 |
424 v1->Reset(); | 424 v1->Reset(); |
425 v2->Reset(); | 425 v2->Reset(); |
426 gfx::Point p2(50, 40); | 426 gfx::Point p2(50, 40); |
427 ui::MouseEvent dragged(ui::ET_MOUSE_DRAGGED, p2, p2, | 427 ui::MouseEvent dragged(ui::ET_MOUSE_DRAGGED, p2, p2, |
428 ui::EF_LEFT_MOUSE_BUTTON); | 428 ui::EF_LEFT_MOUSE_BUTTON, 0); |
429 root->OnMouseDragged(dragged); | 429 root->OnMouseDragged(dragged); |
430 EXPECT_EQ(v2->last_mouse_event_type_, ui::ET_MOUSE_DRAGGED); | 430 EXPECT_EQ(v2->last_mouse_event_type_, ui::ET_MOUSE_DRAGGED); |
431 EXPECT_EQ(v2->location_.x(), -50); | 431 EXPECT_EQ(v2->location_.x(), -50); |
432 EXPECT_EQ(v2->location_.y(), -60); | 432 EXPECT_EQ(v2->location_.y(), -60); |
433 // Make sure v1 did not receive the event | 433 // Make sure v1 did not receive the event |
434 EXPECT_EQ(v1->last_mouse_event_type_, 0); | 434 EXPECT_EQ(v1->last_mouse_event_type_, 0); |
435 | 435 |
436 // Releasted event out of bounds. Should still go to v2 | 436 // Releasted event out of bounds. Should still go to v2 |
437 v1->Reset(); | 437 v1->Reset(); |
438 v2->Reset(); | 438 v2->Reset(); |
439 ui::MouseEvent released(ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(), 0); | 439 ui::MouseEvent released(ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(), 0, |
| 440 0); |
440 root->OnMouseDragged(released); | 441 root->OnMouseDragged(released); |
441 EXPECT_EQ(v2->last_mouse_event_type_, ui::ET_MOUSE_RELEASED); | 442 EXPECT_EQ(v2->last_mouse_event_type_, ui::ET_MOUSE_RELEASED); |
442 EXPECT_EQ(v2->location_.x(), -100); | 443 EXPECT_EQ(v2->location_.x(), -100); |
443 EXPECT_EQ(v2->location_.y(), -100); | 444 EXPECT_EQ(v2->location_.y(), -100); |
444 // Make sure v1 did not receive the event | 445 // Make sure v1 did not receive the event |
445 EXPECT_EQ(v1->last_mouse_event_type_, 0); | 446 EXPECT_EQ(v1->last_mouse_event_type_, 0); |
446 | 447 |
447 widget->CloseNow(); | 448 widget->CloseNow(); |
448 } | 449 } |
449 | 450 |
(...skipping 14 matching lines...) Expand all Loading... |
464 params.bounds = gfx::Rect(50, 50, 650, 650); | 465 params.bounds = gfx::Rect(50, 50, 650, 650); |
465 widget->Init(params); | 466 widget->Init(params); |
466 View* root = widget->GetRootView(); | 467 View* root = widget->GetRootView(); |
467 | 468 |
468 root->AddChildView(v1); | 469 root->AddChildView(v1); |
469 v1->AddChildView(v2); | 470 v1->AddChildView(v2); |
470 | 471 |
471 v2->delete_on_pressed_ = true; | 472 v2->delete_on_pressed_ = true; |
472 gfx::Point point(110, 120); | 473 gfx::Point point(110, 120); |
473 ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, point, point, | 474 ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, point, point, |
474 ui::EF_LEFT_MOUSE_BUTTON); | 475 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON); |
475 root->OnMousePressed(pressed); | 476 root->OnMousePressed(pressed); |
476 EXPECT_EQ(0, v1->child_count()); | 477 EXPECT_EQ(0, v1->child_count()); |
477 | 478 |
478 widget->CloseNow(); | 479 widget->CloseNow(); |
479 } | 480 } |
480 | 481 |
481 //////////////////////////////////////////////////////////////////////////////// | 482 //////////////////////////////////////////////////////////////////////////////// |
482 // TouchEvent | 483 // TouchEvent |
483 //////////////////////////////////////////////////////////////////////////////// | 484 //////////////////////////////////////////////////////////////////////////////// |
484 void TestView::OnTouchEvent(ui::TouchEvent* event) { | 485 void TestView::OnTouchEvent(ui::TouchEvent* event) { |
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1352 v1->Reset(); | 1353 v1->Reset(); |
1353 v11->Reset(); | 1354 v11->Reset(); |
1354 v111->Reset(); | 1355 v111->Reset(); |
1355 v12->Reset(); | 1356 v12->Reset(); |
1356 v121->Reset(); | 1357 v121->Reset(); |
1357 v2->Reset(); | 1358 v2->Reset(); |
1358 v21->Reset(); | 1359 v21->Reset(); |
1359 | 1360 |
1360 // Move the mouse in v111. | 1361 // Move the mouse in v111. |
1361 gfx::Point p1(6, 6); | 1362 gfx::Point p1(6, 6); |
1362 ui::MouseEvent move1(ui::ET_MOUSE_MOVED, p1, p1, 0); | 1363 ui::MouseEvent move1(ui::ET_MOUSE_MOVED, p1, p1, 0, 0); |
1363 root_view->OnMouseMoved(move1); | 1364 root_view->OnMouseMoved(move1); |
1364 EXPECT_TRUE(v111->received_mouse_enter_); | 1365 EXPECT_TRUE(v111->received_mouse_enter_); |
1365 EXPECT_FALSE(v11->last_mouse_event_type_); | 1366 EXPECT_FALSE(v11->last_mouse_event_type_); |
1366 EXPECT_TRUE(v1->received_mouse_enter_); | 1367 EXPECT_TRUE(v1->received_mouse_enter_); |
1367 | 1368 |
1368 v111->Reset(); | 1369 v111->Reset(); |
1369 v1->Reset(); | 1370 v1->Reset(); |
1370 | 1371 |
1371 // Now, move into v121. | 1372 // Now, move into v121. |
1372 gfx::Point p2(65, 21); | 1373 gfx::Point p2(65, 21); |
1373 ui::MouseEvent move2(ui::ET_MOUSE_MOVED, p2, p2, 0); | 1374 ui::MouseEvent move2(ui::ET_MOUSE_MOVED, p2, p2, 0, 0); |
1374 root_view->OnMouseMoved(move2); | 1375 root_view->OnMouseMoved(move2); |
1375 EXPECT_TRUE(v111->received_mouse_exit_); | 1376 EXPECT_TRUE(v111->received_mouse_exit_); |
1376 EXPECT_TRUE(v121->received_mouse_enter_); | 1377 EXPECT_TRUE(v121->received_mouse_enter_); |
1377 EXPECT_FALSE(v1->last_mouse_event_type_); | 1378 EXPECT_FALSE(v1->last_mouse_event_type_); |
1378 | 1379 |
1379 v111->Reset(); | 1380 v111->Reset(); |
1380 v121->Reset(); | 1381 v121->Reset(); |
1381 | 1382 |
1382 // Now, move into v11. | 1383 // Now, move into v11. |
1383 gfx::Point p3(1, 1); | 1384 gfx::Point p3(1, 1); |
1384 ui::MouseEvent move3(ui::ET_MOUSE_MOVED, p3, p3, 0); | 1385 ui::MouseEvent move3(ui::ET_MOUSE_MOVED, p3, p3, 0, 0); |
1385 root_view->OnMouseMoved(move3); | 1386 root_view->OnMouseMoved(move3); |
1386 EXPECT_TRUE(v121->received_mouse_exit_); | 1387 EXPECT_TRUE(v121->received_mouse_exit_); |
1387 EXPECT_TRUE(v11->received_mouse_enter_); | 1388 EXPECT_TRUE(v11->received_mouse_enter_); |
1388 EXPECT_FALSE(v1->last_mouse_event_type_); | 1389 EXPECT_FALSE(v1->last_mouse_event_type_); |
1389 | 1390 |
1390 v121->Reset(); | 1391 v121->Reset(); |
1391 v11->Reset(); | 1392 v11->Reset(); |
1392 | 1393 |
1393 // Move to v21. | 1394 // Move to v21. |
1394 gfx::Point p4(121, 15); | 1395 gfx::Point p4(121, 15); |
1395 ui::MouseEvent move4(ui::ET_MOUSE_MOVED, p4, p4, 0); | 1396 ui::MouseEvent move4(ui::ET_MOUSE_MOVED, p4, p4, 0, 0); |
1396 root_view->OnMouseMoved(move4); | 1397 root_view->OnMouseMoved(move4); |
1397 EXPECT_TRUE(v21->received_mouse_enter_); | 1398 EXPECT_TRUE(v21->received_mouse_enter_); |
1398 EXPECT_FALSE(v2->last_mouse_event_type_); | 1399 EXPECT_FALSE(v2->last_mouse_event_type_); |
1399 EXPECT_TRUE(v11->received_mouse_exit_); | 1400 EXPECT_TRUE(v11->received_mouse_exit_); |
1400 EXPECT_TRUE(v1->received_mouse_exit_); | 1401 EXPECT_TRUE(v1->received_mouse_exit_); |
1401 | 1402 |
1402 v21->Reset(); | 1403 v21->Reset(); |
1403 v11->Reset(); | 1404 v11->Reset(); |
1404 v1->Reset(); | 1405 v1->Reset(); |
1405 | 1406 |
1406 // Move to v1. | 1407 // Move to v1. |
1407 gfx::Point p5(21, 0); | 1408 gfx::Point p5(21, 0); |
1408 ui::MouseEvent move5(ui::ET_MOUSE_MOVED, p5, p5, 0); | 1409 ui::MouseEvent move5(ui::ET_MOUSE_MOVED, p5, p5, 0, 0); |
1409 root_view->OnMouseMoved(move5); | 1410 root_view->OnMouseMoved(move5); |
1410 EXPECT_TRUE(v21->received_mouse_exit_); | 1411 EXPECT_TRUE(v21->received_mouse_exit_); |
1411 EXPECT_TRUE(v1->received_mouse_enter_); | 1412 EXPECT_TRUE(v1->received_mouse_enter_); |
1412 | 1413 |
1413 v21->Reset(); | 1414 v21->Reset(); |
1414 v1->Reset(); | 1415 v1->Reset(); |
1415 | 1416 |
1416 // Now, move into v11. | 1417 // Now, move into v11. |
1417 gfx::Point p6(15, 15); | 1418 gfx::Point p6(15, 15); |
1418 ui::MouseEvent mouse6(ui::ET_MOUSE_MOVED, p6, p6, 0); | 1419 ui::MouseEvent mouse6(ui::ET_MOUSE_MOVED, p6, p6, 0, 0); |
1419 root_view->OnMouseMoved(mouse6); | 1420 root_view->OnMouseMoved(mouse6); |
1420 EXPECT_TRUE(v11->received_mouse_enter_); | 1421 EXPECT_TRUE(v11->received_mouse_enter_); |
1421 EXPECT_FALSE(v1->last_mouse_event_type_); | 1422 EXPECT_FALSE(v1->last_mouse_event_type_); |
1422 | 1423 |
1423 v11->Reset(); | 1424 v11->Reset(); |
1424 v1->Reset(); | 1425 v1->Reset(); |
1425 | 1426 |
1426 // Move back into v1. Although |v1| had already received an ENTER for mouse6, | 1427 // Move back into v1. Although |v1| had already received an ENTER for mouse6, |
1427 // and the mouse remains inside |v1| the whole time, it receives another ENTER | 1428 // and the mouse remains inside |v1| the whole time, it receives another ENTER |
1428 // when the mouse leaves v11. | 1429 // when the mouse leaves v11. |
1429 gfx::Point p7(21, 0); | 1430 gfx::Point p7(21, 0); |
1430 ui::MouseEvent mouse7(ui::ET_MOUSE_MOVED, p7, p7, 0); | 1431 ui::MouseEvent mouse7(ui::ET_MOUSE_MOVED, p7, p7, 0, 0); |
1431 root_view->OnMouseMoved(mouse7); | 1432 root_view->OnMouseMoved(mouse7); |
1432 EXPECT_TRUE(v11->received_mouse_exit_); | 1433 EXPECT_TRUE(v11->received_mouse_exit_); |
1433 EXPECT_FALSE(v1->received_mouse_enter_); | 1434 EXPECT_FALSE(v1->received_mouse_enter_); |
1434 | 1435 |
1435 widget->CloseNow(); | 1436 widget->CloseNow(); |
1436 } | 1437 } |
1437 | 1438 |
1438 TEST_F(ViewTest, Textfield) { | 1439 TEST_F(ViewTest, Textfield) { |
1439 const string16 kText = ASCIIToUTF16("Reality is that which, when you stop " | 1440 const string16 kText = ASCIIToUTF16("Reality is that which, when you stop " |
1440 "believing it, doesn't go away."); | 1441 "believing it, doesn't go away."); |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1957 RotateCounterclockwise(&transform); | 1958 RotateCounterclockwise(&transform); |
1958 transform.matrix().set(1, 3, 500.0); | 1959 transform.matrix().set(1, 3, 500.0); |
1959 v1->SetTransform(transform); | 1960 v1->SetTransform(transform); |
1960 | 1961 |
1961 // |v2| now occupies (100, 200) to (200, 400) in |root|. | 1962 // |v2| now occupies (100, 200) to (200, 400) in |root|. |
1962 v1->Reset(); | 1963 v1->Reset(); |
1963 v2->Reset(); | 1964 v2->Reset(); |
1964 | 1965 |
1965 gfx::Point p1(110, 210); | 1966 gfx::Point p1(110, 210); |
1966 ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, p1, p1, | 1967 ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, p1, p1, |
1967 ui::EF_LEFT_MOUSE_BUTTON); | 1968 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON); |
1968 root->OnMousePressed(pressed); | 1969 root->OnMousePressed(pressed); |
1969 EXPECT_EQ(0, v1->last_mouse_event_type_); | 1970 EXPECT_EQ(0, v1->last_mouse_event_type_); |
1970 EXPECT_EQ(ui::ET_MOUSE_PRESSED, v2->last_mouse_event_type_); | 1971 EXPECT_EQ(ui::ET_MOUSE_PRESSED, v2->last_mouse_event_type_); |
1971 EXPECT_EQ(190, v2->location_.x()); | 1972 EXPECT_EQ(190, v2->location_.x()); |
1972 EXPECT_EQ(10, v2->location_.y()); | 1973 EXPECT_EQ(10, v2->location_.y()); |
1973 | 1974 |
1974 ui::MouseEvent released(ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(), 0); | 1975 ui::MouseEvent released(ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(), 0, |
| 1976 0); |
1975 root->OnMouseReleased(released); | 1977 root->OnMouseReleased(released); |
1976 | 1978 |
1977 // Now rotate |v2| inside |v1| clockwise. | 1979 // Now rotate |v2| inside |v1| clockwise. |
1978 transform = v2->GetTransform(); | 1980 transform = v2->GetTransform(); |
1979 RotateClockwise(&transform); | 1981 RotateClockwise(&transform); |
1980 transform.matrix().set(0, 3, 100.f); | 1982 transform.matrix().set(0, 3, 100.f); |
1981 v2->SetTransform(transform); | 1983 v2->SetTransform(transform); |
1982 | 1984 |
1983 // Now, |v2| occupies (100, 100) to (200, 300) in |v1|, and (100, 300) to | 1985 // Now, |v2| occupies (100, 100) to (200, 300) in |v1|, and (100, 300) to |
1984 // (300, 400) in |root|. | 1986 // (300, 400) in |root|. |
1985 | 1987 |
1986 v1->Reset(); | 1988 v1->Reset(); |
1987 v2->Reset(); | 1989 v2->Reset(); |
1988 | 1990 |
1989 gfx::Point point2(110, 320); | 1991 gfx::Point point2(110, 320); |
1990 ui::MouseEvent p2(ui::ET_MOUSE_PRESSED, point2, point2, | 1992 ui::MouseEvent p2(ui::ET_MOUSE_PRESSED, point2, point2, |
1991 ui::EF_LEFT_MOUSE_BUTTON); | 1993 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON); |
1992 root->OnMousePressed(p2); | 1994 root->OnMousePressed(p2); |
1993 EXPECT_EQ(0, v1->last_mouse_event_type_); | 1995 EXPECT_EQ(0, v1->last_mouse_event_type_); |
1994 EXPECT_EQ(ui::ET_MOUSE_PRESSED, v2->last_mouse_event_type_); | 1996 EXPECT_EQ(ui::ET_MOUSE_PRESSED, v2->last_mouse_event_type_); |
1995 EXPECT_EQ(10, v2->location_.x()); | 1997 EXPECT_EQ(10, v2->location_.x()); |
1996 EXPECT_EQ(20, v2->location_.y()); | 1998 EXPECT_EQ(20, v2->location_.y()); |
1997 | 1999 |
1998 root->OnMouseReleased(released); | 2000 root->OnMouseReleased(released); |
1999 | 2001 |
2000 v1->SetTransform(gfx::Transform()); | 2002 v1->SetTransform(gfx::Transform()); |
2001 v2->SetTransform(gfx::Transform()); | 2003 v2->SetTransform(gfx::Transform()); |
(...skipping 15 matching lines...) Expand all Loading... |
2017 v2->SetTransform(transform); | 2019 v2->SetTransform(transform); |
2018 | 2020 |
2019 // |v3| occupies (108, 105) to (132, 115) in |root|. | 2021 // |v3| occupies (108, 105) to (132, 115) in |root|. |
2020 | 2022 |
2021 v1->Reset(); | 2023 v1->Reset(); |
2022 v2->Reset(); | 2024 v2->Reset(); |
2023 v3->Reset(); | 2025 v3->Reset(); |
2024 | 2026 |
2025 gfx::Point point(112, 110); | 2027 gfx::Point point(112, 110); |
2026 ui::MouseEvent p3(ui::ET_MOUSE_PRESSED, point, point, | 2028 ui::MouseEvent p3(ui::ET_MOUSE_PRESSED, point, point, |
2027 ui::EF_LEFT_MOUSE_BUTTON); | 2029 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON); |
2028 root->OnMousePressed(p3); | 2030 root->OnMousePressed(p3); |
2029 | 2031 |
2030 EXPECT_EQ(ui::ET_MOUSE_PRESSED, v3->last_mouse_event_type_); | 2032 EXPECT_EQ(ui::ET_MOUSE_PRESSED, v3->last_mouse_event_type_); |
2031 EXPECT_EQ(10, v3->location_.x()); | 2033 EXPECT_EQ(10, v3->location_.x()); |
2032 EXPECT_EQ(25, v3->location_.y()); | 2034 EXPECT_EQ(25, v3->location_.y()); |
2033 | 2035 |
2034 root->OnMouseReleased(released); | 2036 root->OnMouseReleased(released); |
2035 | 2037 |
2036 v1->SetTransform(gfx::Transform()); | 2038 v1->SetTransform(gfx::Transform()); |
2037 v2->SetTransform(gfx::Transform()); | 2039 v2->SetTransform(gfx::Transform()); |
(...skipping 18 matching lines...) Expand all Loading... |
2056 // Translate |v2| with respect to |v1|. | 2058 // Translate |v2| with respect to |v1|. |
2057 transform = v2->GetTransform(); | 2059 transform = v2->GetTransform(); |
2058 transform.matrix().set(0, 3, 10.f); | 2060 transform.matrix().set(0, 3, 10.f); |
2059 transform.matrix().set(1, 3, 10.f); | 2061 transform.matrix().set(1, 3, 10.f); |
2060 v2->SetTransform(transform); | 2062 v2->SetTransform(transform); |
2061 | 2063 |
2062 // |v3| now occupies (120, 120) to (144, 130) in |root|. | 2064 // |v3| now occupies (120, 120) to (144, 130) in |root|. |
2063 | 2065 |
2064 gfx::Point point3(124, 125); | 2066 gfx::Point point3(124, 125); |
2065 ui::MouseEvent p4(ui::ET_MOUSE_PRESSED, point3, point3, | 2067 ui::MouseEvent p4(ui::ET_MOUSE_PRESSED, point3, point3, |
2066 ui::EF_LEFT_MOUSE_BUTTON); | 2068 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON); |
2067 root->OnMousePressed(p4); | 2069 root->OnMousePressed(p4); |
2068 | 2070 |
2069 EXPECT_EQ(ui::ET_MOUSE_PRESSED, v3->last_mouse_event_type_); | 2071 EXPECT_EQ(ui::ET_MOUSE_PRESSED, v3->last_mouse_event_type_); |
2070 EXPECT_EQ(10, v3->location_.x()); | 2072 EXPECT_EQ(10, v3->location_.x()); |
2071 EXPECT_EQ(25, v3->location_.y()); | 2073 EXPECT_EQ(25, v3->location_.y()); |
2072 | 2074 |
2073 root->OnMouseReleased(released); | 2075 root->OnMouseReleased(released); |
2074 | 2076 |
2075 widget->CloseNow(); | 2077 widget->CloseNow(); |
2076 } | 2078 } |
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3508 const std::vector<ui::Layer*>& child_layers_post = root_layer->children(); | 3510 const std::vector<ui::Layer*>& child_layers_post = root_layer->children(); |
3509 ASSERT_EQ(3u, child_layers_post.size()); | 3511 ASSERT_EQ(3u, child_layers_post.size()); |
3510 EXPECT_EQ(v1->layer(), child_layers_post[0]); | 3512 EXPECT_EQ(v1->layer(), child_layers_post[0]); |
3511 EXPECT_EQ(v2->layer(), child_layers_post[1]); | 3513 EXPECT_EQ(v2->layer(), child_layers_post[1]); |
3512 EXPECT_EQ(v1_old_layer, child_layers_post[2]); | 3514 EXPECT_EQ(v1_old_layer, child_layers_post[2]); |
3513 } | 3515 } |
3514 | 3516 |
3515 #endif // USE_AURA | 3517 #endif // USE_AURA |
3516 | 3518 |
3517 } // namespace views | 3519 } // namespace views |
OLD | NEW |