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

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

Issue 678073006: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bogus formatting 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/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/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 ASCIIToUTF16("1.0"), base::string16()), 70 ASCIIToUTF16("1.0"), base::string16()),
71 plugin2_(ASCIIToUTF16("plugin2"), base::FilePath("/tmp/two.plugin"), 71 plugin2_(ASCIIToUTF16("plugin2"), base::FilePath("/tmp/two.plugin"),
72 ASCIIToUTF16("2.0"), base::string16()), 72 ASCIIToUTF16("2.0"), base::string16()),
73 plugin3_(ASCIIToUTF16("plugin3"), base::FilePath("/tmp/three.plugin"), 73 plugin3_(ASCIIToUTF16("plugin3"), base::FilePath("/tmp/three.plugin"),
74 ASCIIToUTF16("3.0"), base::string16()), 74 ASCIIToUTF16("3.0"), base::string16()),
75 file_thread_(BrowserThread::FILE, &message_loop_), 75 file_thread_(BrowserThread::FILE, &message_loop_),
76 io_thread_(BrowserThread::IO, &message_loop_), 76 io_thread_(BrowserThread::IO, &message_loop_),
77 plugin_loader_(new MockPluginLoaderPosix) { 77 plugin_loader_(new MockPluginLoaderPosix) {
78 } 78 }
79 79
80 virtual void SetUp() override { 80 void SetUp() override { PluginServiceImpl::GetInstance()->Init(); }
81 PluginServiceImpl::GetInstance()->Init();
82 }
83 81
84 base::MessageLoop* message_loop() { return &message_loop_; } 82 base::MessageLoop* message_loop() { return &message_loop_; }
85 MockPluginLoaderPosix* plugin_loader() { return plugin_loader_.get(); } 83 MockPluginLoaderPosix* plugin_loader() { return plugin_loader_.get(); }
86 84
87 void AddThreePlugins() { 85 void AddThreePlugins() {
88 plugin_loader_->canonical_list()->clear(); 86 plugin_loader_->canonical_list()->clear();
89 plugin_loader_->canonical_list()->push_back(plugin1_.path); 87 plugin_loader_->canonical_list()->push_back(plugin1_.path);
90 plugin_loader_->canonical_list()->push_back(plugin2_.path); 88 plugin_loader_->canonical_list()->push_back(plugin2_.path);
91 plugin_loader_->canonical_list()->push_back(plugin3_.path); 89 plugin_loader_->canonical_list()->push_back(plugin3_.path);
92 } 90 }
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 plugin_loader()->OnProcessCrashed(42); 388 plugin_loader()->OnProcessCrashed(42);
391 plugin_loader()->OnProcessCrashed(42); 389 plugin_loader()->OnProcessCrashed(42);
392 390
393 message_loop()->RunUntilIdle(); 391 message_loop()->RunUntilIdle();
394 EXPECT_EQ(1, did_callback); 392 EXPECT_EQ(1, did_callback);
395 393
396 EXPECT_EQ(0u, plugin_loader()->loaded_plugins().size()); 394 EXPECT_EQ(0u, plugin_loader()->loaded_plugins().size());
397 } 395 }
398 396
399 } // namespace content 397 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698