OLD | NEW |
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/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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 if (request && | 244 if (request && |
245 (request->url() == TestController::GetInstance()->expected_url())) { | 245 (request->url() == TestController::GetInstance()->expected_url())) { |
246 if (TestController::GetInstance()->use_delegate()) | 246 if (TestController::GetInstance()->use_delegate()) |
247 request->set_delegate(TestController::GetInstance()->delegate()); | 247 request->set_delegate(TestController::GetInstance()->delegate()); |
248 TestController::GetInstance()->set_result(true); | 248 TestController::GetInstance()->set_result(true); |
249 return new SimpleTestJob(request, network_delegate); | 249 return new SimpleTestJob(request, network_delegate); |
250 } | 250 } |
251 return new net::URLRequestTestJob(request, | 251 return new net::URLRequestTestJob(request, |
252 network_delegate, | 252 network_delegate, |
253 net::URLRequestTestJob::test_headers(), | 253 net::URLRequestTestJob::test_headers(), |
254 "", | 254 std::string(), |
255 true); | 255 true); |
256 } | 256 } |
257 | 257 |
258 IN_PROC_BROWSER_TEST_F(PrintDialogCloudTest, HandlersRegistered) { | 258 IN_PROC_BROWSER_TEST_F(PrintDialogCloudTest, HandlersRegistered) { |
259 AddTestHandlers(); | 259 AddTestHandlers(); |
260 | 260 |
261 TestController::GetInstance()->set_use_delegate(true); | 261 TestController::GetInstance()->set_use_delegate(true); |
262 | 262 |
263 content::RunMessageLoop(); | 263 content::RunMessageLoop(); |
264 | 264 |
(...skipping 10 matching lines...) Expand all Loading... |
275 BrowserWindow* window = browser()->window(); | 275 BrowserWindow* window = browser()->window(); |
276 ASSERT_TRUE(window); | 276 ASSERT_TRUE(window); |
277 gfx::NativeWindow native_window = window->GetNativeWindow(); | 277 gfx::NativeWindow native_window = window->GetNativeWindow(); |
278 ASSERT_TRUE(native_window); | 278 ASSERT_TRUE(native_window); |
279 bool key_sent = ui_controls::SendKeyPress(native_window, ui::VKEY_ESCAPE, | 279 bool key_sent = ui_controls::SendKeyPress(native_window, ui::VKEY_ESCAPE, |
280 false, false, false, false); | 280 false, false, false, false); |
281 EXPECT_TRUE(key_sent); | 281 EXPECT_TRUE(key_sent); |
282 if (key_sent) | 282 if (key_sent) |
283 tab_closed_observer.Wait(); | 283 tab_closed_observer.Wait(); |
284 } | 284 } |
OLD | NEW |