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

Side by Side Diff: chrome/browser/printing/print_job_unittest.cc

Issue 7744039: Switch ChromeTestSuite to the same convention as ContentTestSuite: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixing Created 9 years, 4 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
OLDNEW
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/chrome_notification_types.h" 9 #include "chrome/common/chrome_notification_types.h"
10 #include "chrome/test/base/testing_browser_process_test.h"
11 #include "content/common/notification_registrar.h" 10 #include "content/common/notification_registrar.h"
12 #include "content/common/notification_service.h" 11 #include "content/common/notification_service.h"
13 #include "googleurl/src/gurl.h" 12 #include "googleurl/src/gurl.h"
14 #include "printing/printed_pages_source.h" 13 #include "printing/printed_pages_source.h"
15 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
16 15
17 namespace { 16 namespace {
18 17
19 class TestSource : public printing::PrintedPagesSource { 18 class TestSource : public printing::PrintedPagesSource {
20 public: 19 public:
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // NotificationObserver 79 // NotificationObserver
81 virtual void Observe(int type, 80 virtual void Observe(int type,
82 const NotificationSource& source, 81 const NotificationSource& source,
83 const NotificationDetails& details) { 82 const NotificationDetails& details) {
84 ADD_FAILURE(); 83 ADD_FAILURE();
85 } 84 }
86 }; 85 };
87 86
88 } // namespace 87 } // namespace
89 88
90 typedef TestingBrowserProcessTest PrintJobTest; 89 typedef testing::Test PrintJobTest;
91 90
92 TEST_F(PrintJobTest, SimplePrint) { 91 TEST_F(PrintJobTest, SimplePrint) {
93 // Test the multi-threaded nature of PrintJob to make sure we can use it with 92 // Test the multi-threaded nature of PrintJob to make sure we can use it with
94 // known lifetime. 93 // known lifetime.
95 94
96 // This message loop is actually never run. 95 // This message loop is actually never run.
97 MessageLoop current; 96 MessageLoop current;
98 97
99 NotificationRegistrar registrar_; 98 NotificationRegistrar registrar_;
100 TestPrintNotifObserv observ; 99 TestPrintNotifObserv observ;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 job->is_job_pending(); 134 job->is_job_pending();
136 job->document(); 135 job->document();
137 // Private 136 // Private
138 job->UpdatePrintedDocument(NULL); 137 job->UpdatePrintedDocument(NULL);
139 scoped_refptr<printing::JobEventDetails> event_details; 138 scoped_refptr<printing::JobEventDetails> event_details;
140 job->OnNotifyPrintJobEvent(event_details); 139 job->OnNotifyPrintJobEvent(event_details);
141 job->OnDocumentDone(); 140 job->OnDocumentDone();
142 job->ControlledWorkerShutdown(); 141 job->ControlledWorkerShutdown();
143 */ 142 */
144 } 143 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698