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

Side by Side Diff: chrome/service/cloud_print/printer_job_queue_handler_unittest.cc

Issue 1899083002: Convert //chrome from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/service/cloud_print/printer_job_queue_handler.h" 5 #include "chrome/service/cloud_print/printer_job_queue_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 "]" 46 "]"
47 "}"; 47 "}";
48 48
49 class TimeProviderMock : public PrinterJobQueueHandler::TimeProvider { 49 class TimeProviderMock : public PrinterJobQueueHandler::TimeProvider {
50 public: 50 public:
51 MOCK_METHOD0(GetNow, base::Time()); 51 MOCK_METHOD0(GetNow, base::Time());
52 }; 52 };
53 53
54 class PrinterJobQueueHandlerTest : public ::testing::Test { 54 class PrinterJobQueueHandlerTest : public ::testing::Test {
55 protected: 55 protected:
56 scoped_ptr<base::Value> data_; 56 std::unique_ptr<base::Value> data_;
57 57
58 const base::DictionaryValue* GetAsDictionary() const { 58 const base::DictionaryValue* GetAsDictionary() const {
59 const base::DictionaryValue* json_data_ = nullptr; 59 const base::DictionaryValue* json_data_ = nullptr;
60 EXPECT_TRUE(data_->GetAsDictionary(&json_data_)); 60 EXPECT_TRUE(data_->GetAsDictionary(&json_data_));
61 return json_data_; 61 return json_data_;
62 } 62 }
63 63
64 void SetUp() override { 64 void SetUp() override {
65 base::JSONReader json_reader; 65 base::JSONReader json_reader;
66 data_ = json_reader.Read(kJobListResponse); 66 data_ = json_reader.Read(kJobListResponse);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 .WillByDefault(Return(base::Time::UnixEpoch() + 173 .WillByDefault(Return(base::Time::UnixEpoch() +
174 base::TimeDelta::FromSeconds(4) + time_to_wait)); 174 base::TimeDelta::FromSeconds(4) + time_to_wait));
175 175
176 job_queue_handler.GetJobsFromQueue(GetAsDictionary(), &jobs); 176 job_queue_handler.GetJobsFromQueue(GetAsDictionary(), &jobs);
177 177
178 EXPECT_EQ(base::TimeDelta(), jobs[0].time_remaining_); 178 EXPECT_EQ(base::TimeDelta(), jobs[0].time_remaining_);
179 EXPECT_EQ(std::string("__testjob2"), jobs[0].job_id_); 179 EXPECT_EQ(std::string("__testjob2"), jobs[0].job_id_);
180 } 180 }
181 181
182 } // namespace cloud_print 182 } // namespace cloud_print
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/printer_job_queue_handler.h ('k') | chrome/service/net/service_url_request_context_getter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698