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

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

Issue 1549113002: Switch to standard integer types in content/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 12 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
« no previous file with comments | « content/browser/plugin_loader_posix.cc ('k') | content/browser/plugin_process_host.h » ('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 <stddef.h>
8 #include <stdint.h>
9
7 #include "base/at_exit.h" 10 #include "base/at_exit.h"
8 #include "base/bind.h" 11 #include "base/bind.h"
9 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
10 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
11 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
12 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
13 #include "content/browser/browser_thread_impl.h" 16 #include "content/browser/browser_thread_impl.h"
14 #include "content/common/plugin_list.h" 17 #include "content/common/plugin_list.h"
15 #include "testing/gmock/include/gmock/gmock.h" 18 #include "testing/gmock/include/gmock/gmock.h"
16 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 30 matching lines...) Expand all
47 PluginLoaderPosix::LoadPluginsInternal(); 50 PluginLoaderPosix::LoadPluginsInternal();
48 } 51 }
49 52
50 bool LaunchUtilityProcess() override { 53 bool LaunchUtilityProcess() override {
51 // This method always does nothing and returns false. The actual 54 // This method always does nothing and returns false. The actual
52 // implementation of this method launches another process, which is not 55 // implementation of this method launches another process, which is not
53 // very unit_test friendly. 56 // very unit_test friendly.
54 return false; 57 return false;
55 } 58 }
56 59
57 void TestOnPluginLoaded(uint32 index, const WebPluginInfo& plugin) { 60 void TestOnPluginLoaded(uint32_t index, const WebPluginInfo& plugin) {
58 OnPluginLoaded(index, plugin); 61 OnPluginLoaded(index, plugin);
59 } 62 }
60 63
61 void TestOnPluginLoadFailed(uint32 index, const base::FilePath& path) { 64 void TestOnPluginLoadFailed(uint32_t index, const base::FilePath& path) {
62 OnPluginLoadFailed(index, path); 65 OnPluginLoadFailed(index, path);
63 } 66 }
64 67
65 protected: 68 protected:
66 virtual ~MockPluginLoaderPosix() {} 69 virtual ~MockPluginLoaderPosix() {}
67 }; 70 };
68 71
69 void VerifyCallback(int* run_count, const std::vector<WebPluginInfo>&) { 72 void VerifyCallback(int* run_count, const std::vector<WebPluginInfo>&) {
70 ++(*run_count); 73 ++(*run_count);
71 } 74 }
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 message_loop()->RunUntilIdle(); 417 message_loop()->RunUntilIdle();
415 EXPECT_EQ(1, did_callback); 418 EXPECT_EQ(1, did_callback);
416 EXPECT_EQ(0u, plugin_loader()->loaded_plugins().size()); 419 EXPECT_EQ(0u, plugin_loader()->loaded_plugins().size());
417 420
418 // TODO(erikchen): This is a genuine leak that should be fixed. 421 // TODO(erikchen): This is a genuine leak that should be fixed.
419 // https://code.google.com/p/chromium/issues/detail?id=431906 422 // https://code.google.com/p/chromium/issues/detail?id=431906
420 testing::Mock::AllowLeak(plugin_loader()); 423 testing::Mock::AllowLeak(plugin_loader());
421 } 424 }
422 425
423 } // namespace content 426 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/plugin_loader_posix.cc ('k') | content/browser/plugin_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698