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

Side by Side Diff: chrome/browser/extensions/extension_user_script_loader_unittest.cc

Issue 1871713002: Convert //chrome/browser/extensions 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 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 "extensions/browser/extension_user_script_loader.h" 5 #include "extensions/browser/extension_user_script_loader.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 77 }
78 78
79 // Directory containing user scripts. 79 // Directory containing user scripts.
80 base::ScopedTempDir temp_dir_; 80 base::ScopedTempDir temp_dir_;
81 81
82 content::NotificationRegistrar registrar_; 82 content::NotificationRegistrar registrar_;
83 83
84 // MessageLoop used in tests. 84 // MessageLoop used in tests.
85 base::MessageLoopForUI message_loop_; 85 base::MessageLoopForUI message_loop_;
86 86
87 scoped_ptr<content::TestBrowserThread> file_thread_; 87 std::unique_ptr<content::TestBrowserThread> file_thread_;
88 scoped_ptr<content::TestBrowserThread> ui_thread_; 88 std::unique_ptr<content::TestBrowserThread> ui_thread_;
89 89
90 // Updated to the script shared memory when we get notified. 90 // Updated to the script shared memory when we get notified.
91 base::SharedMemory* shared_memory_; 91 base::SharedMemory* shared_memory_;
92 }; 92 };
93 93
94 // Test that we get notified even when there are no scripts. 94 // Test that we get notified even when there are no scripts.
95 TEST_F(ExtensionUserScriptLoaderTest, NoScripts) { 95 TEST_F(ExtensionUserScriptLoaderTest, NoScripts) {
96 TestingProfile profile; 96 TestingProfile profile;
97 ExtensionUserScriptLoader loader( 97 ExtensionUserScriptLoader loader(
98 &profile, 98 &profile,
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 ExtensionUserScriptLoader loader( 271 ExtensionUserScriptLoader loader(
272 &profile, 272 &profile,
273 HostID(), 273 HostID(),
274 true /* listen_for_extension_system_loaded */); 274 true /* listen_for_extension_system_loaded */);
275 loader.LoadScriptsForTest(&user_scripts); 275 loader.LoadScriptsForTest(&user_scripts);
276 276
277 EXPECT_EQ(content, user_scripts[0].js_scripts()[0].GetContent().as_string()); 277 EXPECT_EQ(content, user_scripts[0].js_scripts()[0].GetContent().as_string());
278 } 278 }
279 279
280 } // namespace extensions 280 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698