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

Side by Side Diff: chrome/browser/printing/print_preview_dialog_controller_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/printing/print_preview_dialog_controller.h" 5 #include "chrome/browser/printing/print_preview_dialog_controller.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 256
257 WebContents* preview_dialog = GetPrintPreviewDialog(); 257 WebContents* preview_dialog = GetPrintPreviewDialog();
258 258
259 // Check a new print preview dialog got created. 259 // Check a new print preview dialog got created.
260 ASSERT_TRUE(preview_dialog); 260 ASSERT_TRUE(preview_dialog);
261 ASSERT_NE(initiator(), preview_dialog); 261 ASSERT_NE(initiator(), preview_dialog);
262 262
263 // Reload the initiator. Make sure reloading destroys the print preview 263 // Reload the initiator. Make sure reloading destroys the print preview
264 // dialog. 264 // dialog.
265 PrintPreviewDialogDestroyedObserver dialog_destroyed_observer(preview_dialog); 265 PrintPreviewDialogDestroyedObserver dialog_destroyed_observer(preview_dialog);
266 chrome::Reload(browser(), CURRENT_TAB); 266 chrome::Reload(browser(), WindowOpenDisposition::CURRENT_TAB);
267 content::WaitForLoadStop( 267 content::WaitForLoadStop(
268 browser()->tab_strip_model()->GetActiveWebContents()); 268 browser()->tab_strip_model()->GetActiveWebContents());
269 ASSERT_TRUE(dialog_destroyed_observer.dialog_destroyed()); 269 ASSERT_TRUE(dialog_destroyed_observer.dialog_destroyed());
270 270
271 // Try printing again. 271 // Try printing again.
272 PrintPreview(); 272 PrintPreview();
273 273
274 // Create a preview dialog for the initiator tab. 274 // Create a preview dialog for the initiator tab.
275 WebContents* new_preview_dialog = GetPrintPreviewDialog(); 275 WebContents* new_preview_dialog = GetPrintPreviewDialog();
276 EXPECT_TRUE(new_preview_dialog); 276 EXPECT_TRUE(new_preview_dialog);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 content::BrowserAccessibilityState::GetInstance()->EnableAccessibility(); 399 content::BrowserAccessibilityState::GetInstance()->EnableAccessibility();
400 ui_test_utils::NavigateToURL(browser(), GURL("data:text/html,HelloWorld")); 400 ui_test_utils::NavigateToURL(browser(), GURL("data:text/html,HelloWorld"));
401 PrintPreview(); 401 PrintPreview();
402 WebContents* preview_dialog = GetPrintPreviewDialog(); 402 WebContents* preview_dialog = GetPrintPreviewDialog();
403 WaitForAccessibilityTreeToContainNodeWithName(preview_dialog, "HelloWorld"); 403 WaitForAccessibilityTreeToContainNodeWithName(preview_dialog, "HelloWorld");
404 } 404 }
405 405
406 } // namespace 406 } // namespace
407 407
408 #endif // defined(ENABLE_TASK_MANAGER) 408 #endif // defined(ENABLE_TASK_MANAGER)
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_dialog_cloud_win.cc ('k') | chrome/browser/profiles/host_zoom_map_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698