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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 const std::string& scheme) { | 220 const std::string& scheme) { |
221 if (TestController::GetInstance()->use_delegate()) | 221 if (TestController::GetInstance()->use_delegate()) |
222 request->set_delegate(TestController::GetInstance()->delegate()); | 222 request->set_delegate(TestController::GetInstance()->delegate()); |
223 if (request && | 223 if (request && |
224 (request->url() == TestController::GetInstance()->expected_url())) { | 224 (request->url() == TestController::GetInstance()->expected_url())) { |
225 TestController::GetInstance()->set_result(true); | 225 TestController::GetInstance()->set_result(true); |
226 } | 226 } |
227 return new SimpleTestJob(request); | 227 return new SimpleTestJob(request); |
228 } | 228 } |
229 | 229 |
230 #if defined(OS_WIN) || defined(USE_AURA) | 230 #if defined(OS_WIN) |
231 // http://crbug.com/94864 for OS_WIN issue | 231 // http://crbug.com/94864 for OS_WIN issue |
232 // http://crbug.com/104396 for AURA issue. | |
233 #define MAYBE_HandlersRegistered DISABLED_HandlersRegistered | 232 #define MAYBE_HandlersRegistered DISABLED_HandlersRegistered |
234 #else | 233 #else |
235 #define MAYBE_HandlersRegistered HandlersRegistered | 234 #define MAYBE_HandlersRegistered HandlersRegistered |
236 #endif | 235 #endif |
237 IN_PROC_BROWSER_TEST_F(PrintDialogCloudTest, MAYBE_HandlersRegistered) { | 236 IN_PROC_BROWSER_TEST_F(PrintDialogCloudTest, MAYBE_HandlersRegistered) { |
238 BrowserList::SetLastActive(browser()); | 237 BrowserList::SetLastActive(browser()); |
239 ASSERT_TRUE(BrowserList::GetLastActive()); | 238 ASSERT_TRUE(BrowserList::GetLastActive()); |
240 | 239 |
241 AddTestHandlers(); | 240 AddTestHandlers(); |
242 | 241 |
(...skipping 28 matching lines...) Expand all Loading... |
271 | 270 |
272 string16 window_print = ASCIIToUTF16("window.print()"); | 271 string16 window_print = ASCIIToUTF16("window.print()"); |
273 browser()->GetSelectedTabContents()->render_view_host()-> | 272 browser()->GetSelectedTabContents()->render_view_host()-> |
274 ExecuteJavascriptInWebFrame(string16(), window_print); | 273 ExecuteJavascriptInWebFrame(string16(), window_print); |
275 | 274 |
276 ui_test_utils::RunMessageLoop(); | 275 ui_test_utils::RunMessageLoop(); |
277 | 276 |
278 ASSERT_TRUE(TestController::GetInstance()->result()); | 277 ASSERT_TRUE(TestController::GetInstance()->result()); |
279 } | 278 } |
280 #endif | 279 #endif |
OLD | NEW |