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

Side by Side Diff: ash/common/devtools/ash_devtools_unittest.cc

Issue 2653593004: chromeos: Remove AshTestBase::SupportsMultipleDisplays (Closed)
Patch Set: Created 3 years, 11 months 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 unified diff | Download patch
« no previous file with comments | « ash/app_list/app_list_presenter_delegate_unittest.cc ('k') | ash/common/test/ash_test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/common/devtools/ash_devtools_css_agent.h" 5 #include "ash/common/devtools/ash_devtools_css_agent.h"
6 #include "ash/common/devtools/ash_devtools_dom_agent.h" 6 #include "ash/common/devtools/ash_devtools_dom_agent.h"
7 #include "ash/common/test/ash_test.h" 7 #include "ash/common/test/ash_test.h"
8 #include "ash/common/wm_lookup.h" 8 #include "ash/common/wm_lookup.h"
9 #include "ash/common/wm_shell.h" 9 #include "ash/common/wm_shell.h"
10 #include "ash/common/wm_window.h" 10 #include "ash/common/wm_window.h"
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 ExpectHighlighted(root_view->GetBoundsInScreen(), 0); 615 ExpectHighlighted(root_view->GetBoundsInScreen(), 0);
616 616
617 HideHighlight(0); 617 HideHighlight(0);
618 618
619 // Highlight non-existent node 619 // Highlight non-existent node
620 HighlightNode(10000); 620 HighlightNode(10000);
621 EXPECT_FALSE(GetHighlightingWindow(0)->IsVisible()); 621 EXPECT_FALSE(GetHighlightingWindow(0)->IsVisible());
622 } 622 }
623 623
624 TEST_F(AshDevToolsTest, MultipleDisplayHighlight) { 624 TEST_F(AshDevToolsTest, MultipleDisplayHighlight) {
625 if (!SupportsMultipleDisplays())
626 return;
627 UpdateDisplay("300x400,500x500"); 625 UpdateDisplay("300x400,500x500");
628 626
629 WmWindow::Windows root_windows = WmShell::Get()->GetAllRootWindows(); 627 WmWindow::Windows root_windows = WmShell::Get()->GetAllRootWindows();
630 std::unique_ptr<WindowOwner> window_owner( 628 std::unique_ptr<WindowOwner> window_owner(
631 CreateTestWindow(gfx::Rect(1, 2, 30, 40))); 629 CreateTestWindow(gfx::Rect(1, 2, 30, 40)));
632 WmWindow* window = window_owner->window(); 630 WmWindow* window = window_owner->window();
633 631
634 std::unique_ptr<ui::devtools::protocol::DOM::Node> root; 632 std::unique_ptr<ui::devtools::protocol::DOM::Node> root;
635 dom_agent()->getDocument(&root); 633 dom_agent()->getDocument(&root);
636 634
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 EXPECT_EQ(gfx::Rect(25, 35, 45, 20), root_view->bounds()); // Not changed 754 EXPECT_EQ(gfx::Rect(25, 35, 45, 20), root_view->bounds()); // Not changed
757 755
758 SetStyleTexts(root_view_node, "\nheight: 73;\n ", true); 756 SetStyleTexts(root_view_node, "\nheight: 73;\n ", true);
759 EXPECT_EQ(gfx::Rect(25, 35, 45, 73), root_view->bounds()); 757 EXPECT_EQ(gfx::Rect(25, 35, 45, 73), root_view->bounds());
760 758
761 SetStyleTexts(root_view_node, "\nx: 10; y: 23; width: 52;\n ", true); 759 SetStyleTexts(root_view_node, "\nx: 10; y: 23; width: 52;\n ", true);
762 EXPECT_EQ(gfx::Rect(10, 23, 52, 73), root_view->bounds()); 760 EXPECT_EQ(gfx::Rect(10, 23, 52, 73), root_view->bounds());
763 } 761 }
764 762
765 } // namespace ash 763 } // namespace ash
OLDNEW
« no previous file with comments | « ash/app_list/app_list_presenter_delegate_unittest.cc ('k') | ash/common/test/ash_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698