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

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

Issue 10698068: chrome: Put browser_navigator.h into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: already in chrome namespace 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_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 303
304 IN_PROC_BROWSER_TEST_F(SelectFileDialogExtensionBrowserTest, 304 IN_PROC_BROWSER_TEST_F(SelectFileDialogExtensionBrowserTest,
305 OpenSingletonTabAndCancel) { 305 OpenSingletonTabAndCancel) {
306 AddMountPoint(downloads_dir_); 306 AddMountPoint(downloads_dir_);
307 307
308 gfx::NativeWindow owning_window = browser()->window()->GetNativeWindow(); 308 gfx::NativeWindow owning_window = browser()->window()->GetNativeWindow();
309 309
310 OpenDialog(SelectFileDialog::SELECT_OPEN_FILE, FilePath(), owning_window, ""); 310 OpenDialog(SelectFileDialog::SELECT_OPEN_FILE, FilePath(), owning_window, "");
311 311
312 // Open a singleton tab in background. 312 // Open a singleton tab in background.
313 browser::NavigateParams p(browser(), GURL("www.google.com"), 313 chrome::NavigateParams p(browser(), GURL("www.google.com"),
314 content::PAGE_TRANSITION_LINK); 314 content::PAGE_TRANSITION_LINK);
315 p.window_action = browser::NavigateParams::SHOW_WINDOW; 315 p.window_action = chrome::NavigateParams::SHOW_WINDOW;
316 p.disposition = SINGLETON_TAB; 316 p.disposition = SINGLETON_TAB;
317 browser::Navigate(&p); 317 chrome::Navigate(&p);
318 318
319 // Press cancel button. 319 // Press cancel button.
320 CloseDialog(DIALOG_BTN_CANCEL, owning_window); 320 CloseDialog(DIALOG_BTN_CANCEL, owning_window);
321 321
322 // Listener should have been informed of the cancellation. 322 // Listener should have been informed of the cancellation.
323 ASSERT_FALSE(listener_->file_selected()); 323 ASSERT_FALSE(listener_->file_selected());
324 ASSERT_TRUE(listener_->canceled()); 324 ASSERT_TRUE(listener_->canceled());
325 ASSERT_EQ(this, listener_->params()); 325 ASSERT_EQ(this, listener_->params());
326 } 326 }
327 327
(...skipping 11 matching lines...) Expand all
339 ASSERT_FALSE(second_dialog_->IsRunning(owning_window)); 339 ASSERT_FALSE(second_dialog_->IsRunning(owning_window));
340 340
341 // Click cancel button. 341 // Click cancel button.
342 CloseDialog(DIALOG_BTN_CANCEL, owning_window); 342 CloseDialog(DIALOG_BTN_CANCEL, owning_window);
343 343
344 // Listener should have been informed of the cancellation. 344 // Listener should have been informed of the cancellation.
345 ASSERT_FALSE(listener_->file_selected()); 345 ASSERT_FALSE(listener_->file_selected());
346 ASSERT_TRUE(listener_->canceled()); 346 ASSERT_TRUE(listener_->canceled());
347 ASSERT_EQ(this, listener_->params()); 347 ASSERT_EQ(this, listener_->params());
348 } 348 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698