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

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

Issue 10804026: Fix open dialog not remembering last opened folder on drive (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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) 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 "chrome/browser/ui/views/select_file_dialog_extension.h" 5 #include "chrome/browser/ui/views/select_file_dialog_extension.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "ui/base/dialogs/selected_file_info.h" 8 #include "ui/base/dialogs/selected_file_info.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 private: 47 private:
48 scoped_refptr<SelectFileDialogExtension> dialog_; 48 scoped_refptr<SelectFileDialogExtension> dialog_;
49 }; 49 };
50 50
51 TEST_F(SelectFileDialogExtensionTest, SelfDeleting) { 51 TEST_F(SelectFileDialogExtensionTest, SelfDeleting) {
52 const int32 kTabId = 123; 52 const int32 kTabId = 123;
53 SelfDeletingClient* client = new SelfDeletingClient(kTabId); 53 SelfDeletingClient* client = new SelfDeletingClient(kTabId);
54 // Ensure we don't crash or trip an Address Sanitizer warning about 54 // Ensure we don't crash or trip an Address Sanitizer warning about
55 // use-after-free. 55 // use-after-free.
56 ui::SelectedFileInfo file_info; 56 ui::SelectedFileInfo file_info = ui::SelectedFileInfo(FilePath(), FilePath());
achuithb 2012/07/24 20:13:05 Why is this necessary? It seems like the default c
tbarzic 2012/07/25 02:02:54 Done.
57 SelectFileDialogExtension::OnFileSelected(kTabId, file_info, 0); 57 SelectFileDialogExtension::OnFileSelected(kTabId, file_info, 0);
58 // Simulate closing the dialog so the listener gets invoked. 58 // Simulate closing the dialog so the listener gets invoked.
59 client->dialog()->ExtensionDialogClosing(NULL); 59 client->dialog()->ExtensionDialogClosing(NULL);
60 } 60 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698