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

Side by Side Diff: chrome/browser/android/offline_pages/offline_page_tab_helper_unittest.cc

Issue 1918083002: Convert //components/[f-n]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: … Created 4 years, 7 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 | « no previous file | chrome/browser/android/offline_pages/offline_page_utils_unittest.cc » ('j') | 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 "chrome/browser/android/offline_pages/offline_page_tab_helper.h" 5 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 int64_t offline_id_; 92 int64_t offline_id_;
93 93
94 DISALLOW_COPY_AND_ASSIGN(OfflinePageTabHelperTest); 94 DISALLOW_COPY_AND_ASSIGN(OfflinePageTabHelperTest);
95 }; 95 };
96 96
97 void OfflinePageTabHelperTest::SetUp() { 97 void OfflinePageTabHelperTest::SetUp() {
98 // Enables offline pages feature. 98 // Enables offline pages feature.
99 // TODO(jianli): Remove this once the feature is completely enabled. 99 // TODO(jianli): Remove this once the feature is completely enabled.
100 base::FeatureList::ClearInstanceForTesting(); 100 base::FeatureList::ClearInstanceForTesting();
101 scoped_ptr<base::FeatureList> feature_list(new base::FeatureList); 101 std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
102 feature_list->InitializeFromCommandLine( 102 feature_list->InitializeFromCommandLine(
103 offline_pages::kOfflineBookmarksFeature.name, ""); 103 offline_pages::kOfflineBookmarksFeature.name, "");
104 base::FeatureList::SetInstance(std::move(feature_list)); 104 base::FeatureList::SetInstance(std::move(feature_list));
105 105
106 // Creates a test web contents. 106 // Creates a test web contents.
107 content::RenderViewHostTestHarness::SetUp(); 107 content::RenderViewHostTestHarness::SetUp();
108 OfflinePageTabHelper::CreateForWebContents(web_contents()); 108 OfflinePageTabHelper::CreateForWebContents(web_contents());
109 offline_page_tab_helper_ = 109 offline_page_tab_helper_ =
110 OfflinePageTabHelper::FromWebContents(web_contents()); 110 OfflinePageTabHelper::FromWebContents(web_contents());
111 111
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 GURL online_url = page->url; 203 GURL online_url = page->url;
204 204
205 StartLoad(online_url); 205 StartLoad(online_url);
206 EXPECT_EQ(online_url, controller().GetPendingEntry()->GetURL()); 206 EXPECT_EQ(online_url, controller().GetPendingEntry()->GetURL());
207 207
208 FailLoad(online_url); 208 FailLoad(online_url);
209 EXPECT_EQ(offline_url, controller().GetPendingEntry()->GetURL()); 209 EXPECT_EQ(offline_url, controller().GetPendingEntry()->GetURL());
210 } 210 }
211 211
212 } // namespace offline_pages 212 } // namespace offline_pages
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/offline_page_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698