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

Side by Side Diff: chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_panel_unittest.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ui/views/apps/app_info_dialog/app_info_permissions_pane l.h" 5 #include "chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_pane l.h"
6 6
7 #include <memory>
7 #include <utility> 8 #include <utility>
8 9
9 #include "apps/saved_files_service.h" 10 #include "apps/saved_files_service.h"
10 #include "base/callback.h" 11 #include "base/callback.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "chrome/browser/extensions/extension_service.h" 13 #include "chrome/browser/extensions/extension_service.h"
14 #include "chrome/browser/extensions/test_extension_system.h" 14 #include "chrome/browser/extensions/test_extension_system.h"
15 #include "chrome/grit/generated_resources.h" 15 #include "chrome/grit/generated_resources.h"
16 #include "chrome/test/base/testing_profile.h" 16 #include "chrome/test/base/testing_profile.h"
17 #include "content/public/test/test_browser_thread_bundle.h" 17 #include "content/public/test/test_browser_thread_bundle.h"
18 #include "extensions/common/extension_builder.h" 18 #include "extensions/common/extension_builder.h"
19 #include "extensions/common/manifest.h" 19 #include "extensions/common/manifest.h"
20 #include "extensions/common/permissions/permission_message_test_util.h" 20 #include "extensions/common/permissions/permission_message_test_util.h"
21 #include "extensions/common/permissions/permission_set.h" 21 #include "extensions/common/permissions/permission_set.h"
(...skipping 10 matching lines...) Expand all
32 } // namespace 32 } // namespace
33 33
34 using base::FilePath; 34 using base::FilePath;
35 using testing::Contains; 35 using testing::Contains;
36 using testing::Eq; 36 using testing::Eq;
37 37
38 class AppInfoPermissionsPanelTest : public testing::Test { 38 class AppInfoPermissionsPanelTest : public testing::Test {
39 protected: 39 protected:
40 AppInfoPermissionsPanelTest() {} 40 AppInfoPermissionsPanelTest() {}
41 41
42 scoped_ptr<base::DictionaryValue> ValidAppManifest() { 42 std::unique_ptr<base::DictionaryValue> ValidAppManifest() {
43 return extensions::DictionaryBuilder() 43 return extensions::DictionaryBuilder()
44 .Set("name", "Test App Name") 44 .Set("name", "Test App Name")
45 .Set("version", "2.0") 45 .Set("version", "2.0")
46 .Set("manifest_version", 2) 46 .Set("manifest_version", 2)
47 .Set("app", extensions::DictionaryBuilder() 47 .Set("app", extensions::DictionaryBuilder()
48 .Set("background", 48 .Set("background",
49 extensions::DictionaryBuilder() 49 extensions::DictionaryBuilder()
50 .Set("scripts", extensions::ListBuilder() 50 .Set("scripts", extensions::ListBuilder()
51 .Append("background.js") 51 .Append("background.js")
52 .Build()) 52 .Build())
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 const std::vector<base::string16> retained_file_paths = 170 const std::vector<base::string16> retained_file_paths =
171 panel.GetRetainedFilePaths(); 171 panel.GetRetainedFilePaths();
172 ASSERT_EQ(3U, retained_file_paths.size()); 172 ASSERT_EQ(3U, retained_file_paths.size());
173 EXPECT_THAT(retained_file_paths, 173 EXPECT_THAT(retained_file_paths,
174 Contains(Eq(base::UTF8ToUTF16("file_1.ext")))); 174 Contains(Eq(base::UTF8ToUTF16("file_1.ext"))));
175 EXPECT_THAT(retained_file_paths, 175 EXPECT_THAT(retained_file_paths,
176 Contains(Eq(base::UTF8ToUTF16("file_2.ext")))); 176 Contains(Eq(base::UTF8ToUTF16("file_2.ext"))));
177 EXPECT_THAT(retained_file_paths, 177 EXPECT_THAT(retained_file_paths,
178 Contains(Eq(base::UTF8ToUTF16("file_3.ext")))); 178 Contains(Eq(base::UTF8ToUTF16("file_3.ext"))));
179 } 179 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698