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

Side by Side Diff: ash/wm/workspace/workspace_window_resizer_unittest.cc

Issue 10836142: Reenable WorkspaceWindowResizerTest tests on X. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ash/wm/workspace/workspace_window_resizer.h" 5 #include "ash/wm/workspace/workspace_window_resizer.h"
6 6
7 #include "ash/screen_ash.h" 7 #include "ash/screen_ash.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/test/ash_test_base.h" 9 #include "ash/test/ash_test_base.h"
10 #include "ash/wm/property_util.h" 10 #include "ash/wm/property_util.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 TestWindowDelegate delegate2_; 119 TestWindowDelegate delegate2_;
120 TestWindowDelegate delegate3_; 120 TestWindowDelegate delegate3_;
121 scoped_ptr<aura::Window> window_; 121 scoped_ptr<aura::Window> window_;
122 scoped_ptr<aura::Window> window2_; 122 scoped_ptr<aura::Window> window2_;
123 scoped_ptr<aura::Window> window3_; 123 scoped_ptr<aura::Window> window3_;
124 124
125 private: 125 private:
126 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizerTest); 126 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizerTest);
127 }; 127 };
128 128
129 // TODO(oshima): Disabling these tests because these tests
130 // depends on the window to be specific size, but bots doesn't
131 // have enough space and the actual window gets smaller, which
132 // causing mismatch.
133 #if !defined(OS_WIN)
134
135 // Assertions around attached window resize dragging from the right with 2 129 // Assertions around attached window resize dragging from the right with 2
136 // windows. 130 // windows.
137 TEST_F(WorkspaceWindowResizerTest, AttachedResize_RIGHT_2) { 131 TEST_F(WorkspaceWindowResizerTest, AttachedResize_RIGHT_2) {
138 window_->SetBounds(gfx::Rect(0, 300, 400, 300)); 132 window_->SetBounds(gfx::Rect(0, 300, 400, 300));
139 window2_->SetBounds(gfx::Rect(400, 200, 100, 200)); 133 window2_->SetBounds(gfx::Rect(400, 200, 100, 200));
140 134
141 std::vector<aura::Window*> windows; 135 std::vector<aura::Window*> windows;
142 windows.push_back(window2_.get()); 136 windows.push_back(window2_.get());
143 SetGridSize(0); 137 SetGridSize(0);
144 scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create( 138 scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create( 643 scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
650 window_.get(), gfx::Point(), HTCAPTION, empty_windows())); 644 window_.get(), gfx::Point(), HTCAPTION, empty_windows()));
651 ASSERT_TRUE(resizer.get()); 645 ASSERT_TRUE(resizer.get());
652 // Ctrl + drag the window to new poistion by adding (10, 12) to its origin, 646 // Ctrl + drag the window to new poistion by adding (10, 12) to its origin,
653 // the window should move to the exact position. 647 // the window should move to the exact position.
654 resizer->Drag(CalculateDragPoint(*resizer, 10, 12), 0); 648 resizer->Drag(CalculateDragPoint(*resizer, 10, 12), 0);
655 resizer->CompleteDrag(ui::EF_CONTROL_DOWN); 649 resizer->CompleteDrag(ui::EF_CONTROL_DOWN);
656 EXPECT_EQ("106,124 320x160", window_->bounds().ToString()); 650 EXPECT_EQ("106,124 320x160", window_->bounds().ToString());
657 } 651 }
658 652
659 #endif
660
661 } // namespace 653 } // namespace
662 } // namespace test 654 } // namespace test
663 } // namespace ash 655 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698