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

Side by Side Diff: content/renderer/render_thread_impl_unittest.cc

Issue 686523002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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 "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace content { 10 namespace content {
11 11
12 class RenderThreadImplUnittest : public testing::Test { 12 class RenderThreadImplUnittest : public testing::Test {
13 public: 13 public:
14 RenderThreadImplUnittest() 14 RenderThreadImplUnittest()
15 : kCustomizableHistogram_("Histogram1"), 15 : kCustomizableHistogram_("Histogram1"),
16 kNormalHistogram_("Histogram2") {} 16 kNormalHistogram_("Histogram2") {}
17 virtual ~RenderThreadImplUnittest() {} 17 ~RenderThreadImplUnittest() override {}
18
18 protected: 19 protected:
19 virtual void SetUp() override { 20 void SetUp() override {
20 histogram_customizer_.custom_histograms_.clear(); 21 histogram_customizer_.custom_histograms_.clear();
21 histogram_customizer_.custom_histograms_.insert(kCustomizableHistogram_); 22 histogram_customizer_.custom_histograms_.insert(kCustomizableHistogram_);
22 } 23 }
23 RenderThreadImpl::HistogramCustomizer histogram_customizer_; 24 RenderThreadImpl::HistogramCustomizer histogram_customizer_;
24 const char* kCustomizableHistogram_; 25 const char* kCustomizableHistogram_;
25 const char* kNormalHistogram_; 26 const char* kNormalHistogram_;
26 }; 27 };
27 28
28 TEST_F(RenderThreadImplUnittest, CustomHistogramsWithNoNavigations) { 29 TEST_F(RenderThreadImplUnittest, CustomHistogramsWithNoNavigations) {
29 // First there is no page -> no custom histograms. 30 // First there is no page -> no custom histograms.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 kCustomizableHistogram_)); 74 kCustomizableHistogram_));
74 // After this point, there will never be a custom diagram again, even if the 75 // After this point, there will never be a custom diagram again, even if the
75 // view navigated back to the common host. 76 // view navigated back to the common host.
76 histogram_customizer_.RenderViewNavigatedToHost("mail.google.com", 2); 77 histogram_customizer_.RenderViewNavigatedToHost("mail.google.com", 2);
77 EXPECT_EQ(kCustomizableHistogram_, 78 EXPECT_EQ(kCustomizableHistogram_,
78 histogram_customizer_.ConvertToCustomHistogramName( 79 histogram_customizer_.ConvertToCustomHistogramName(
79 kCustomizableHistogram_)); 80 kCustomizableHistogram_));
80 } 81 }
81 82
82 } // namespace content 83 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl_browsertest.cc ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698