OLD | NEW |
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 { |
| 11 |
10 class RenderThreadImplUnittest : public testing::Test { | 12 class RenderThreadImplUnittest : public testing::Test { |
11 public: | 13 public: |
12 RenderThreadImplUnittest() | 14 RenderThreadImplUnittest() |
13 : kCustomizableHistogram_("Histogram1"), | 15 : kCustomizableHistogram_("Histogram1"), |
14 kNormalHistogram_("Histogram2") {} | 16 kNormalHistogram_("Histogram2") {} |
15 ~RenderThreadImplUnittest() {} | 17 ~RenderThreadImplUnittest() {} |
16 protected: | 18 protected: |
17 virtual void SetUp() OVERRIDE { | 19 virtual void SetUp() OVERRIDE { |
18 histogram_customizer_.custom_histograms_.clear(); | 20 histogram_customizer_.custom_histograms_.clear(); |
19 histogram_customizer_.custom_histograms_.insert(kCustomizableHistogram_); | 21 histogram_customizer_.custom_histograms_.insert(kCustomizableHistogram_); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 EXPECT_EQ(kCustomizableHistogram_, | 71 EXPECT_EQ(kCustomizableHistogram_, |
70 histogram_customizer_.ConvertToCustomHistogramName( | 72 histogram_customizer_.ConvertToCustomHistogramName( |
71 kCustomizableHistogram_)); | 73 kCustomizableHistogram_)); |
72 // After this point, there will never be a custom diagram again, even if the | 74 // After this point, there will never be a custom diagram again, even if the |
73 // view navigated back to the common host. | 75 // view navigated back to the common host. |
74 histogram_customizer_.RenderViewNavigatedToHost("mail.google.com", 2); | 76 histogram_customizer_.RenderViewNavigatedToHost("mail.google.com", 2); |
75 EXPECT_EQ(kCustomizableHistogram_, | 77 EXPECT_EQ(kCustomizableHistogram_, |
76 histogram_customizer_.ConvertToCustomHistogramName( | 78 histogram_customizer_.ConvertToCustomHistogramName( |
77 kCustomizableHistogram_)); | 79 kCustomizableHistogram_)); |
78 } | 80 } |
| 81 |
| 82 } // namespace content |
OLD | NEW |