| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <gmock/gmock.h> | 5 #include <gmock/gmock.h> |
| 6 #include <gtest/gtest.h> | 6 #include <gtest/gtest.h> |
| 7 | 7 |
| 8 #include "chrome/renderer/plugin_uma.h" | 8 #include "chrome/renderer/plugins/plugin_uma.h" |
| 9 | 9 |
| 10 using ::testing::_; | 10 using ::testing::_; |
| 11 | 11 |
| 12 class MockPluginUMASender : public MissingPluginReporter::UMASender { | 12 class MockPluginUMASender : public MissingPluginReporter::UMASender { |
| 13 public: | 13 public: |
| 14 MOCK_METHOD1(SendPluginUMA, void(MissingPluginReporter::PluginType)); | 14 MOCK_METHOD1(SendPluginUMA, void(MissingPluginReporter::PluginType)); |
| 15 }; | 15 }; |
| 16 | 16 |
| 17 TEST(PluginUMATest, WindowsMediaPlayer) { | 17 TEST(PluginUMATest, WindowsMediaPlayer) { |
| 18 MockPluginUMASender* sender_mock = new MockPluginUMASender(); | 18 MockPluginUMASender* sender_mock = new MockPluginUMASender(); |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 GURL("http://file.aaa")); | 226 GURL("http://file.aaa")); |
| 227 | 227 |
| 228 EXPECT_CALL(*sender_mock, SendPluginUMA(MissingPluginReporter::QUICKTIME)) | 228 EXPECT_CALL(*sender_mock, SendPluginUMA(MissingPluginReporter::QUICKTIME)) |
| 229 .Times(1) | 229 .Times(1) |
| 230 .RetiresOnSaturation(); | 230 .RetiresOnSaturation(); |
| 231 MissingPluginReporter::GetInstance()->ReportPluginMissing( | 231 MissingPluginReporter::GetInstance()->ReportPluginMissing( |
| 232 "", | 232 "", |
| 233 GURL("http://file.MoV")); | 233 GURL("http://file.MoV")); |
| 234 } | 234 } |
| 235 | 235 |
| OLD | NEW |