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

Side by Side Diff: chrome/browser/ui/views/shell_dialogs_win_unittest.cc

Issue 6485017: Carnitas: move browser/ui/shell_dialogs.{h,cc} to browser/ui (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 2 more cases Created 9 years, 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser/shell_dialogs.h" 5 #include "chrome/browser/ui/shell_dialogs.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 TEST(ShellDialogsWin, AppendExtensionIfNeeded) { 8 TEST(ShellDialogsWin, AppendExtensionIfNeeded) {
9 struct AppendExtensionTestCase { 9 struct AppendExtensionTestCase {
10 wchar_t* filename; 10 wchar_t* filename;
11 wchar_t* filter_selected; 11 wchar_t* filter_selected;
12 wchar_t* suggested_ext; 12 wchar_t* suggested_ext;
13 wchar_t* expected_filename; 13 wchar_t* expected_filename;
14 } test_cases[] = { 14 } test_cases[] = {
15 // Known extensions, with or without associated MIME types, should not get 15 // Known extensions, with or without associated MIME types, should not get
(...skipping 19 matching lines...) Expand all
35 { L"sample.unknown", L"*.*", L"", L"sample.unknown" }, 35 { L"sample.unknown", L"*.*", L"", L"sample.unknown" },
36 }; 36 };
37 37
38 for (size_t i = 0; i < arraysize(test_cases); ++i) { 38 for (size_t i = 0; i < arraysize(test_cases); ++i) {
39 EXPECT_EQ(std::wstring(test_cases[i].expected_filename), 39 EXPECT_EQ(std::wstring(test_cases[i].expected_filename),
40 AppendExtensionIfNeeded(test_cases[i].filename, 40 AppendExtensionIfNeeded(test_cases[i].filename,
41 test_cases[i].filter_selected, 41 test_cases[i].filter_selected,
42 test_cases[i].suggested_ext)); 42 test_cases[i].suggested_ext));
43 } 43 }
44 } 44 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/shell_dialogs_win.cc ('k') | chrome/browser/ui/views/user_data_dir_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698