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

Side by Side Diff: chrome/browser/printing/print_preview_dialog_controller_browsertest.cc

Issue 302453006: Disable NavigateFromInitiatorTab on OS_WIN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "chrome/browser/printing/print_preview_dialog_controller.h" 8 #include "chrome/browser/printing/print_preview_dialog_controller.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_commands.h" 10 #include "chrome/browser/ui/browser_commands.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 157 }
158 158
159 scoped_ptr<PrintPreviewDialogClonedObserver> cloned_tab_observer_; 159 scoped_ptr<PrintPreviewDialogClonedObserver> cloned_tab_observer_;
160 WebContents* initiator_; 160 WebContents* initiator_;
161 161
162 DISALLOW_COPY_AND_ASSIGN(PrintPreviewDialogControllerBrowserTest); 162 DISALLOW_COPY_AND_ASSIGN(PrintPreviewDialogControllerBrowserTest);
163 }; 163 };
164 164
165 // Test to verify that when a initiator navigates, we can create a new preview 165 // Test to verify that when a initiator navigates, we can create a new preview
166 // dialog for the new tab contents. 166 // dialog for the new tab contents.
167 // http://crbug.com/377337
168 #if defined(OS_WIN)
169 #define MAYBE_NavigateFromInitiatorTab DISABLED_NavigateFromInitiatorTab
170 #else
171 #define MAYBE_NavigateFromInitiatorTab NavigateFromInitiatorTab
172 #endif
167 IN_PROC_BROWSER_TEST_F(PrintPreviewDialogControllerBrowserTest, 173 IN_PROC_BROWSER_TEST_F(PrintPreviewDialogControllerBrowserTest,
168 NavigateFromInitiatorTab) { 174 MAYBE_NavigateFromInitiatorTab) {
169 // print for the first time. 175 // print for the first time.
170 PrintPreview(); 176 PrintPreview();
171 177
172 // Get the preview dialog for the initiator tab. 178 // Get the preview dialog for the initiator tab.
173 WebContents* preview_dialog = GetPrintPreviewDialog(); 179 WebContents* preview_dialog = GetPrintPreviewDialog();
174 180
175 // Check a new print preview dialog got created. 181 // Check a new print preview dialog got created.
176 ASSERT_TRUE(preview_dialog); 182 ASSERT_TRUE(preview_dialog);
177 ASSERT_NE(initiator(), preview_dialog); 183 ASSERT_NE(initiator(), preview_dialog);
178 184
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 browser()->tab_strip_model()->GetActiveWebContents()); 219 browser()->tab_strip_model()->GetActiveWebContents());
214 ASSERT_TRUE(dialog_destroyed_observer.dialog_destroyed()); 220 ASSERT_TRUE(dialog_destroyed_observer.dialog_destroyed());
215 221
216 // Try printing again. 222 // Try printing again.
217 PrintPreview(); 223 PrintPreview();
218 224
219 // Create a preview dialog for the initiator tab. 225 // Create a preview dialog for the initiator tab.
220 WebContents* new_preview_dialog = GetPrintPreviewDialog(); 226 WebContents* new_preview_dialog = GetPrintPreviewDialog();
221 EXPECT_TRUE(new_preview_dialog); 227 EXPECT_TRUE(new_preview_dialog);
222 } 228 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698