Make sure webrtc::VideoSource is released when WebRtcVideoTrackAdapter is destroyed.
[chromium-blink-merge.git] / components / dom_distiller / content / dom_distiller_viewer_source_unittest.cc
blob55e5b4b87a74ce81245b18326588c1b6dbd4d045
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
3 // found in the LICENSE file.
5 #include "components/dom_distiller/content/dom_distiller_viewer_source.h"
7 #include "components/dom_distiller/core/url_constants.h"
8 #include "testing/gtest/include/gtest/gtest.h"
10 namespace dom_distiller {
12 const char kTestScheme[] = "myscheme";
14 class DomDistillerViewerSourceTest : public testing::Test {
15 public:
16 virtual void SetUp() OVERRIDE {
17 source_.reset(new DomDistillerViewerSource(NULL, kTestScheme));
20 protected:
21 scoped_ptr<DomDistillerViewerSource> source_;
24 TEST_F(DomDistillerViewerSourceTest, TestMimeType) {
25 EXPECT_EQ("text/css", source_.get()->GetMimeType(kViewerCssPath));
26 EXPECT_EQ("text/html", source_.get()->GetMimeType("anythingelse"));
27 EXPECT_EQ("text/javascript", source_.get()->GetMimeType(kViewerJsPath));
31 } // namespace dom_distiller