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

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

Issue 2871303004: Rename TaskRunner::RunsTasksOnCurrentThread() in //chrome (Closed)
Patch Set: fixed build error Created 3 years, 7 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
« no previous file with comments | « chrome/browser/printing/print_job.cc ('k') | chrome/browser/printing/print_job_worker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_job.h" 5 #include "chrome/browser/printing/print_job.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // known lifetime. 96 // known lifetime.
97 97
98 content::TestBrowserThreadBundle thread_bundle_; 98 content::TestBrowserThreadBundle thread_bundle_;
99 content::NotificationRegistrar registrar_; 99 content::NotificationRegistrar registrar_;
100 TestPrintNotificationObserver observer; 100 TestPrintNotificationObserver observer;
101 registrar_.Add(&observer, 101 registrar_.Add(&observer,
102 content::NOTIFICATION_ALL, 102 content::NOTIFICATION_ALL,
103 content::NotificationService::AllSources()); 103 content::NotificationService::AllSources());
104 volatile bool check = false; 104 volatile bool check = false;
105 scoped_refptr<PrintJob> job(new TestPrintJob(&check)); 105 scoped_refptr<PrintJob> job(new TestPrintJob(&check));
106 EXPECT_TRUE(job->RunsTasksOnCurrentThread()); 106 EXPECT_TRUE(job->RunsTasksInCurrentSequence());
107 scoped_refptr<TestOwner> owner(new TestOwner); 107 scoped_refptr<TestOwner> owner(new TestOwner);
108 TestSource source; 108 TestSource source;
109 job->Initialize(owner.get(), &source, 1); 109 job->Initialize(owner.get(), &source, 1);
110 job->Stop(); 110 job->Stop();
111 while (job->document()) { 111 while (job->document()) {
112 base::RunLoop().RunUntilIdle(); 112 base::RunLoop().RunUntilIdle();
113 } 113 }
114 EXPECT_FALSE(job->document()); 114 EXPECT_FALSE(job->document());
115 job = nullptr; 115 job = nullptr;
116 while (!check) { 116 while (!check) {
(...skipping 28 matching lines...) Expand all
145 // Private 145 // Private
146 job->UpdatePrintedDocument(nullptr); 146 job->UpdatePrintedDocument(nullptr);
147 scoped_refptr<JobEventDetails> event_details; 147 scoped_refptr<JobEventDetails> event_details;
148 job->OnNotifyPrintJobEvent(event_details); 148 job->OnNotifyPrintJobEvent(event_details);
149 job->OnDocumentDone(); 149 job->OnDocumentDone();
150 job->ControlledWorkerShutdown(); 150 job->ControlledWorkerShutdown();
151 */ 151 */
152 } 152 }
153 153
154 } // namespace printing 154 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_job.cc ('k') | chrome/browser/printing/print_job_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698