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

Side by Side Diff: chrome/browser/ui/webui/print_preview_handler_unittest.cc

Issue 8949061: Move a bunch of methods from TabContents into the WebContents interface. This change either moves... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/json/json_writer.h" 6 #include "base/json/json_writer.h"
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/printing/background_printing_manager.h" 9 #include "chrome/browser/printing/background_printing_manager.h"
10 #include "chrome/browser/printing/print_preview_tab_controller.h" 10 #include "chrome/browser/printing/print_preview_tab_controller.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 printing::PrintPreviewTabController* controller = 64 printing::PrintPreviewTabController* controller =
65 printing::PrintPreviewTabController::GetInstance(); 65 printing::PrintPreviewTabController::GetInstance();
66 ASSERT_TRUE(controller); 66 ASSERT_TRUE(controller);
67 67
68 initiator_tab->print_view_manager()->PrintPreviewNow(); 68 initiator_tab->print_view_manager()->PrintPreviewNow();
69 preview_tab_ = controller->GetOrCreatePreviewTab(initiator_tab); 69 preview_tab_ = controller->GetOrCreatePreviewTab(initiator_tab);
70 ASSERT_TRUE(preview_tab_); 70 ASSERT_TRUE(preview_tab_);
71 71
72 preview_ui_ = 72 preview_ui_ =
73 static_cast<PrintPreviewUI*>(preview_tab_->tab_contents()->web_ui()); 73 static_cast<PrintPreviewUI*>(preview_tab_->tab_contents()->GetWebUI());
74 ASSERT_TRUE(preview_ui_); 74 ASSERT_TRUE(preview_ui_);
75 } 75 }
76 76
77 void DeletePrintPreviewTab() { 77 void DeletePrintPreviewTab() {
78 printing::BackgroundPrintingManager* bg_printing_manager = 78 printing::BackgroundPrintingManager* bg_printing_manager =
79 g_browser_process->background_printing_manager(); 79 g_browser_process->background_printing_manager();
80 ASSERT_TRUE(bg_printing_manager->HasPrintPreviewTab(preview_tab_)); 80 ASSERT_TRUE(bg_printing_manager->HasPrintPreviewTab(preview_tab_));
81 81
82 // Deleting TabContentsWrapper* to avoid warings from pref_notifier_impl.cc 82 // Deleting TabContentsWrapper* to avoid warings from pref_notifier_impl.cc
83 // after the test ends. 83 // after the test ends.
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 double margin_value; 253 double margin_value;
254 EXPECT_FALSE(initial_settings.GetDouble(printing::kSettingMarginTop, 254 EXPECT_FALSE(initial_settings.GetDouble(printing::kSettingMarginTop,
255 &margin_value)); 255 &margin_value));
256 EXPECT_FALSE(initial_settings.GetDouble(printing::kSettingMarginRight, 256 EXPECT_FALSE(initial_settings.GetDouble(printing::kSettingMarginRight,
257 &margin_value)); 257 &margin_value));
258 EXPECT_FALSE(initial_settings.GetDouble(printing::kSettingMarginBottom, 258 EXPECT_FALSE(initial_settings.GetDouble(printing::kSettingMarginBottom,
259 &margin_value)); 259 &margin_value));
260 EXPECT_FALSE(initial_settings.GetDouble(printing::kSettingMarginLeft, 260 EXPECT_FALSE(initial_settings.GetDouble(printing::kSettingMarginLeft,
261 &margin_value)); 261 &margin_value));
262 } 262 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/html_dialog_tab_contents_delegate.cc ('k') | chrome/browser/ui/webui/print_preview_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698