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

Side by Side Diff: app/win_util_unittest.cc

Issue 113169: Move win_util.h from common to app. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 | « app/win_util.cc ('k') | chrome/browser/autocomplete/autocomplete_edit_view_win.cc » ('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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/common/win_util.h" 5 #include "app/win_util.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 TEST(WinUtilTest, EnsureRectIsVisibleInRect) { 8 TEST(WinUtilTest, EnsureRectIsVisibleInRect) {
9 gfx::Rect parent_rect(0, 0, 500, 400); 9 gfx::Rect parent_rect(0, 0, 500, 400);
10 10
11 { 11 {
12 // Child rect x < 0 12 // Child rect x < 0
13 gfx::Rect child_rect(-50, 20, 100, 100); 13 gfx::Rect child_rect(-50, 20, 100, 100);
14 win_util::EnsureRectIsVisibleInRect(parent_rect, &child_rect, 10); 14 win_util::EnsureRectIsVisibleInRect(parent_rect, &child_rect, 10);
15 EXPECT_EQ(gfx::Rect(10, 20, 100, 100), child_rect); 15 EXPECT_EQ(gfx::Rect(10, 20, 100, 100), child_rect);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 TEST(WinUtilTest, AppendingExtensions) { 86 TEST(WinUtilTest, AppendingExtensions) {
87 for (unsigned int i = 0; i < arraysize(filename_cases); ++i) { 87 for (unsigned int i = 0; i < arraysize(filename_cases); ++i) {
88 const filename_case& value = filename_cases[i]; 88 const filename_case& value = filename_cases[i];
89 std::wstring result = 89 std::wstring result =
90 win_util::AppendExtensionIfNeeded(value.filename, value.filter_selected, 90 win_util::AppendExtensionIfNeeded(value.filename, value.filter_selected,
91 value.suggested_ext); 91 value.suggested_ext);
92 EXPECT_EQ(value.result, result); 92 EXPECT_EQ(value.result, result);
93 } 93 }
94 } 94 }
OLDNEW
« no previous file with comments | « app/win_util.cc ('k') | chrome/browser/autocomplete/autocomplete_edit_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698