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

Side by Side Diff: chrome/browser/ui/webui/theme_source_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 (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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 void SendResponse(scoped_refptr<base::RefCountedMemory> data) { 49 void SendResponse(scoped_refptr<base::RefCountedMemory> data) {
50 result_data_size_ = data ? data->size() : 0; 50 result_data_size_ = data ? data->size() : 0;
51 } 51 }
52 52
53 content::URLDataSource::GotDataCallback callback_; 53 content::URLDataSource::GotDataCallback callback_;
54 54
55 base::MessageLoop loop_; 55 base::MessageLoop loop_;
56 content::TestBrowserThread ui_thread_; 56 content::TestBrowserThread ui_thread_;
57 57
58 scoped_ptr<TestingProfile> profile_; 58 std::unique_ptr<TestingProfile> profile_;
59 scoped_ptr<ThemeSource> theme_source_; 59 std::unique_ptr<ThemeSource> theme_source_;
60 }; 60 };
61 61
62 TEST_F(WebUISourcesTest, ThemeSourceMimeTypes) { 62 TEST_F(WebUISourcesTest, ThemeSourceMimeTypes) {
63 EXPECT_EQ(theme_source()->GetMimeType("css/new_tab_theme.css"), "text/css"); 63 EXPECT_EQ(theme_source()->GetMimeType("css/new_tab_theme.css"), "text/css");
64 EXPECT_EQ(theme_source()->GetMimeType("css/new_tab_theme.css?foo"), 64 EXPECT_EQ(theme_source()->GetMimeType("css/new_tab_theme.css?foo"),
65 "text/css"); 65 "text/css");
66 EXPECT_EQ(theme_source()->GetMimeType("WRONGURL"), "image/png"); 66 EXPECT_EQ(theme_source()->GetMimeType("WRONGURL"), "image/png");
67 } 67 }
68 68
69 TEST_F(WebUISourcesTest, ThemeSourceImages) { 69 TEST_F(WebUISourcesTest, ThemeSourceImages) {
(...skipping 21 matching lines...) Expand all
91 91
92 StartDataRequest("css/new_tab_theme.css?pie"); 92 StartDataRequest("css/new_tab_theme.css?pie");
93 EXPECT_NE(result_data_size_, empty_size); 93 EXPECT_NE(result_data_size_, empty_size);
94 94
95 #if !DCHECK_IS_ON() 95 #if !DCHECK_IS_ON()
96 // Check that we send NULL back when we can't find what we're looking for. 96 // Check that we send NULL back when we can't find what we're looking for.
97 StartDataRequest("css/WRONGURL"); 97 StartDataRequest("css/WRONGURL");
98 EXPECT_EQ(result_data_size_, empty_size); 98 EXPECT_EQ(result_data_size_, empty_size);
99 #endif 99 #endif
100 } 100 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/system_info_ui.cc ('k') | chrome/browser/ui/webui/translate_internals/translate_internals_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698