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

Side by Side Diff: components/dom_distiller/content/browser/dom_distiller_viewer_source_unittest.cc

Issue 1879613003: Convert //components/dom_distiller 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 "components/dom_distiller/content/browser/dom_distiller_viewer_source.h " 5 #include "components/dom_distiller/content/browser/dom_distiller_viewer_source.h "
6 6
7 #include "components/dom_distiller/core/url_constants.h" 7 #include "components/dom_distiller/core/url_constants.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace dom_distiller { 10 namespace dom_distiller {
11 11
12 const char kTestScheme[] = "myscheme"; 12 const char kTestScheme[] = "myscheme";
13 13
14 class DomDistillerViewerSourceTest : public testing::Test { 14 class DomDistillerViewerSourceTest : public testing::Test {
15 public: 15 public:
16 void SetUp() override { 16 void SetUp() override {
17 source_.reset(new DomDistillerViewerSource(nullptr, kTestScheme, nullptr)); 17 source_.reset(new DomDistillerViewerSource(nullptr, kTestScheme, nullptr));
18 } 18 }
19 19
20 protected: 20 protected:
21 scoped_ptr<DomDistillerViewerSource> source_; 21 std::unique_ptr<DomDistillerViewerSource> source_;
22 }; 22 };
23 23
24 TEST_F(DomDistillerViewerSourceTest, TestMimeType) { 24 TEST_F(DomDistillerViewerSourceTest, TestMimeType) {
25 EXPECT_EQ("text/css", source_.get()->GetMimeType(kViewerCssPath)); 25 EXPECT_EQ("text/css", source_.get()->GetMimeType(kViewerCssPath));
26 EXPECT_EQ("text/html", source_.get()->GetMimeType("anythingelse")); 26 EXPECT_EQ("text/html", source_.get()->GetMimeType("anythingelse"));
27 27
28 } 28 }
29 29
30 } // namespace dom_distiller 30 } // namespace dom_distiller
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698