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 "base/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "base/string16.h" | 6 #include "base/string16.h" |
7 #include "chrome/browser/printing/print_job.h" | 7 #include "chrome/browser/printing/print_job.h" |
8 #include "chrome/browser/printing/print_job_worker.h" | 8 #include "chrome/browser/printing/print_job_worker.h" |
9 #include "chrome/common/notification_registrar.h" | 9 #include "chrome/common/notification_registrar.h" |
10 #include "chrome/common/notification_service.h" | 10 #include "chrome/common/notification_service.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 // NotificationObserver | 78 // NotificationObserver |
79 virtual void Observe(NotificationType type, | 79 virtual void Observe(NotificationType type, |
80 const NotificationSource& source, | 80 const NotificationSource& source, |
81 const NotificationDetails& details) { | 81 const NotificationDetails& details) { |
82 EXPECT_FALSE(true); | 82 EXPECT_FALSE(true); |
83 } | 83 } |
84 }; | 84 }; |
85 | 85 |
86 } // namespace | 86 } // namespace |
87 | 87 |
88 // Crashes, Bug 55181. | 88 TEST(PrintJobTest, SimplePrint) { |
89 #if defined(OS_WIN) | |
90 #define MAYBE_SimplePrint DISABLED_SimplePrint | |
91 #else | |
92 #define MAYBE_SimplePrint SimplePrint | |
93 #endif | |
94 TEST(PrintJobTest, MAYBE_SimplePrint) { | |
95 // Test the multi-threaded nature of PrintJob to make sure we can use it with | 89 // Test the multi-threaded nature of PrintJob to make sure we can use it with |
96 // known lifetime. | 90 // known lifetime. |
97 | 91 |
98 // This message loop is actually never run. | 92 // This message loop is actually never run. |
99 MessageLoop current; | 93 MessageLoop current; |
100 | 94 |
101 NotificationRegistrar registrar_; | 95 NotificationRegistrar registrar_; |
102 TestPrintNotifObserv observ; | 96 TestPrintNotifObserv observ; |
103 registrar_.Add(&observ, NotificationType::ALL, | 97 registrar_.Add(&observ, NotificationType::ALL, |
104 NotificationService::AllSources()); | 98 NotificationService::AllSources()); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 job->is_job_pending(); | 131 job->is_job_pending(); |
138 job->document(); | 132 job->document(); |
139 // Private | 133 // Private |
140 job->UpdatePrintedDocument(NULL); | 134 job->UpdatePrintedDocument(NULL); |
141 scoped_refptr<printing::JobEventDetails> event_details; | 135 scoped_refptr<printing::JobEventDetails> event_details; |
142 job->OnNotifyPrintJobEvent(event_details); | 136 job->OnNotifyPrintJobEvent(event_details); |
143 job->OnDocumentDone(); | 137 job->OnDocumentDone(); |
144 job->ControlledWorkerShutdown(); | 138 job->ControlledWorkerShutdown(); |
145 */ | 139 */ |
146 } | 140 } |
OLD | NEW |