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

Side by Side Diff: content/browser/plugin_loader_posix_unittest.cc

Issue 10068037: RefCounted types should not have public destructors, content/browser part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MSVC fixes Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/plugin_data_remover_impl.cc ('k') | content/browser/plugin_service_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/plugin_loader_posix.h" 5 #include "content/browser/plugin_loader_posix.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 PluginLoaderPosix::LoadPluginsInternal(); 46 PluginLoaderPosix::LoadPluginsInternal();
47 } 47 }
48 48
49 void TestOnPluginLoaded(uint32 index, const webkit::WebPluginInfo& plugin) { 49 void TestOnPluginLoaded(uint32 index, const webkit::WebPluginInfo& plugin) {
50 OnPluginLoaded(index, plugin); 50 OnPluginLoaded(index, plugin);
51 } 51 }
52 52
53 void TestOnPluginLoadFailed(uint32 index, const FilePath& path) { 53 void TestOnPluginLoadFailed(uint32 index, const FilePath& path) {
54 OnPluginLoadFailed(index, path); 54 OnPluginLoadFailed(index, path);
55 } 55 }
56
57 protected:
58 virtual ~MockPluginLoaderPosix() {}
56 }; 59 };
57 60
58 void VerifyCallback(int* run_count, const std::vector<webkit::WebPluginInfo>&) { 61 void VerifyCallback(int* run_count, const std::vector<webkit::WebPluginInfo>&) {
59 ++(*run_count); 62 ++(*run_count);
60 } 63 }
61 64
62 class PluginLoaderPosixTest : public testing::Test { 65 class PluginLoaderPosixTest : public testing::Test {
63 public: 66 public:
64 PluginLoaderPosixTest() 67 PluginLoaderPosixTest()
65 : plugin1_(ASCIIToUTF16("plugin1"), FilePath("/tmp/one.plugin"), 68 : plugin1_(ASCIIToUTF16("plugin1"), FilePath("/tmp/one.plugin"),
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 &MockPluginLoaderPosix::RealLoadPluginsInternal)); 369 &MockPluginLoaderPosix::RealLoadPluginsInternal));
367 plugin_loader()->OnProcessCrashed(42); 370 plugin_loader()->OnProcessCrashed(42);
368 plugin_loader()->OnProcessCrashed(42); 371 plugin_loader()->OnProcessCrashed(42);
369 plugin_loader()->OnProcessCrashed(42); 372 plugin_loader()->OnProcessCrashed(42);
370 373
371 message_loop()->RunAllPending(); 374 message_loop()->RunAllPending();
372 EXPECT_EQ(1, did_callback); 375 EXPECT_EQ(1, did_callback);
373 376
374 EXPECT_EQ(0u, plugin_loader()->loaded_plugins().size()); 377 EXPECT_EQ(0u, plugin_loader()->loaded_plugins().size());
375 } 378 }
OLDNEW
« no previous file with comments | « content/browser/plugin_data_remover_impl.cc ('k') | content/browser/plugin_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698