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

Side by Side Diff: chrome/test/automation/tab_proxy.cc

Issue 10033001: Convert printing ui_tests to browser_tests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/automation/tab_proxy.h ('k') | printing/printing_test.h » ('j') | 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 "chrome/test/automation/tab_proxy.h" 5 #include "chrome/test/automation/tab_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/json/json_string_value_serializer.h" 9 #include "base/json/json_string_value_serializer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 return false; 595 return false;
596 596
597 AutomationMsg_NavigationResponseValues result = 597 AutomationMsg_NavigationResponseValues result =
598 AUTOMATION_MSG_NAVIGATION_ERROR; 598 AUTOMATION_MSG_NAVIGATION_ERROR;
599 sender_->Send(new AutomationMsg_ActionOnSSLBlockingPage(handle_, proceed, 599 sender_->Send(new AutomationMsg_ActionOnSSLBlockingPage(handle_, proceed,
600 &result)); 600 &result));
601 return result == AUTOMATION_MSG_NAVIGATION_SUCCESS || 601 return result == AUTOMATION_MSG_NAVIGATION_SUCCESS ||
602 result == AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED; 602 result == AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED;
603 } 603 }
604 604
605 bool TabProxy::PrintNow() {
606 if (!is_valid())
607 return false;
608
609 bool succeeded = false;
610 sender_->Send(new AutomationMsg_PrintNow(handle_, &succeeded));
611 return succeeded;
612 }
613
614 bool TabProxy::PrintAsync() { 605 bool TabProxy::PrintAsync() {
615 if (!is_valid()) 606 if (!is_valid())
616 return false; 607 return false;
617 608
618 return sender_->Send(new AutomationMsg_PrintAsync(handle_)); 609 return sender_->Send(new AutomationMsg_PrintAsync(handle_));
619 } 610 }
620 611
621 bool TabProxy::SavePage(const FilePath& file_name, 612 bool TabProxy::SavePage(const FilePath& file_name,
622 const FilePath& dir_path, 613 const FilePath& dir_path,
623 content::SavePageType type) { 614 content::SavePageType type) {
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 json)); 819 json));
829 } 820 }
830 821
831 void TabProxy::FirstObjectAdded() { 822 void TabProxy::FirstObjectAdded() {
832 AddRef(); 823 AddRef();
833 } 824 }
834 825
835 void TabProxy::LastObjectRemoved() { 826 void TabProxy::LastObjectRemoved() {
836 Release(); 827 Release();
837 } 828 }
OLDNEW
« no previous file with comments | « chrome/test/automation/tab_proxy.h ('k') | printing/printing_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698