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

Unified Diff: chrome/browser/ui/webui/print_preview_handler_unittest.cc

Issue 8564044: Revert 110056 - Print Preview: Make print preview tab modal. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/print_preview_handler.cc ('k') | chrome/browser/ui/webui/print_preview_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/print_preview_handler_unittest.cc
===================================================================
--- chrome/browser/ui/webui/print_preview_handler_unittest.cc (revision 110058)
+++ chrome/browser/ui/webui/print_preview_handler_unittest.cc (working copy)
@@ -21,7 +21,7 @@
DictionaryValue* GetCustomMarginsDictionary(
const double margin_top, const double margin_right,
- const double margin_bottom, const double margin_left) {
+ const double margin_bottom,const double margin_left) {
base::DictionaryValue* custom_settings = new base::DictionaryValue();
custom_settings->SetDouble(printing::kSettingMarginTop, margin_top);
custom_settings->SetDouble(printing::kSettingMarginRight, margin_right);
@@ -30,7 +30,7 @@
return custom_settings;
}
-} // namespace
+}
class PrintPreviewHandlerTest : public BrowserWithTestWindowTest {
protected:
@@ -65,6 +65,7 @@
preview_tab_ = controller->GetOrCreatePreviewTab(initiator_tab);
ASSERT_TRUE(preview_tab_);
+ EXPECT_EQ(2, browser()->tab_count());
preview_ui_ = static_cast<PrintPreviewUI*>(preview_tab_->web_ui());
ASSERT_TRUE(preview_ui_);
@@ -113,7 +114,7 @@
void RequestPrintWithCustomMargins(
const double margin_top, const double margin_right,
- const double margin_bottom, const double margin_left) {
+ const double margin_bottom,const double margin_left) {
// Set the minimal dummy settings to make the HandlePrint() code happy.
DictionaryValue settings;
settings.SetBoolean(printing::kSettingPreviewModifiable, true);
@@ -145,6 +146,7 @@
delete PrintPreviewHandler::last_used_page_size_margins_;
PrintPreviewHandler::last_used_page_size_margins_ = NULL;
}
+
};
// Tests that margin settings are saved correctly when printing with custom
@@ -196,6 +198,7 @@
CheckCustomMargins(kMarginTop, kMarginRight, kMarginBottom, kMarginLeft);
OpenPrintPreviewTab();
+ EXPECT_EQ(2, browser()->tab_count());
RequestPrintWithDefaultMargins();
// Checking that sticky settings were saved correctly.
« no previous file with comments | « chrome/browser/ui/webui/print_preview_handler.cc ('k') | chrome/browser/ui/webui/print_preview_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698