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

Side by Side Diff: app/win_util_unittest.cc

Issue 858006: Remove some unnecessary dependencies on net from app/win_util and app/resourc... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 9 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/views/shell_dialogs_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 "app/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
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 {L"f.jpg", L"*.*", L"jpg", L"f.jpg"}, 75 {L"f.jpg", L"*.*", L"jpg", L"f.jpg"},
76 {L"f.jpeg", L"*.*", L"jpg", L"f.jpeg"}, // Same MIME type (diff. ext). 76 {L"f.jpeg", L"*.*", L"jpg", L"f.jpeg"}, // Same MIME type (diff. ext).
77 // Test the empty filter, which should behave identically to the 77 // Test the empty filter, which should behave identically to the
78 // All Files filter. 78 // All Files filter.
79 {L"f", L"", L"jpg", L"f"}, 79 {L"f", L"", L"jpg", L"f"},
80 {L"f.", L"", L"jpg", L"f"}, 80 {L"f.", L"", L"jpg", L"f"},
81 {L"f..", L"", L"jpg", L"f"}, 81 {L"f..", L"", L"jpg", L"f"},
82 {L"f.jpg", L"", L"jpg", L"f.jpg"}, 82 {L"f.jpg", L"", L"jpg", L"f.jpg"},
83 {L"f.jpeg", L"", L"jpg", L"f.jpeg"}, 83 {L"f.jpeg", L"", L"jpg", L"f.jpeg"},
84 }; 84 };
85
86 TEST(WinUtilTest, AppendingExtensions) {
87 for (unsigned int i = 0; i < arraysize(filename_cases); ++i) {
88 const filename_case& value = filename_cases[i];
89 std::wstring result =
90 win_util::AppendExtensionIfNeeded(value.filename, value.filter_selected,
91 value.suggested_ext);
92 EXPECT_EQ(value.result, result);
93 }
94 }
OLDNEW
« no previous file with comments | « app/win_util.cc ('k') | chrome/browser/views/shell_dialogs_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698