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

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

Issue 2527133002: Remove some WebContents::GetRenderViewHost() calls. (Closed)
Patch Set: More reverts for the same reason as patch set 3, fixes merge conflict Created 4 years 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 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/printing/print_preview_test.h" 10 #include "chrome/browser/printing/print_preview_test.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 357
358 // Close |web_contents_1|'s tab 358 // Close |web_contents_1|'s tab
359 int tab_1_index = tab_strip_model->GetIndexOfWebContents(web_contents_1); 359 int tab_1_index = tab_strip_model->GetIndexOfWebContents(web_contents_1);
360 tab_strip_model->CloseWebContentsAt(tab_1_index, 0); 360 tab_strip_model->CloseWebContentsAt(tab_1_index, 0);
361 EXPECT_EQ(1, tab_strip_model->count()); 361 EXPECT_EQ(1, tab_strip_model->count());
362 362
363 // Simulate a crash of the render process host for |web_contents_2|. Print 363 // Simulate a crash of the render process host for |web_contents_2|. Print
364 // preview controller should exit cleanly and not crash. 364 // preview controller should exit cleanly and not crash.
365 content::MockRenderProcessHost* rph = 365 content::MockRenderProcessHost* rph =
366 static_cast<content::MockRenderProcessHost*>( 366 static_cast<content::MockRenderProcessHost*>(
367 web_contents_2->GetRenderViewHost()->GetProcess()); 367 web_contents_2->GetMainFrame()->GetProcess());
368 rph->SimulateCrash(); 368 rph->SimulateCrash();
369 } 369 }
370 } // namespace printing 370 } // namespace printing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698