diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-09 21:18:21 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-09 21:18:21 +0000 |
commit | c4c89cd78cf3b9b436f61944553c0ab44d3c5ba5 (patch) | |
tree | 6c0fa101145f814a8a92127fa8e43f47cbf637a9 | |
parent | 5973b968694e34269d9be9dea1f9fce1f32cb89e (diff) | |
download | chromium_src-c4c89cd78cf3b9b436f61944553c0ab44d3c5ba5.zip chromium_src-c4c89cd78cf3b9b436f61944553c0ab44d3c5ba5.tar.gz chromium_src-c4c89cd78cf3b9b436f61944553c0ab44d3c5ba5.tar.bz2 |
Convert printing ui_tests to browser_tests.
BUG=121574
Review URL: https://chromiumcodereview.appspot.com/10033001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131436 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/automation/automation_provider_observers.cc | 52 | ||||
-rw-r--r-- | chrome/browser/automation/automation_provider_observers.h | 19 | ||||
-rw-r--r-- | chrome/browser/automation/testing_automation_provider.cc | 27 | ||||
-rw-r--r-- | chrome/browser/automation/testing_automation_provider.h | 3 | ||||
-rw-r--r-- | chrome/browser/printing/printing_layout_browsertest.cc (renamed from chrome/browser/printing/printing_layout_uitest.cc) | 177 | ||||
-rw-r--r-- | chrome/chrome_tests.gypi | 11 | ||||
-rw-r--r-- | chrome/common/automation_messages_internal.h | 2 | ||||
-rw-r--r-- | chrome/test/automation/tab_proxy.cc | 9 | ||||
-rw-r--r-- | chrome/test/automation/tab_proxy.h | 3 | ||||
-rw-r--r-- | printing/printing_test.h | 2 |
10 files changed, 109 insertions, 196 deletions
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc index 2688231..60e7897 100644 --- a/chrome/browser/automation/automation_provider_observers.cc +++ b/chrome/browser/automation/automation_provider_observers.cc @@ -44,7 +44,6 @@ #include "chrome/browser/notifications/notification_ui_manager.h" #include "chrome/browser/password_manager/password_store_change.h" #include "chrome/browser/policy/browser_policy_connector.h" -#include "chrome/browser/printing/print_job.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/chrome_render_message_filter.h" #include "chrome/browser/search_engines/template_url_service.h" @@ -1282,57 +1281,6 @@ void DomOperationMessageSender::OnJavascriptBlocked() { } } -DocumentPrintedNotificationObserver::DocumentPrintedNotificationObserver( - AutomationProvider* automation, IPC::Message* reply_message) - : automation_(automation->AsWeakPtr()), - success_(false), - reply_message_(reply_message) { - registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_EVENT, - content::NotificationService::AllSources()); -} - -DocumentPrintedNotificationObserver::~DocumentPrintedNotificationObserver() { - if (automation_) { - AutomationMsg_PrintNow::WriteReplyParams(reply_message_.get(), success_); - automation_->Send(reply_message_.release()); - } -} - -void DocumentPrintedNotificationObserver::Observe( - int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) { - DCHECK(type == chrome::NOTIFICATION_PRINT_JOB_EVENT); - switch (content::Details<printing::JobEventDetails>(details)->type()) { - case printing::JobEventDetails::JOB_DONE: { - // Succeeded. - success_ = true; - delete this; - break; - } - case printing::JobEventDetails::USER_INIT_CANCELED: - case printing::JobEventDetails::FAILED: { - // Failed. - delete this; - break; - } - case printing::JobEventDetails::NEW_DOC: - case printing::JobEventDetails::USER_INIT_DONE: - case printing::JobEventDetails::DEFAULT_INIT_DONE: - case printing::JobEventDetails::NEW_PAGE: - case printing::JobEventDetails::PAGE_DONE: - case printing::JobEventDetails::DOC_DONE: - case printing::JobEventDetails::ALL_PAGES_REQUESTED: { - // Don't care. - break; - } - default: { - NOTREACHED(); - break; - } - } -} - MetricEventDurationObserver::MetricEventDurationObserver() { registrar_.Add(this, chrome::NOTIFICATION_METRIC_EVENT_DURATION, content::NotificationService::AllSources()); diff --git a/chrome/browser/automation/automation_provider_observers.h b/chrome/browser/automation/automation_provider_observers.h index e2ea69c..de14843 100644 --- a/chrome/browser/automation/automation_provider_observers.h +++ b/chrome/browser/automation/automation_provider_observers.h @@ -646,25 +646,6 @@ class DomOperationMessageSender : public DomOperationObserver { DISALLOW_COPY_AND_ASSIGN(DomOperationMessageSender); }; -class DocumentPrintedNotificationObserver - : public content::NotificationObserver { - public: - DocumentPrintedNotificationObserver(AutomationProvider* automation, - IPC::Message* reply_message); - virtual ~DocumentPrintedNotificationObserver(); - - virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details); - - private: - content::NotificationRegistrar registrar_; - base::WeakPtr<AutomationProvider> automation_; - bool success_; - scoped_ptr<IPC::Message> reply_message_; - - DISALLOW_COPY_AND_ASSIGN(DocumentPrintedNotificationObserver); -}; - // Collects METRIC_EVENT_DURATION notifications and keep track of the times. class MetricEventDurationObserver : public content::NotificationObserver { public: diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc index da3f74e..689fef4 100644 --- a/chrome/browser/automation/testing_automation_provider.cc +++ b/chrome/browser/automation/testing_automation_provider.cc @@ -73,7 +73,6 @@ #include "chrome/browser/plugin_prefs.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/printing/print_preview_tab_controller.h" -#include "chrome/browser/printing/print_view_manager.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_info_cache.h" #include "chrome/browser/profiles/profile_manager.h" @@ -424,7 +423,6 @@ bool TestingAutomationProvider::OnMessageReceived( IPC_MESSAGE_HANDLER(AutomationMsg_BringBrowserToFront, BringBrowserToFront) IPC_MESSAGE_HANDLER(AutomationMsg_IsMenuCommandEnabled, IsMenuCommandEnabled) - IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_PrintNow, PrintNow) IPC_MESSAGE_HANDLER(AutomationMsg_SavePage, SavePage) IPC_MESSAGE_HANDLER(AutomationMsg_OpenFindInPage, HandleOpenFindInPageRequest) @@ -1670,31 +1668,6 @@ void TestingAutomationProvider::IsMenuCommandEnabled(int browser_handle, } } -void TestingAutomationProvider::PrintNow(int tab_handle, - IPC::Message* reply_message) { - NavigationController* tab = NULL; - WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); - if (web_contents) { - FindAndActivateTab(tab); - - content::NotificationObserver* observer = - new DocumentPrintedNotificationObserver(this, reply_message); - - TabContentsWrapper* wrapper = - TabContentsWrapper::GetCurrentWrapperForContents(web_contents); - if (!wrapper->print_view_manager()->PrintNow()) { - // Clean up the observer. It will send the reply message. - delete observer; - } - - // Return now to avoid sending reply message twice. - return; - } - - AutomationMsg_PrintNow::WriteReplyParams(reply_message, false); - Send(reply_message); -} - void TestingAutomationProvider::SavePage(int tab_handle, const FilePath& file_name, const FilePath& dir_path, diff --git a/chrome/browser/automation/testing_automation_provider.h b/chrome/browser/automation/testing_automation_provider.h index 6679010..1278689 100644 --- a/chrome/browser/automation/testing_automation_provider.h +++ b/chrome/browser/automation/testing_automation_provider.h @@ -242,9 +242,6 @@ class TestingAutomationProvider : public AutomationProvider, int message_num, bool* menu_item_enabled); - // Prints the current tab immediately. - void PrintNow(int tab_handle, IPC::Message* reply_message); - // Save the current web page. void SavePage(int tab_handle, const FilePath& file_name, diff --git a/chrome/browser/printing/printing_layout_uitest.cc b/chrome/browser/printing/printing_layout_browsertest.cc index 97584f1..0fc560b 100644 --- a/chrome/browser/printing/printing_layout_uitest.cc +++ b/chrome/browser/printing/printing_layout_browsertest.cc @@ -5,13 +5,25 @@ #include "base/command_line.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/message_loop.h" +#include "base/path_service.h" #include "base/process_util.h" #include "base/string_util.h" #include "base/test/test_file_util.h" #include "base/threading/simple_thread.h" #include "base/utf_string_conversions.h" -#include "chrome/test/automation/tab_proxy.h" -#include "chrome/test/ui/ui_test.h" +#include "chrome/browser/printing/print_job.h" +#include "chrome/browser/printing/print_view_manager.h" +#include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" +#include "chrome/common/chrome_paths.h" +#include "chrome/common/chrome_switches.h" +#include "chrome/common/chrome_notification_types.h" +#include "chrome/test/base/in_process_browser_test.h" +#include "chrome/test/base/ui_test_utils.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" +#include "content/public/browser/notification_service.h" #include "net/test/test_server.h" #include "printing/image.h" #include "printing/printing_test.h" @@ -21,32 +33,74 @@ namespace { using printing::Image; const char kGenerateSwitch[] = "print-layout-generate"; -const FilePath::CharType kDocRoot[] = FILE_PATH_LITERAL("chrome/test/data"); -class PrintingLayoutTest : public PrintingTest<UITest> { +class PrintingLayoutTest : public PrintingTest<InProcessBrowserTest>, + public content::NotificationObserver { public: PrintingLayoutTest() { - emf_path_ = browser_directory_.AppendASCII("metafile_dumps"); - launch_arguments_.AppendSwitchPath("debug-print", emf_path_); - show_window_ = true; + FilePath browser_directory; + PathService::Get(chrome::DIR_APP, &browser_directory); + emf_path_ = browser_directory.AppendASCII("metafile_dumps"); } - virtual void SetUp() { + virtual void SetUp() OVERRIDE { // Make sure there is no left overs. CleanupDumpDirectory(); - UITest::SetUp(); + InProcessBrowserTest::SetUp(); } - virtual void TearDown() { - UITest::TearDown(); + virtual void TearDown() OVERRIDE { + InProcessBrowserTest::TearDown(); file_util::Delete(emf_path_, true); } + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { + command_line->AppendSwitchPath(switches::kDebugPrint, emf_path_); + } + protected: void PrintNowTab() { - scoped_refptr<TabProxy> tab_proxy(GetActiveTab()); - ASSERT_TRUE(tab_proxy.get()); - ASSERT_TRUE(tab_proxy->PrintNow()); + registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_EVENT, + content::NotificationService::AllSources()); + + TabContentsWrapper* wrapper = browser()->GetSelectedTabContentsWrapper(); + wrapper->print_view_manager()->PrintNow(); + ui_test_utils::RunMessageLoop(); + registrar_.RemoveAll(); + } + + virtual void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { + DCHECK(type == chrome::NOTIFICATION_PRINT_JOB_EVENT); + switch (content::Details<printing::JobEventDetails>(details)->type()) { + case printing::JobEventDetails::JOB_DONE: { + // Succeeded. + MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure()); + break; + } + case printing::JobEventDetails::USER_INIT_CANCELED: + case printing::JobEventDetails::FAILED: { + // Failed. + ASSERT_TRUE(false); + MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure()); + break; + } + case printing::JobEventDetails::NEW_DOC: + case printing::JobEventDetails::USER_INIT_DONE: + case printing::JobEventDetails::DEFAULT_INIT_DONE: + case printing::JobEventDetails::NEW_PAGE: + case printing::JobEventDetails::PAGE_DONE: + case printing::JobEventDetails::DOC_DONE: + case printing::JobEventDetails::ALL_PAGES_REQUESTED: { + // Don't care. + break; + } + default: { + NOTREACHED(); + break; + } + } } // Finds the dump for the last print job and compares it to the data named @@ -60,7 +114,8 @@ class PrintingLayoutTest : public PrintingTest<UITest> { return 100.; } - FilePath base_path(test_data_directory_.AppendASCII("printing")); + FilePath base_path(ui_test_utils::GetTestFilePath( + FilePath().AppendASCII("printing"), FilePath())); FilePath emf(base_path.Append(verification_name + L".emf")); FilePath png(base_path.Append(verification_name + L".png")); @@ -110,8 +165,8 @@ class PrintingLayoutTest : public PrintingTest<UITest> { // Makes sure the directory exists and is empty. void CleanupDumpDirectory() { - EXPECT_TRUE(file_util::DieFileDie(emf_path(), true)); - EXPECT_TRUE(file_util::CreateDirectory(emf_path())); + EXPECT_TRUE(file_util::DieFileDie(emf_path_, true)); + EXPECT_TRUE(file_util::CreateDirectory(emf_path_)); } // Returns if Clear Type is currently enabled. @@ -136,7 +191,7 @@ class PrintingLayoutTest : public PrintingTest<UITest> { bool found_emf = false; bool found_prn = false; for (int i = 0; i < 100; ++i) { - file_util::FileEnumerator enumerator(emf_path(), false, + file_util::FileEnumerator enumerator(emf_path_, false, file_util::FileEnumerator::FILES); emf_file.clear(); prn_file.clear(); @@ -177,21 +232,12 @@ class PrintingLayoutTest : public PrintingTest<UITest> { return CommandLine::ForCurrentProcess()->HasSwitch(kGenerateSwitch); } - const FilePath& emf_path() const { return emf_path_; } - FilePath emf_path_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(PrintingLayoutTest); }; -// Tests that don't need UI access. -class PrintingLayoutTestHidden : public PrintingLayoutTest { - public: - PrintingLayoutTestHidden() { - show_window_ = false; - } -}; - class PrintingLayoutTextTest : public PrintingLayoutTest { typedef PrintingLayoutTest Parent; public: @@ -242,8 +288,8 @@ bool CloseDialogWindow(HWND dialog_window) { // default button. class DismissTheWindow : public base::DelegateSimpleThread::Delegate { public: - explicit DismissTheWindow(DWORD owner_process) - : owner_process_(owner_process) { + DismissTheWindow() + : owner_process_(base::Process::Current().pid()) { } virtual void Run() { @@ -277,21 +323,19 @@ class DismissTheWindow : public base::DelegateSimpleThread::Delegate { } // namespace // Fails, see http://crbug.com/7721. -TEST_F(PrintingLayoutTextTest, DISABLED_Complex) { +IN_PROC_BROWSER_TEST_F(PrintingLayoutTextTest, DISABLED_Complex) { if (IsTestCaseDisabled()) return; - DismissTheWindow dismisser(base::GetProcId(process())); + DismissTheWindow dismisser; base::DelegateSimpleThread close_printdlg_thread(&dismisser, "close_printdlg_thread"); // Print a document, check its output. - net::TestServer test_server(net::TestServer::TYPE_HTTP, - net::TestServer::kLocalhost, - FilePath(kDocRoot)); - ASSERT_TRUE(test_server.Start()); + ASSERT_TRUE(test_server()->Start()); - NavigateToURL(test_server.GetURL("files/printing/test1.html")); + ui_test_utils::NavigateToURL( + browser(), test_server()->GetURL("files/printing/test1.html")); close_printdlg_thread.Start(); PrintNowTab(); close_printdlg_thread.Join(); @@ -313,23 +357,20 @@ const TestPool kTestPool[] = { }; // http://crbug.com/7721 -TEST_F(PrintingLayoutTestHidden, DISABLED_ManyTimes) { +IN_PROC_BROWSER_TEST_F(PrintingLayoutTest, DISABLED_ManyTimes) { if (IsTestCaseDisabled()) return; - net::TestServer test_server(net::TestServer::TYPE_HTTP, - net::TestServer::kLocalhost, - FilePath(kDocRoot)); - ASSERT_TRUE(test_server.Start()); + ASSERT_TRUE(test_server()->Start()); - DismissTheWindow dismisser(base::GetProcId(process())); + DismissTheWindow dismisser; ASSERT_GT(arraysize(kTestPool), 0u); for (int i = 0; i < arraysize(kTestPool); ++i) { if (i) CleanupDumpDirectory(); const TestPool& test = kTestPool[i % arraysize(kTestPool)]; - NavigateToURL(test_server.GetURL(test.source)); + ui_test_utils::NavigateToURL(browser(), test_server()->GetURL(test.source)); base::DelegateSimpleThread close_printdlg_thread1(&dismisser, "close_printdlg_thread"); EXPECT_EQ(NULL, FindDialogWindow(dismisser.owner_process())); @@ -365,69 +406,57 @@ TEST_F(PrintingLayoutTestHidden, DISABLED_ManyTimes) { } // Prints a popup and immediately closes it. Disabled because it crashes. -TEST_F(PrintingLayoutTest, DISABLED_Delayed) { +IN_PROC_BROWSER_TEST_F(PrintingLayoutTest, DISABLED_Delayed) { if (IsTestCaseDisabled()) return; - net::TestServer test_server(net::TestServer::TYPE_HTTP, - net::TestServer::kLocalhost, - FilePath(kDocRoot)); - ASSERT_TRUE(test_server.Start()); + ASSERT_TRUE(test_server()->Start()); { - scoped_refptr<TabProxy> tab_proxy(GetActiveTab()); - ASSERT_TRUE(tab_proxy.get()); bool is_timeout = true; - GURL url = test_server.GetURL("files/printing/popup_delayed_print.htm"); - EXPECT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, - tab_proxy->NavigateToURL(url)); + GURL url = test_server()->GetURL("files/printing/popup_delayed_print.htm"); + ui_test_utils::NavigateToURL(browser(), url); - DismissTheWindow dismisser(base::GetProcId(process())); + DismissTheWindow dismisser; base::DelegateSimpleThread close_printdlg_thread(&dismisser, "close_printdlg_thread"); close_printdlg_thread.Start(); close_printdlg_thread.Join(); // Force a navigation elsewhere to verify that it's fine with it. - url = test_server.GetURL("files/printing/test1.html"); - EXPECT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, - tab_proxy->NavigateToURL(url)); + url = test_server()->GetURL("files/printing/test1.html"); + ui_test_utils::NavigateToURL(browser(), url); } - CloseBrowserAndServer(); + browser()->CloseWindow(); + ui_test_utils::RunAllPendingInMessageLoop(); EXPECT_EQ(0., CompareWithResult(L"popup_delayed_print")) << L"popup_delayed_print"; } // Prints a popup and immediately closes it. http://crbug.com/7721 -TEST_F(PrintingLayoutTest, DISABLED_IFrame) { +IN_PROC_BROWSER_TEST_F(PrintingLayoutTest, DISABLED_IFrame) { if (IsTestCaseDisabled()) return; - net::TestServer test_server(net::TestServer::TYPE_HTTP, - net::TestServer::kLocalhost, - FilePath(kDocRoot)); - ASSERT_TRUE(test_server.Start()); + ASSERT_TRUE(test_server()->Start()); { - scoped_refptr<TabProxy> tab_proxy(GetActiveTab()); - ASSERT_TRUE(tab_proxy.get()); - GURL url = test_server.GetURL("files/printing/iframe.htm"); - EXPECT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, - tab_proxy->NavigateToURL(url)); + GURL url = test_server()->GetURL("files/printing/iframe.htm"); + ui_test_utils::NavigateToURL(browser(), url); - DismissTheWindow dismisser(base::GetProcId(process())); + DismissTheWindow dismisser; base::DelegateSimpleThread close_printdlg_thread(&dismisser, "close_printdlg_thread"); close_printdlg_thread.Start(); close_printdlg_thread.Join(); // Force a navigation elsewhere to verify that it's fine with it. - url = test_server.GetURL("files/printing/test1.html"); - EXPECT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, - tab_proxy->NavigateToURL(url)); + url = test_server()->GetURL("files/printing/test1.html"); + ui_test_utils::NavigateToURL(browser(), url); } - CloseBrowserAndServer(); + browser()->CloseWindow(); + ui_test_utils::RunAllPendingInMessageLoop(); EXPECT_EQ(0., CompareWithResult(L"iframe")) << L"iframe"; } diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index ac0384d..536b9b3 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -758,7 +758,6 @@ # New tests should be browser_tests. browser_tests are sharded and are # less flakier. 'browser/locale_tests_uitest.cc', - 'browser/printing/printing_layout_uitest.cc', 'browser/process_singleton_linux_uitest.cc', 'browser/process_singleton_uitest.cc', 'browser/sanity_uitest.cc', @@ -859,11 +858,6 @@ }, }, }, - }, { # else: OS != "win" - 'sources!': [ - # TODO(port): http://crbug.com/45770 - 'browser/printing/printing_layout_uitest.cc', - ], }], ['os_posix == 1 and OS != "mac"', { 'conditions': [ @@ -2866,6 +2860,7 @@ 'browser/prerender/prefetch_browsertest.cc', 'browser/prerender/prerender_browsertest.cc', 'browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc', + 'browser/printing/printing_layout_browsertest.cc', 'browser/printing/print_preview_tab_controller_browsertest.cc', 'browser/profiles/profile_browsertest.cc', 'browser/profiles/profile_manager_browsertest.cc', @@ -3039,7 +3034,7 @@ '../content/renderer/mouse_lock_dispatcher_browsertest.cc', '../content/renderer/render_view_browsertest.cc', '../content/renderer/render_view_browsertest_mac.mm', - '../content/test/gpu/test_switches.cc', + '../content/test/gpu/test_switches.cc', '../content/test/gpu/test_switches.h', '../content/test/layout_browsertest.cc', '../content/test/layout_browsertest.h', @@ -3245,6 +3240,8 @@ 'app/chrome_dll.rc', 'app/chrome_dll_resource.h', 'app/chrome_version.rc.version', + # TODO(port): http://crbug.com/45770 + 'browser/printing/printing_layout_browsertest.cc', ], }], ['toolkit_uses_gtk == 1', { diff --git a/chrome/common/automation_messages_internal.h b/chrome/common/automation_messages_internal.h index 66f6bc4..0cbafe4 100644 --- a/chrome/common/automation_messages_internal.h +++ b/chrome/common/automation_messages_internal.h @@ -614,7 +614,7 @@ IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_IsMenuCommandEnabled, // This message notifies the AutomationProvider to print the tab with given // handle. The first parameter is the handle to the tab resource. The // return value contains a bool which is true on success. -IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_PrintNow, +IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_DEPRECATED_PrintNow, int, bool) diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc index 9042ea0..79b2651 100644 --- a/chrome/test/automation/tab_proxy.cc +++ b/chrome/test/automation/tab_proxy.cc @@ -573,15 +573,6 @@ bool TabProxy::TakeActionOnSSLBlockingPage(bool proceed) { result == AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED; } -bool TabProxy::PrintNow() { - if (!is_valid()) - return false; - - bool succeeded = false; - sender_->Send(new AutomationMsg_PrintNow(handle_, &succeeded)); - return succeeded; -} - bool TabProxy::PrintAsync() { if (!is_valid()) return false; diff --git a/chrome/test/automation/tab_proxy.h b/chrome/test/automation/tab_proxy.h index 8a69a4c7..c2e0d57 100644 --- a/chrome/test/automation/tab_proxy.h +++ b/chrome/test/automation/tab_proxy.h @@ -278,9 +278,6 @@ class TabProxy : public AutomationResourceProxy, // out of there' button. bool TakeActionOnSSLBlockingPage(bool proceed) WARN_UNUSED_RESULT; - // Prints the current page without user intervention. - bool PrintNow() WARN_UNUSED_RESULT; - // Sends off an asynchronous request for printing. bool PrintAsync() WARN_UNUSED_RESULT; diff --git a/printing/printing_test.h b/printing/printing_test.h index da5d86d..35b9169 100644 --- a/printing/printing_test.h +++ b/printing/printing_test.h @@ -14,7 +14,7 @@ // Disable the whole test case when executing on a computer that has no printer // installed. -// Note: Parent should be testing::Test or UITest. +// Note: Parent should be testing::Test or InProcessBrowserTest. template<typename Parent> class PrintingTest : public Parent { public: |