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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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
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 <memory> 7 #include <memory>
8 8
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 359
360 gfx::NativeWindow owning_window = browser()->window()->GetNativeWindow(); 360 gfx::NativeWindow owning_window = browser()->window()->GetNativeWindow();
361 361
362 ASSERT_NO_FATAL_FAILURE(OpenDialog(ui::SelectFileDialog::SELECT_OPEN_FILE, 362 ASSERT_NO_FATAL_FAILURE(OpenDialog(ui::SelectFileDialog::SELECT_OPEN_FILE,
363 base::FilePath(), owning_window, "")); 363 base::FilePath(), owning_window, ""));
364 364
365 // Open a singleton tab in background. 365 // Open a singleton tab in background.
366 chrome::NavigateParams p(browser(), GURL("http://www.google.com"), 366 chrome::NavigateParams p(browser(), GURL("http://www.google.com"),
367 ui::PAGE_TRANSITION_LINK); 367 ui::PAGE_TRANSITION_LINK);
368 p.window_action = chrome::NavigateParams::SHOW_WINDOW; 368 p.window_action = chrome::NavigateParams::SHOW_WINDOW;
369 p.disposition = SINGLETON_TAB; 369 p.disposition = WindowOpenDisposition::SINGLETON_TAB;
370 chrome::Navigate(&p); 370 chrome::Navigate(&p);
371 371
372 // Press cancel button. 372 // Press cancel button.
373 CloseDialog(DIALOG_BTN_CANCEL, owning_window); 373 CloseDialog(DIALOG_BTN_CANCEL, owning_window);
374 374
375 // Listener should have been informed of the cancellation. 375 // Listener should have been informed of the cancellation.
376 ASSERT_FALSE(listener_->file_selected()); 376 ASSERT_FALSE(listener_->file_selected());
377 ASSERT_TRUE(listener_->canceled()); 377 ASSERT_TRUE(listener_->canceled());
378 ASSERT_EQ(this, listener_->params()); 378 ASSERT_EQ(this, listener_->params());
379 } 379 }
(...skipping 19 matching lines...) Expand all
399 ASSERT_FALSE(second_dialog_->IsRunning(owning_window)); 399 ASSERT_FALSE(second_dialog_->IsRunning(owning_window));
400 400
401 // Click cancel button. 401 // Click cancel button.
402 CloseDialog(DIALOG_BTN_CANCEL, owning_window); 402 CloseDialog(DIALOG_BTN_CANCEL, owning_window);
403 403
404 // Listener should have been informed of the cancellation. 404 // Listener should have been informed of the cancellation.
405 ASSERT_FALSE(listener_->file_selected()); 405 ASSERT_FALSE(listener_->file_selected());
406 ASSERT_TRUE(listener_->canceled()); 406 ASSERT_TRUE(listener_->canceled());
407 ASSERT_EQ(this, listener_->params()); 407 ASSERT_EQ(this, listener_->params());
408 } 408 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/sad_tab_view.cc ('k') | chrome/browser/ui/views/session_crashed_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698