| OLD | NEW |
| 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 "chrome/browser/printing/print_dialog_cloud.h" | 5 #include "chrome/browser/printing/print_dialog_cloud.h" |
| 6 #include "chrome/browser/printing/print_dialog_cloud_internal.h" | 6 #include "chrome/browser/printing/print_dialog_cloud_internal.h" |
| 7 | 7 |
| 8 #include <functional> | 8 #include <functional> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 // Must be static for handing into AddHostnameHandler. | 148 // Must be static for handing into AddHostnameHandler. |
| 149 static net::URLRequest::ProtocolFactory Factory; | 149 static net::URLRequest::ProtocolFactory Factory; |
| 150 | 150 |
| 151 class AutoQuitDelegate : public TestDelegate { | 151 class AutoQuitDelegate : public TestDelegate { |
| 152 public: | 152 public: |
| 153 AutoQuitDelegate() {} | 153 AutoQuitDelegate() {} |
| 154 | 154 |
| 155 virtual void OnResponseCompleted(net::URLRequest* request) { | 155 virtual void OnResponseCompleted(net::URLRequest* request) { |
| 156 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 156 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
| 157 new MessageLoop::QuitTask()); | 157 MessageLoop::QuitClosure()); |
| 158 } | 158 } |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 virtual void SetUp() { | 161 virtual void SetUp() { |
| 162 TestController::GetInstance()->set_result(false); | 162 TestController::GetInstance()->set_result(false); |
| 163 InProcessBrowserTest::SetUp(); | 163 InProcessBrowserTest::SetUp(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 virtual void TearDown() { | 166 virtual void TearDown() { |
| 167 if (handler_added_) { | 167 if (handler_added_) { |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 270 |
| 271 string16 window_print = ASCIIToUTF16("window.print()"); | 271 string16 window_print = ASCIIToUTF16("window.print()"); |
| 272 browser()->GetSelectedTabContents()->render_view_host()-> | 272 browser()->GetSelectedTabContents()->render_view_host()-> |
| 273 ExecuteJavascriptInWebFrame(string16(), window_print); | 273 ExecuteJavascriptInWebFrame(string16(), window_print); |
| 274 | 274 |
| 275 ui_test_utils::RunMessageLoop(); | 275 ui_test_utils::RunMessageLoop(); |
| 276 | 276 |
| 277 ASSERT_TRUE(TestController::GetInstance()->result()); | 277 ASSERT_TRUE(TestController::GetInstance()->result()); |
| 278 } | 278 } |
| 279 #endif | 279 #endif |
| OLD | NEW |