| 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/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" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "content/browser/browser_thread_impl.h" | 13 #include "content/browser/browser_thread_impl.h" |
| 14 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 using base::ASCIIToUTF16; |
| 18 |
| 17 namespace content { | 19 namespace content { |
| 18 | 20 |
| 19 class MockPluginLoaderPosix : public PluginLoaderPosix { | 21 class MockPluginLoaderPosix : public PluginLoaderPosix { |
| 20 public: | 22 public: |
| 21 MOCK_METHOD0(LoadPluginsInternal, void(void)); | 23 MOCK_METHOD0(LoadPluginsInternal, void(void)); |
| 22 | 24 |
| 23 size_t number_of_pending_callbacks() { | 25 size_t number_of_pending_callbacks() { |
| 24 return callbacks_.size(); | 26 return callbacks_.size(); |
| 25 } | 27 } |
| 26 | 28 |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 plugin_loader()->OnProcessCrashed(42); | 366 plugin_loader()->OnProcessCrashed(42); |
| 365 plugin_loader()->OnProcessCrashed(42); | 367 plugin_loader()->OnProcessCrashed(42); |
| 366 | 368 |
| 367 message_loop()->RunUntilIdle(); | 369 message_loop()->RunUntilIdle(); |
| 368 EXPECT_EQ(1, did_callback); | 370 EXPECT_EQ(1, did_callback); |
| 369 | 371 |
| 370 EXPECT_EQ(0u, plugin_loader()->loaded_plugins().size()); | 372 EXPECT_EQ(0u, plugin_loader()->loaded_plugins().size()); |
| 371 } | 373 } |
| 372 | 374 |
| 373 } // namespace content | 375 } // namespace content |
| OLD | NEW |