Some more virtual/override updates.
(These are mostly fixes to things that derive from testing::Test, which
are missed for some reason.)
R=sky@chromium.org
Review URL: https://codereview.chromium.org/644963004
diff --git a/mojo/application_manager/application_manager_unittest.cc b/mojo/application_manager/application_manager_unittest.cc
index 27688c6..44f365b 100644
--- a/mojo/application_manager/application_manager_unittest.cc
+++ b/mojo/application_manager/application_manager_unittest.cc
@@ -408,9 +408,9 @@
public:
ApplicationManagerTest() : tester_context_(&loop_) {}
- virtual ~ApplicationManagerTest() {}
+ ~ApplicationManagerTest() override {}
- virtual void SetUp() override {
+ void SetUp() override {
application_manager_.reset(new ApplicationManager);
TestApplicationLoader* default_loader = new TestApplicationLoader;
default_loader->set_context(&context_);
@@ -423,7 +423,7 @@
test_client_.reset(new TestClientImpl(service_proxy.Pass()));
}
- virtual void TearDown() override {
+ void TearDown() override {
test_client_.reset(NULL);
application_manager_.reset(NULL);
}
diff --git a/mojo/common/handle_watcher_unittest.cc b/mojo/common/handle_watcher_unittest.cc
index 61913cd..3e879d2 100644
--- a/mojo/common/handle_watcher_unittest.cc
+++ b/mojo/common/handle_watcher_unittest.cc
@@ -121,7 +121,7 @@
class HandleWatcherTest : public testing::TestWithParam<MessageLoopConfig> {
public:
HandleWatcherTest() : message_loop_(CreateMessageLoop(GetParam())) {}
- virtual ~HandleWatcherTest() {
+ ~HandleWatcherTest() override {
test::SetTickClockForTest(NULL);
}
diff --git a/mojo/examples/apptest/example_apptest.cc b/mojo/examples/apptest/example_apptest.cc
index 2041fde..f5dccab 100644
--- a/mojo/examples/apptest/example_apptest.cc
+++ b/mojo/examples/apptest/example_apptest.cc
@@ -32,7 +32,7 @@
: args_(args.Pass()),
application_impl_(nullptr) {
}
- virtual ~Apptest() override {}
+ ~Apptest() override {}
protected:
ApplicationImpl* application_impl() { return application_impl_; }
@@ -41,7 +41,7 @@
virtual ApplicationDelegate* GetApplicationDelegate() = 0;
// testing::Test:
- virtual void SetUp() override {
+ void SetUp() override {
// New applications are constructed for each test to avoid persisting state.
MOJO_CHECK(g_shell_message_pipe_handle_hack.is_valid());
application_impl_ = new ApplicationImpl(
@@ -51,7 +51,7 @@
// Fake application initialization with the given command line arguments.
application_impl_->Initialize(args_.Clone());
}
- virtual void TearDown() override {
+ void TearDown() override {
g_shell_message_pipe_handle_hack =
application_impl_->UnbindShell().release();
delete application_impl_;
@@ -75,14 +75,14 @@
public:
// TODO(msw): Exemplify the use of actual command line arguments.
ExampleApptest() : Apptest(Array<String>()) {}
- virtual ~ExampleApptest() override {}
+ ~ExampleApptest() override {}
protected:
// Apptest:
- virtual ApplicationDelegate* GetApplicationDelegate() override {
+ ApplicationDelegate* GetApplicationDelegate() override {
return &example_client_application_;
}
- virtual void SetUp() override {
+ void SetUp() override {
Apptest::SetUp();
application_impl()->ConnectToService("mojo:example_service",
&example_service_);
@@ -117,8 +117,8 @@
template <typename T>
struct SetCallback : public Callback<void()>::Runnable {
SetCallback(T* val, T result) : val_(val), result_(result) {}
- virtual ~SetCallback() {}
- virtual void Run() const override { *val_ = result_; }
+ ~SetCallback() override {}
+ void Run() const override { *val_ = result_; }
T* val_;
T result_;
};
diff --git a/mojo/public/c/system/tests/core_perftest.cc b/mojo/public/c/system/tests/core_perftest.cc
index fa90c86..15500ff 100644
--- a/mojo/public/c/system/tests/core_perftest.cc
+++ b/mojo/public/c/system/tests/core_perftest.cc
@@ -112,7 +112,7 @@
class CorePerftest : public testing::Test {
public:
CorePerftest() : buffer_(NULL), num_bytes_(0) {}
- virtual ~CorePerftest() {}
+ ~CorePerftest() override {}
static void NoOp(void* /*closure*/) {}
diff --git a/mojo/public/cpp/bindings/tests/array_unittest.cc b/mojo/public/cpp/bindings/tests/array_unittest.cc
index 0b083c7..ed9a647 100644
--- a/mojo/public/cpp/bindings/tests/array_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/array_unittest.cc
@@ -23,7 +23,7 @@
class ArrayTest : public testing::Test {
public:
- virtual ~ArrayTest() {}
+ ~ArrayTest() override {}
private:
Environment env_;
diff --git a/mojo/public/cpp/bindings/tests/connector_unittest.cc b/mojo/public/cpp/bindings/tests/connector_unittest.cc
index 1e1c6ef..3e00a67 100644
--- a/mojo/public/cpp/bindings/tests/connector_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/connector_unittest.cc
@@ -75,11 +75,11 @@
public:
ConnectorTest() {}
- virtual void SetUp() override {
+ void SetUp() override {
CreateMessagePipe(nullptr, &handle0_, &handle1_);
}
- virtual void TearDown() override {}
+ void TearDown() override {}
void AllocMessage(const char* text, Message* message) {
size_t payload_size = strlen(text) + 1; // Plus null terminator.
diff --git a/mojo/public/cpp/bindings/tests/equals_unittest.cc b/mojo/public/cpp/bindings/tests/equals_unittest.cc
index 38c78cb..9196d86 100644
--- a/mojo/public/cpp/bindings/tests/equals_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/equals_unittest.cc
@@ -22,7 +22,7 @@
class EqualsTest : public testing::Test {
public:
- virtual ~EqualsTest() {}
+ ~EqualsTest() override {}
private:
Environment env_;
diff --git a/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc b/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc
index 53652cf..5667f64 100644
--- a/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc
@@ -166,7 +166,7 @@
class HandlePassingTest : public testing::Test {
public:
- virtual void TearDown() { PumpMessages(); }
+ void TearDown() override { PumpMessages(); }
void PumpMessages() { loop_.RunUntilIdle(); }
diff --git a/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc b/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
index 57ec78a..0cd5646 100644
--- a/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
@@ -152,7 +152,7 @@
class InterfacePtrTest : public testing::Test {
public:
- virtual ~InterfacePtrTest() { loop_.RunUntilIdle(); }
+ ~InterfacePtrTest() override { loop_.RunUntilIdle(); }
void PumpMessages() { loop_.RunUntilIdle(); }
diff --git a/mojo/public/cpp/bindings/tests/map_unittest.cc b/mojo/public/cpp/bindings/tests/map_unittest.cc
index 6f7db16..bb3c23d 100644
--- a/mojo/public/cpp/bindings/tests/map_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/map_unittest.cc
@@ -32,7 +32,7 @@
class MapTest : public testing::Test {
public:
- virtual ~MapTest() {}
+ ~MapTest() override {}
private:
Environment env_;
diff --git a/mojo/public/cpp/bindings/tests/request_response_unittest.cc b/mojo/public/cpp/bindings/tests/request_response_unittest.cc
index 56d7244..4864e35 100644
--- a/mojo/public/cpp/bindings/tests/request_response_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/request_response_unittest.cc
@@ -75,7 +75,7 @@
class RequestResponseTest : public testing::Test {
public:
- virtual ~RequestResponseTest() { loop_.RunUntilIdle(); }
+ ~RequestResponseTest() override { loop_.RunUntilIdle(); }
void PumpMessages() { loop_.RunUntilIdle(); }
diff --git a/mojo/public/cpp/bindings/tests/router_unittest.cc b/mojo/public/cpp/bindings/tests/router_unittest.cc
index e680112..c4efdb0 100644
--- a/mojo/public/cpp/bindings/tests/router_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/router_unittest.cc
@@ -103,11 +103,11 @@
public:
RouterTest() {}
- virtual void SetUp() override {
+ void SetUp() override {
CreateMessagePipe(nullptr, &handle0_, &handle1_);
}
- virtual void TearDown() override {}
+ void TearDown() override {}
void PumpMessages() { loop_.RunUntilIdle(); }
diff --git a/mojo/public/cpp/bindings/tests/sample_service_unittest.cc b/mojo/public/cpp/bindings/tests/sample_service_unittest.cc
index 0bed540..ff047cb 100644
--- a/mojo/public/cpp/bindings/tests/sample_service_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/sample_service_unittest.cc
@@ -312,7 +312,7 @@
class BindingsSampleTest : public testing::Test {
public:
BindingsSampleTest() {}
- virtual ~BindingsSampleTest() {}
+ ~BindingsSampleTest() override {}
private:
mojo::Environment env_;
diff --git a/mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc b/mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc
index fc0508c..4359be8 100644
--- a/mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc
@@ -40,7 +40,7 @@
class SerializationWarningTest : public testing::Test {
public:
- virtual ~SerializationWarningTest() {}
+ ~SerializationWarningTest() override {}
protected:
template <typename T>
diff --git a/mojo/public/cpp/bindings/tests/struct_unittest.cc b/mojo/public/cpp/bindings/tests/struct_unittest.cc
index c7e7599..8f7580d 100644
--- a/mojo/public/cpp/bindings/tests/struct_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/struct_unittest.cc
@@ -29,7 +29,7 @@
class StructTest : public testing::Test {
public:
- virtual ~StructTest() {}
+ ~StructTest() override {}
private:
Environment env_;
diff --git a/mojo/public/cpp/bindings/tests/validation_unittest.cc b/mojo/public/cpp/bindings/tests/validation_unittest.cc
index 8f3adb8..c7edf19 100644
--- a/mojo/public/cpp/bindings/tests/validation_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/validation_unittest.cc
@@ -187,7 +187,7 @@
class ValidationTest : public testing::Test {
public:
- virtual ~ValidationTest() {}
+ ~ValidationTest() override {}
private:
Environment env_;
@@ -197,9 +197,9 @@
public:
ValidationIntegrationTest() : test_message_receiver_(nullptr) {}
- virtual ~ValidationIntegrationTest() {}
+ ~ValidationIntegrationTest() override {}
- virtual void SetUp() override {
+ void SetUp() override {
ScopedMessagePipeHandle tester_endpoint;
ASSERT_EQ(MOJO_RESULT_OK,
CreateMessagePipe(nullptr, &tester_endpoint, &testee_endpoint_));
@@ -207,7 +207,7 @@
new TestMessageReceiver(this, tester_endpoint.Pass());
}
- virtual void TearDown() override {
+ void TearDown() override {
delete test_message_receiver_;
test_message_receiver_ = nullptr;
diff --git a/mojo/public/cpp/environment/tests/async_waiter_unittest.cc b/mojo/public/cpp/environment/tests/async_waiter_unittest.cc
index 52f1406..c1876b7 100644
--- a/mojo/public/cpp/environment/tests/async_waiter_unittest.cc
+++ b/mojo/public/cpp/environment/tests/async_waiter_unittest.cc
@@ -18,7 +18,7 @@
class TestAsyncWaitCallback {
public:
TestAsyncWaitCallback() : result_count_(0), last_result_(MOJO_RESULT_OK) {}
- virtual ~TestAsyncWaitCallback() {}
+ ~TestAsyncWaitCallback() {}
int result_count() const { return result_count_; }
diff --git a/mojo/public/cpp/environment/tests/logging_unittest.cc b/mojo/public/cpp/environment/tests/logging_unittest.cc
index 609def1..53a1f88 100644
--- a/mojo/public/cpp/environment/tests/logging_unittest.cc
+++ b/mojo/public/cpp/environment/tests/logging_unittest.cc
@@ -35,7 +35,7 @@
minimum_log_level_ = MOJO_LOG_LEVEL_INFO;
ResetMockLogger();
}
- virtual ~LoggingTest() {}
+ ~LoggingTest() override {}
protected:
// Note: Does not reset |minimum_log_level_|.
diff --git a/mojo/public/cpp/utility/tests/run_loop_unittest.cc b/mojo/public/cpp/utility/tests/run_loop_unittest.cc
index 870ff92..1e21a13 100644
--- a/mojo/public/cpp/utility/tests/run_loop_unittest.cc
+++ b/mojo/public/cpp/utility/tests/run_loop_unittest.cc
@@ -50,11 +50,11 @@
public:
RunLoopTest() {}
- virtual void SetUp() override {
+ void SetUp() override {
Test::SetUp();
RunLoop::SetUp();
}
- virtual void TearDown() override {
+ void TearDown() override {
RunLoop::TearDown();
Test::TearDown();
}
diff --git a/mojo/services/clipboard/clipboard_standalone_unittest.cc b/mojo/services/clipboard/clipboard_standalone_unittest.cc
index d0418a9..c23aad2 100644
--- a/mojo/services/clipboard/clipboard_standalone_unittest.cc
+++ b/mojo/services/clipboard/clipboard_standalone_unittest.cc
@@ -47,9 +47,9 @@
class ClipboardStandaloneTest : public testing::Test {
public:
ClipboardStandaloneTest() {}
- virtual ~ClipboardStandaloneTest() {}
+ ~ClipboardStandaloneTest() override {}
- virtual void SetUp() override {
+ void SetUp() override {
test_helper_.Init();
test_helper_.application_manager()->ConnectToService(GURL("mojo:clipboard"),
diff --git a/mojo/services/network/udp_socket_unittest.cc b/mojo/services/network/udp_socket_unittest.cc
index 42bf61a..dcf728c 100644
--- a/mojo/services/network/udp_socket_unittest.cc
+++ b/mojo/services/network/udp_socket_unittest.cc
@@ -80,7 +80,7 @@
protected:
struct StateBase : public CallbackType::Runnable {
StateBase() : test_callback_(nullptr) {}
- virtual ~StateBase() {}
+ ~StateBase() override {}
void set_test_callback(TestCallbackBase* test_callback) {
test_callback_ = test_callback;
@@ -205,9 +205,9 @@
class UDPSocketTest : public testing::Test {
public:
UDPSocketTest() {}
- virtual ~UDPSocketTest() {}
+ ~UDPSocketTest() override {}
- virtual void SetUp() override {
+ void SetUp() override {
test_helper_.Init();
test_helper_.application_manager()->ConnectToService(
diff --git a/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc b/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
index 3229b09..85fd766 100644
--- a/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
+++ b/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
@@ -299,7 +299,7 @@
private:
// Overridden from testing::Test:
- virtual void SetUp() override {
+ void SetUp() override {
ConnectApplicationLoader::LoadedCallback ready_callback = base::Bind(
&ViewManagerTest::OnViewManagerLoaded, base::Unretained(this));
test_helper_.Init();
diff --git a/mojo/services/view_manager/view_manager_unittest.cc b/mojo/services/view_manager/view_manager_unittest.cc
index 073ad4c..bf197c4 100644
--- a/mojo/services/view_manager/view_manager_unittest.cc
+++ b/mojo/services/view_manager/view_manager_unittest.cc
@@ -499,7 +499,7 @@
connection2_(NULL),
connection3_(NULL) {}
- virtual void SetUp() override {
+ void SetUp() override {
ASSERT_TRUE(ViewManagerProxy::IsInInitialState());
test_helper_.Init();
std::vector<std::string> native_viewport_args;
@@ -531,7 +531,7 @@
connection_->DoRunLoopUntilChangesCount(1);
}
- virtual void TearDown() override {
+ void TearDown() override {
if (connection3_)
connection3_->Destroy();
if (connection2_)
diff --git a/mojo/services/window_manager/window_manager_api_unittest.cc b/mojo/services/window_manager/window_manager_api_unittest.cc
index d5cad73..b280849 100644
--- a/mojo/services/window_manager/window_manager_api_unittest.cc
+++ b/mojo/services/window_manager/window_manager_api_unittest.cc
@@ -143,7 +143,7 @@
class WindowManagerApiTest : public testing::Test {
public:
WindowManagerApiTest() {}
- virtual ~WindowManagerApiTest() {}
+ ~WindowManagerApiTest() override {}
protected:
typedef std::pair<Id, Id> TwoIds;
@@ -194,7 +194,7 @@
private:
// Overridden from testing::Test:
- virtual void SetUp() override {
+ void SetUp() override {
test_helper_.Init();
test_helper_.SetLoaderForURL(
scoped_ptr<ApplicationLoader>(new TestApplicationLoader(base::Bind(
@@ -206,7 +206,7 @@
InitEmbed(view_manager_init_.get(), "mojo:core_window_manager"));
ConnectToWindowManager();
}
- virtual void TearDown() override {}
+ void TearDown() override {}
void ConnectToWindowManager() {
test_helper_.application_manager()->ConnectToService(
diff --git a/mojo/shell/child_process_host_unittest.cc b/mojo/shell/child_process_host_unittest.cc
index 2cd24db..123cbfb 100644
--- a/mojo/shell/child_process_host_unittest.cc
+++ b/mojo/shell/child_process_host_unittest.cc
@@ -21,7 +21,7 @@
class TestChildProcessHostDelegate : public ChildProcessHost::Delegate {
public:
TestChildProcessHostDelegate() {}
- virtual ~TestChildProcessHostDelegate() {}
+ ~TestChildProcessHostDelegate() {}
void WillStart() override {
VLOG(2) << "TestChildProcessHostDelegate::WillStart()";
}
diff --git a/mojo/shell/dynamic_application_loader_unittest.cc b/mojo/shell/dynamic_application_loader_unittest.cc
index 693cab1..7c04e4c 100644
--- a/mojo/shell/dynamic_application_loader_unittest.cc
+++ b/mojo/shell/dynamic_application_loader_unittest.cc
@@ -62,8 +62,8 @@
class DynamicApplicationLoaderTest : public testing::Test {
public:
DynamicApplicationLoaderTest() {}
- virtual ~DynamicApplicationLoaderTest() {}
- virtual void SetUp() override {
+ ~DynamicApplicationLoaderTest() override {}
+ void SetUp() override {
context_.Init();
scoped_ptr<DynamicServiceRunnerFactory> factory(
new TestDynamicServiceRunnerFactory(&state_));
diff --git a/mojo/shell/external_application_listener_unittest.cc b/mojo/shell/external_application_listener_unittest.cc
index 2fc5511..7c1465b 100644
--- a/mojo/shell/external_application_listener_unittest.cc
+++ b/mojo/shell/external_application_listener_unittest.cc
@@ -28,9 +28,9 @@
class ExternalApplicationListenerTest : public testing::Test {
public:
ExternalApplicationListenerTest() : io_thread_("io thread") {}
- virtual ~ExternalApplicationListenerTest() {}
+ ~ExternalApplicationListenerTest() override {}
- virtual void SetUp() override {
+ void SetUp() override {
base::Thread::Options options;
options.message_loop_type = base::MessageLoop::TYPE_IO;
io_thread_.StartWithOptions(options);
diff --git a/mojo/shell/incoming_connection_listener_unittest.cc b/mojo/shell/incoming_connection_listener_unittest.cc
index 61b0a5e..112782d 100644
--- a/mojo/shell/incoming_connection_listener_unittest.cc
+++ b/mojo/shell/incoming_connection_listener_unittest.cc
@@ -60,9 +60,9 @@
class IncomingConnectionListenerTest : public testing::Test {
public:
IncomingConnectionListenerTest() {}
- virtual ~IncomingConnectionListenerTest() {}
+ ~IncomingConnectionListenerTest() override {}
- virtual void SetUp() override {
+ void SetUp() override {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
socket_path_ = temp_dir_.path().Append(FILE_PATH_LITERAL("socket"));
}
diff --git a/mojo/shell/shell_test_base.h b/mojo/shell/shell_test_base.h
index ff5b3e7..fd70c2d 100644
--- a/mojo/shell/shell_test_base.h
+++ b/mojo/shell/shell_test_base.h
@@ -22,9 +22,9 @@
class ShellTestBase : public testing::Test {
public:
ShellTestBase();
- virtual ~ShellTestBase();
+ ~ShellTestBase() override;
- virtual void SetUp() override;
+ void SetUp() override;
// |application_url| should typically be a mojo: URL (the origin will be set
// to an "appropriate" file: URL).