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

Side by Side Diff: chrome/browser/ui/webui/print_preview/printer_capabilities_unittest.cc

Issue 2769333006: Replace unique_ptr.reset(other_unique_ptr.release()) with std::move() in chrome/browser (Closed)
Patch Set: Created 3 years, 9 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/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <memory> 5 #include <memory>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
11 #include "base/task_runner_util.h" 11 #include "base/task_runner_util.h"
12 #include "base/test/values_test_util.h" 12 #include "base/test/values_test_util.h"
13 #include "base/threading/sequenced_worker_pool.h" 13 #include "base/threading/sequenced_worker_pool.h"
14 #include "chrome/browser/ui/webui/print_preview/printer_capabilities.h" 14 #include "chrome/browser/ui/webui/print_preview/printer_capabilities.h"
15 #include "content/public/browser/browser_thread.h" 15 #include "content/public/browser/browser_thread.h"
16 #include "content/public/test/test_browser_thread_bundle.h" 16 #include "content/public/test/test_browser_thread_bundle.h"
17 #include "printing/backend/test_print_backend.h" 17 #include "printing/backend/test_print_backend.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 #include "ui/gfx/geometry/size.h" 19 #include "ui/gfx/geometry/size.h"
20 20
21 namespace { 21 namespace {
22 22
23 void SettingsReply(std::unique_ptr<base::DictionaryValue>* out, 23 void SettingsReply(std::unique_ptr<base::DictionaryValue>* out,
24 std::unique_ptr<base::DictionaryValue> reply) { 24 std::unique_ptr<base::DictionaryValue> reply) {
25 out->reset(reply.release()); 25 *out = std::move(reply);
26 } 26 }
27 27
28 std::unique_ptr<base::DictionaryValue> GetSettingsSynchronous( 28 std::unique_ptr<base::DictionaryValue> GetSettingsSynchronous(
29 const std::string& printer_name, 29 const std::string& printer_name,
30 const printing::PrinterBasicInfo& basic_info) { 30 const printing::PrinterBasicInfo& basic_info) {
31 std::unique_ptr<base::DictionaryValue> settings_dictionary; 31 std::unique_ptr<base::DictionaryValue> settings_dictionary;
32 32
33 base::SequencedWorkerPool* worker_pool = 33 base::SequencedWorkerPool* worker_pool =
34 content::BrowserThread::GetBlockingPool(); 34 content::BrowserThread::GetBlockingPool();
35 35
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 GetSettingsSynchronous(printer_name, basic_info); 117 GetSettingsSynchronous(printer_name, basic_info);
118 118
119 // verify settings were created 119 // verify settings were created
120 ASSERT_TRUE(settings_dictionary); 120 ASSERT_TRUE(settings_dictionary);
121 121
122 // verify that capabilities is an empty dictionary 122 // verify that capabilities is an empty dictionary
123 base::DictionaryValue* caps_dict; 123 base::DictionaryValue* caps_dict;
124 ASSERT_TRUE(settings_dictionary->GetDictionary("capabilities", &caps_dict)); 124 ASSERT_TRUE(settings_dictionary->GetDictionary("capabilities", &caps_dict));
125 EXPECT_TRUE(caps_dict->empty()); 125 EXPECT_TRUE(caps_dict->empty());
126 } 126 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698