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

Unified Diff: views/window/window_win_unittest.cc

Issue 6386009: Remove app/win/win_util.h,cc etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with NSApp changes in r73581 Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/window/window_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/window/window_win_unittest.cc
diff --git a/app/win/win_util_unittest.cc b/views/window/window_win_unittest.cc
similarity index 64%
rename from app/win/win_util_unittest.cc
rename to views/window/window_win_unittest.cc
index 0dc4568ff33792d06be4edb7673b2bdbb0dff4dc..0e1f03771d5835bd95d81e65fd88b5cfb426e215 100644
--- a/app/win/win_util_unittest.cc
+++ b/views/window/window_win_unittest.cc
@@ -1,59 +1,58 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "app/win/win_util.h"
+#include "views/window/window_win.h"
+
#include "gfx/rect.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace app {
-namespace win {
+namespace views {
-TEST(WinUtilTest, EnsureRectIsVisibleInRect) {
+TEST(WindowWinTest, EnsureRectIsVisibleInRect) {
gfx::Rect parent_rect(0, 0, 500, 400);
{
// Child rect x < 0
gfx::Rect child_rect(-50, 20, 100, 100);
- EnsureRectIsVisibleInRect(parent_rect, &child_rect, 10);
+ internal::EnsureRectIsVisibleInRect(parent_rect, &child_rect, 10);
EXPECT_EQ(gfx::Rect(10, 20, 100, 100), child_rect);
}
{
// Child rect y < 0
gfx::Rect child_rect(20, -50, 100, 100);
- EnsureRectIsVisibleInRect(parent_rect, &child_rect, 10);
+ internal::EnsureRectIsVisibleInRect(parent_rect, &child_rect, 10);
EXPECT_EQ(gfx::Rect(20, 10, 100, 100), child_rect);
}
{
// Child rect right > parent_rect.right
gfx::Rect child_rect(450, 20, 100, 100);
- EnsureRectIsVisibleInRect(parent_rect, &child_rect, 10);
+ internal::EnsureRectIsVisibleInRect(parent_rect, &child_rect, 10);
EXPECT_EQ(gfx::Rect(390, 20, 100, 100), child_rect);
}
{
// Child rect bottom > parent_rect.bottom
gfx::Rect child_rect(20, 350, 100, 100);
- EnsureRectIsVisibleInRect(parent_rect, &child_rect, 10);
+ internal::EnsureRectIsVisibleInRect(parent_rect, &child_rect, 10);
EXPECT_EQ(gfx::Rect(20, 290, 100, 100), child_rect);
}
{
// Child rect width > parent_rect.width
gfx::Rect child_rect(20, 20, 700, 100);
- EnsureRectIsVisibleInRect(parent_rect, &child_rect, 10);
+ internal::EnsureRectIsVisibleInRect(parent_rect, &child_rect, 10);
EXPECT_EQ(gfx::Rect(20, 20, 480, 100), child_rect);
}
{
// Child rect height > parent_rect.height
gfx::Rect child_rect(20, 20, 100, 700);
- EnsureRectIsVisibleInRect(parent_rect, &child_rect, 10);
+ internal::EnsureRectIsVisibleInRect(parent_rect, &child_rect, 10);
EXPECT_EQ(gfx::Rect(20, 20, 100, 380), child_rect);
}
}
-} // namespace win
-} // namespace app
+} // namespace views
« no previous file with comments | « views/window/window_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698