summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-01 14:30:51 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-01 14:30:51 +0000
commita918f877c38b7a0bc684a2963fba4a4341a243e8 (patch)
treeb58938b92989fa1a75e8e2b0b62c21944d4cd3bb
parentbe4d55fe8d843628223a7b40162007ab734d1402 (diff)
downloadchromium_src-a918f877c38b7a0bc684a2963fba4a4341a243e8.zip
chromium_src-a918f877c38b7a0bc684a2963fba4a4341a243e8.tar.gz
chromium_src-a918f877c38b7a0bc684a2963fba4a4341a243e8.tar.bz2
[GTTF] Add FRIEND_TEST_ALL_PREFIXES, a FRIEND_TEST replacement
that works with all test prefixes (DISABLED, FLAKY, FAILS). TEST=none BUG=44549 Review URL: http://codereview.chromium.org/2439001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48634 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--app/clipboard/clipboard.h5
-rw-r--r--base/base.gypi1
-rw-r--r--base/gtest_prod_util.h27
-rw-r--r--base/pickle.h8
-rw-r--r--base/version.h8
-rw-r--r--chrome/browser/back_forward_menu_model.h8
-rw-r--r--chrome/browser/browser.h4
-rw-r--r--chrome/browser/browser_init.h5
-rw-r--r--chrome/browser/child_process_security_policy.h4
-rw-r--r--chrome/browser/cocoa/rwhvm_editcommand_helper.h8
-rw-r--r--chrome/browser/configuration_policy_pref_store.h24
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.h4
-rw-r--r--chrome/browser/encoding_menu_controller.h6
-rw-r--r--chrome/browser/extensions/extensions_service.h5
-rw-r--r--chrome/browser/extensions/user_script_master.h14
-rw-r--r--chrome/browser/google_url_tracker.h4
-rw-r--r--chrome/browser/gtk/bookmark_bar_gtk.h9
-rw-r--r--chrome/browser/gtk/bookmark_editor_gtk.h22
-rw-r--r--chrome/browser/gtk/keyword_editor_view.h12
-rw-r--r--chrome/browser/gtk/options/cookies_view.h24
-rw-r--r--chrome/browser/gtk/options/languages_page_gtk.h14
-rw-r--r--chrome/browser/history/expire_history_backend.h11
-rw-r--r--chrome/browser/history/history_backend.h10
-rw-r--r--chrome/browser/history/in_memory_history_backend.h4
-rw-r--r--chrome/browser/history/starred_url_database.h4
-rw-r--r--chrome/browser/history/text_database_manager.h13
-rw-r--r--chrome/browser/importer/firefox2_importer.h6
-rw-r--r--chrome/browser/importer/firefox_profile_lock.h6
-rw-r--r--chrome/browser/importer/ie_importer.h4
-rw-r--r--chrome/browser/importer/safari_importer.h8
-rw-r--r--chrome/browser/importer/toolbar_importer.h4
-rw-r--r--chrome/browser/metrics/metrics_service.h9
-rw-r--r--chrome/browser/net/dns_master.h16
-rw-r--r--chrome/browser/net/passive_log_collector.h6
-rw-r--r--chrome/browser/printing/print_dialog_cloud.h6
-rw-r--r--chrome/browser/privacy_blacklist/blacklist.h6
-rw-r--r--chrome/browser/renderer_host/audio_renderer_host.h6
-rw-r--r--chrome/browser/renderer_host/render_widget_host.h10
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.h20
-rw-r--r--chrome/browser/renderer_host/test/test_render_view_host.h3
-rw-r--r--chrome/browser/renderer_host/web_cache_manager.h5
-rw-r--r--chrome/browser/safe_browsing/bloom_filter.h6
-rw-r--r--chrome/browser/safe_browsing/protocol_manager.h10
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database.h4
-rw-r--r--chrome/browser/search_engines/template_url.h16
-rw-r--r--chrome/browser/search_engines/template_url_model.h14
-rw-r--r--chrome/browser/tab_contents/tab_contents.h7
-rw-r--r--chrome/browser/task_manager.h10
-rw-r--r--chrome/browser/thumbnail_store.h10
-rw-r--r--chrome/browser/views/generic_info_view.h4
-rw-r--r--chrome/browser/visitedlink_master.h8
-rw-r--r--chrome/browser/webdata/web_database.h19
52 files changed, 262 insertions, 219 deletions
diff --git a/app/clipboard/clipboard.h b/app/clipboard/clipboard.h
index ee536f6..b149d8d 100644
--- a/app/clipboard/clipboard.h
+++ b/app/clipboard/clipboard.h
@@ -9,10 +9,10 @@
#include <string>
#include <vector>
+#include "base/gtest_prod_util.h"
#include "base/process.h"
#include "base/shared_memory.h"
#include "base/string16.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
namespace gfx {
class Size;
@@ -182,7 +182,8 @@ class Clipboard {
#endif
private:
- FRIEND_TEST(ClipboardTest, SharedBitmapTest);
+ FRIEND_TEST_ALL_PREFIXES(ClipboardTest, SharedBitmapTest);
+
void DispatchObject(ObjectType type, const ObjectMapParams& params);
void WriteText(const char* text_data, size_t text_len);
diff --git a/base/base.gypi b/base/base.gypi
index 7e38447..ad41e45 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -91,6 +91,7 @@
'foundation_utils_mac.h',
'global_descriptors_posix.cc',
'global_descriptors_posix.h',
+ 'gtest_prod_util.h',
'hash_tables.h',
'histogram.cc',
'histogram.h',
diff --git a/base/gtest_prod_util.h b/base/gtest_prod_util.h
new file mode 100644
index 0000000..0e8e61a
--- /dev/null
+++ b/base/gtest_prod_util.h
@@ -0,0 +1,27 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_GTEST_PROD_UTIL_H_
+#define BASE_GTEST_PROD_UTIL_H_
+
+#include "testing/gtest/include/gtest/gtest_prod.h"
+
+// This is a wrapper for gtest's FRIEND_TEST macro that friends
+// test with all possible prefixes. This is very helpful when changing the test
+// prefix, because the friend declarations don't need to be updated.
+//
+// Example usage:
+//
+// class MyClass {
+// private:
+// void MyMethod();
+// FRIEND_TEST_ALL_PREFIXES(MyClassTest, MyMethod);
+// };
+#define FRIEND_TEST_ALL_PREFIXES(test_case_name, test_name) \
+ FRIEND_TEST(test_case_name, test_name); \
+ FRIEND_TEST(test_case_name, DISABLED_##test_name); \
+ FRIEND_TEST(test_case_name, FLAKY_##test_name); \
+ FRIEND_TEST(test_case_name, FAILS_##test_name)
+
+#endif // BASE_GTEST_PROD_UTIL_H_
diff --git a/base/pickle.h b/base/pickle.h
index 3ba60fd..fdfdb2b 100644
--- a/base/pickle.h
+++ b/base/pickle.h
@@ -8,9 +8,9 @@
#include <string>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/logging.h"
#include "base/string16.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
// This class provides facilities for basic binary value packing and unpacking.
//
@@ -231,9 +231,9 @@ class Pickle {
size_t capacity_;
size_t variable_buffer_offset_; // IF non-zero, then offset to a buffer.
- FRIEND_TEST(PickleTest, Resize);
- FRIEND_TEST(PickleTest, FindNext);
- FRIEND_TEST(PickleTest, IteratorHasRoom);
+ FRIEND_TEST_ALL_PREFIXES(PickleTest, Resize);
+ FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNext);
+ FRIEND_TEST_ALL_PREFIXES(PickleTest, IteratorHasRoom);
};
#endif // BASE_PICKLE_H__
diff --git a/base/version.h b/base/version.h
index 6b0680a..776ebe6 100644
--- a/base/version.h
+++ b/base/version.h
@@ -9,7 +9,7 @@
#include <vector>
#include "base/basictypes.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
+#include "base/gtest_prod_util.h"
class Version {
public:
@@ -42,9 +42,9 @@ class Version {
bool is_valid_;
std::vector<uint16> components_;
- FRIEND_TEST(VersionTest, DefaultConstructor);
- FRIEND_TEST(VersionTest, GetVersionFromString);
- FRIEND_TEST(VersionTest, Compare);
+ FRIEND_TEST_ALL_PREFIXES(VersionTest, DefaultConstructor);
+ FRIEND_TEST_ALL_PREFIXES(VersionTest, GetVersionFromString);
+ FRIEND_TEST_ALL_PREFIXES(VersionTest, Compare);
};
#endif // BASE_VERSION_H_
diff --git a/chrome/browser/back_forward_menu_model.h b/chrome/browser/back_forward_menu_model.h
index adcbff0..802c6a6 100644
--- a/chrome/browser/back_forward_menu_model.h
+++ b/chrome/browser/back_forward_menu_model.h
@@ -9,8 +9,8 @@
#include "app/menus/menu_model.h"
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/string16.h"
-#include "testing/gtest/include/gtest/gtest_prod.h" // For FRIEND_TEST
#include "webkit/glue/window_open_disposition.h"
class Browser;
@@ -163,9 +163,9 @@ class BackForwardMenuModel : public menus::MenuModel {
ModelType model_type_;
friend class BackFwdMenuModelTest;
- FRIEND_TEST(BackFwdMenuModelTest, BasicCase);
- FRIEND_TEST(BackFwdMenuModelTest, MaxItemsTest);
- FRIEND_TEST(BackFwdMenuModelTest, ChapterStops);
+ FRIEND_TEST_ALL_PREFIXES(BackFwdMenuModelTest, BasicCase);
+ FRIEND_TEST_ALL_PREFIXES(BackFwdMenuModelTest, MaxItemsTest);
+ FRIEND_TEST_ALL_PREFIXES(BackFwdMenuModelTest, ChapterStops);
DISALLOW_COPY_AND_ASSIGN(BackForwardMenuModel);
};
diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h
index 68fcfe1..29d81ea 100644
--- a/chrome/browser/browser.h
+++ b/chrome/browser/browser.h
@@ -10,6 +10,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/scoped_ptr.h"
#include "base/task.h"
#include "chrome/browser/command_updater.h"
@@ -25,7 +26,6 @@
#include "chrome/common/notification_registrar.h"
#include "chrome/common/page_zoom.h"
#include "gfx/rect.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class BrowserWindow;
class DebuggerWindow;
@@ -612,7 +612,7 @@ class Browser : public TabStripModelDelegate,
virtual void TabRestoreServiceDestroyed(TabRestoreService* service);
private:
- FRIEND_TEST(BrowserTest, NoTabsInPopups);
+ FRIEND_TEST_ALL_PREFIXES(BrowserTest, NoTabsInPopups);
// Used to describe why a tab is being detached. This is used by
// TabDetachedAtImpl.
diff --git a/chrome/browser/browser_init.h b/chrome/browser/browser_init.h
index 891c90b..a38326c 100644
--- a/chrome/browser/browser_init.h
+++ b/chrome/browser/browser_init.h
@@ -9,8 +9,8 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "googleurl/src/gurl.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class Browser;
class CommandLine;
@@ -129,8 +129,7 @@ class BrowserInit {
const std::vector<Tab>& tabs);
private:
- FRIEND_TEST(BrowserTest, RestorePinnedTabs);
- FRIEND_TEST(BrowserTest, DISABLED_RestorePinnedTabs);
+ FRIEND_TEST_ALL_PREFIXES(BrowserTest, RestorePinnedTabs);
// If the process was launched with the web application command line flags,
// e.g. --app=http://www.google.com/ or --app_id=... return true.
diff --git a/chrome/browser/child_process_security_policy.h b/chrome/browser/child_process_security_policy.h
index f81a259..c6d162f 100644
--- a/chrome/browser/child_process_security_policy.h
+++ b/chrome/browser/child_process_security_policy.h
@@ -10,9 +10,9 @@
#include <set>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/lock.h"
#include "base/singleton.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class FilePath;
class GURL;
@@ -115,7 +115,7 @@ class ChildProcessSecurityPolicy {
private:
friend class ChildProcessSecurityPolicyInProcessBrowserTest;
- FRIEND_TEST(ChildProcessSecurityPolicyInProcessBrowserTest, NoLeak);
+ FRIEND_TEST_ALL_PREFIXES(ChildProcessSecurityPolicyInProcessBrowserTest, NoLeak);
class SecurityState;
diff --git a/chrome/browser/cocoa/rwhvm_editcommand_helper.h b/chrome/browser/cocoa/rwhvm_editcommand_helper.h
index 458b58c..cd38cd873 100644
--- a/chrome/browser/cocoa/rwhvm_editcommand_helper.h
+++ b/chrome/browser/cocoa/rwhvm_editcommand_helper.h
@@ -8,9 +8,9 @@
#import <Cocoa/Cocoa.h>
#include "base/hash_tables.h"
+#include "base/gtest_prod_util.h"
#include "base/logging.h"
#include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
// RenderWidgetHostViewMacEditCommandHelper is the real name of this class
// but that's too long, so we use a shorter version.
@@ -30,8 +30,10 @@
// fact a distinct object) When these selectors are called, the relevant
// edit command is executed in WebCore.
class RWHVMEditCommandHelper {
- FRIEND_TEST(RWHVMEditCommandHelperTest, TestAddEditingSelectorsToClass);
- FRIEND_TEST(RWHVMEditCommandHelperTest, TestEditingCommandDelivery);
+ FRIEND_TEST_ALL_PREFIXES(RWHVMEditCommandHelperTest,
+ TestAddEditingSelectorsToClass);
+ FRIEND_TEST_ALL_PREFIXES(RWHVMEditCommandHelperTest,
+ TestEditingCommandDelivery);
public:
RWHVMEditCommandHelper();
diff --git a/chrome/browser/configuration_policy_pref_store.h b/chrome/browser/configuration_policy_pref_store.h
index b01b429..ae7d8fa 100644
--- a/chrome/browser/configuration_policy_pref_store.h
+++ b/chrome/browser/configuration_policy_pref_store.h
@@ -8,11 +8,11 @@
#include <string>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/scoped_ptr.h"
#include "base/values.h"
#include "chrome/browser/configuration_policy_store.h"
#include "chrome/common/pref_store.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class ConfigurationPolicyProvider;
@@ -30,16 +30,18 @@ class ConfigurationPolicyPrefStore : public PrefStore,
private:
// For unit tests.
- FRIEND_TEST(ConfigurationPolicyPrefStoreTest, TestSettingHomePageDefault);
- FRIEND_TEST(ConfigurationPolicyPrefStoreTest, TestSettingHomePageOverride);
- FRIEND_TEST(ConfigurationPolicyPrefStoreTest,
- TestSettingHomepageIsNewTabPageDefault);
- FRIEND_TEST(ConfigurationPolicyPrefStoreTest,
- TestSettingHomepageIsNewTabPage);
- FRIEND_TEST(ConfigurationPolicyPrefStoreTest,
- TestSettingCookiesEnabledDefault);
- FRIEND_TEST(ConfigurationPolicyPrefStoreTest,
- TestSettingCookiesEnabledOverride);
+ FRIEND_TEST_ALL_PREFIXES(ConfigurationPolicyPrefStoreTest,
+ TestSettingHomePageDefault);
+ FRIEND_TEST_ALL_PREFIXES(ConfigurationPolicyPrefStoreTest,
+ TestSettingHomePageOverride);
+ FRIEND_TEST_ALL_PREFIXES(ConfigurationPolicyPrefStoreTest,
+ TestSettingHomepageIsNewTabPageDefault);
+ FRIEND_TEST_ALL_PREFIXES(ConfigurationPolicyPrefStoreTest,
+ TestSettingHomepageIsNewTabPage);
+ FRIEND_TEST_ALL_PREFIXES(ConfigurationPolicyPrefStoreTest,
+ TestSettingCookiesEnabledDefault);
+ FRIEND_TEST_ALL_PREFIXES(ConfigurationPolicyPrefStoreTest,
+ TestSettingCookiesEnabledOverride);
// Policies that map to a single preference are handled
// by an automated converter. Each one of these policies
diff --git a/chrome/browser/dom_ui/new_tab_ui.h b/chrome/browser/dom_ui/new_tab_ui.h
index d74abe2..e8a7b4f 100644
--- a/chrome/browser/dom_ui/new_tab_ui.h
+++ b/chrome/browser/dom_ui/new_tab_ui.h
@@ -7,10 +7,10 @@
#include <string>
+#include "base/gtest_prod_util.h"
#include "chrome/browser/dom_ui/dom_ui.h"
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
#include "chrome/common/notification_registrar.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class GURL;
class MessageLoop;
@@ -80,7 +80,7 @@ class NewTabUI : public DOMUI,
};
private:
- FRIEND_TEST(NewTabUITest, UpdateUserPrefsVersion);
+ FRIEND_TEST_ALL_PREFIXES(NewTabUITest, UpdateUserPrefsVersion);
void Observe(NotificationType type,
const NotificationSource& source,
diff --git a/chrome/browser/encoding_menu_controller.h b/chrome/browser/encoding_menu_controller.h
index d362f68..44f5877 100644
--- a/chrome/browser/encoding_menu_controller.h
+++ b/chrome/browser/encoding_menu_controller.h
@@ -10,8 +10,8 @@
#include <vector>
#include "base/basictypes.h" // For DISALLOW_COPY_AND_ASSIGN
+#include "base/gtest_prod_util.h"
#include "base/string16.h"
-#include "testing/gtest/include/gtest/gtest_prod.h" // For FRIEND_TEST
class Browser;
class Profile;
@@ -19,8 +19,8 @@ class Profile;
// Cross-platform logic needed for the encoding menu.
// For now, we don't need to track state so all methods are static.
class EncodingMenuController {
- FRIEND_TEST(EncodingMenuControllerTest, EncodingIDsBelongTest);
- FRIEND_TEST(EncodingMenuControllerTest, IsItemChecked);
+ FRIEND_TEST_ALL_PREFIXES(EncodingMenuControllerTest, EncodingIDsBelongTest);
+ FRIEND_TEST_ALL_PREFIXES(EncodingMenuControllerTest, IsItemChecked);
public:
typedef std::pair<int, string16> EncodingMenuItem;
diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h
index 89f167d..c8e3842 100644
--- a/chrome/browser/extensions/extensions_service.h
+++ b/chrome/browser/extensions/extensions_service.h
@@ -12,6 +12,7 @@
#include "base/command_line.h"
#include "base/file_path.h"
+#include "base/gtest_prod_util.h"
#include "base/linked_ptr.h"
#include "base/ref_counted.h"
#include "base/task.h"
@@ -29,7 +30,6 @@
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/common/extensions/extension.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class Browser;
class ExtensionsServiceBackend;
@@ -417,7 +417,8 @@ class ExtensionsService
typedef std::vector<ComponentExtensionInfo> RegisteredComponentExtensions;
RegisteredComponentExtensions component_extension_manifests_;
- FRIEND_TEST(ExtensionsServiceTest, UpdatePendingExtensionAlreadyInstalled);
+ FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest,
+ UpdatePendingExtensionAlreadyInstalled);
DISALLOW_COPY_AND_ASSIGN(ExtensionsService);
};
diff --git a/chrome/browser/extensions/user_script_master.h b/chrome/browser/extensions/user_script_master.h
index cc0b437..964fc73 100644
--- a/chrome/browser/extensions/user_script_master.h
+++ b/chrome/browser/extensions/user_script_master.h
@@ -6,12 +6,12 @@
#define CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_MASTER_H_
#include "base/file_path.h"
+#include "base/gtest_prod_util.h"
#include "base/scoped_ptr.h"
#include "base/shared_memory.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/common/extensions/user_script.h"
#include "chrome/common/notification_registrar.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
namespace base {
class StringPiece;
@@ -53,12 +53,12 @@ class UserScriptMaster : public base::RefCountedThreadSafe<UserScriptMaster>,
virtual ~UserScriptMaster();
private:
- FRIEND_TEST(UserScriptMasterTest, Parse1);
- FRIEND_TEST(UserScriptMasterTest, Parse2);
- FRIEND_TEST(UserScriptMasterTest, Parse3);
- FRIEND_TEST(UserScriptMasterTest, Parse4);
- FRIEND_TEST(UserScriptMasterTest, Parse5);
- FRIEND_TEST(UserScriptMasterTest, Parse6);
+ FRIEND_TEST_ALL_PREFIXES(UserScriptMasterTest, Parse1);
+ FRIEND_TEST_ALL_PREFIXES(UserScriptMasterTest, Parse2);
+ FRIEND_TEST_ALL_PREFIXES(UserScriptMasterTest, Parse3);
+ FRIEND_TEST_ALL_PREFIXES(UserScriptMasterTest, Parse4);
+ FRIEND_TEST_ALL_PREFIXES(UserScriptMasterTest, Parse5);
+ FRIEND_TEST_ALL_PREFIXES(UserScriptMasterTest, Parse6);
public:
// We reload user scripts on the file thread to prevent blocking the UI.
diff --git a/chrome/browser/google_url_tracker.h b/chrome/browser/google_url_tracker.h
index 896fc10..6cd8b2f 100644
--- a/chrome/browser/google_url_tracker.h
+++ b/chrome/browser/google_url_tracker.h
@@ -7,10 +7,10 @@
#include <string>
+#include "base/gtest_prod_util.h"
#include "chrome/common/net/url_fetcher.h"
#include "chrome/common/notification_registrar.h"
#include "googleurl/src/gurl.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class PrefService;
@@ -59,7 +59,7 @@ class GoogleURLTracker : public URLFetcher::Delegate,
static const char kDefaultGoogleHomepage[];
private:
- FRIEND_TEST(GoogleURLTrackerTest, CheckAndConvertURL);
+ FRIEND_TEST_ALL_PREFIXES(GoogleURLTrackerTest, CheckAndConvertURL);
// Determines if |url| is an appropriate source for a new Google base URL, and
// update |base_url| to the appropriate base URL if so. Returns whether the
diff --git a/chrome/browser/gtk/bookmark_bar_gtk.h b/chrome/browser/gtk/bookmark_bar_gtk.h
index c6e7ae0..b00d61a 100644
--- a/chrome/browser/gtk/bookmark_bar_gtk.h
+++ b/chrome/browser/gtk/bookmark_bar_gtk.h
@@ -12,6 +12,7 @@
#include "app/gtk_signal.h"
#include "app/slide_animation.h"
+#include "base/gtest_prod_util.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/bookmarks/bookmark_context_menu_controller.h"
#include "chrome/browser/bookmarks/bookmark_model_observer.h"
@@ -24,7 +25,6 @@
#include "chrome/common/owned_widget_gtk.h"
#include "gfx/point.h"
#include "gfx/size.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class BookmarkMenuController;
class Browser;
@@ -43,9 +43,10 @@ class BookmarkBarGtk : public AnimationDelegate,
public NotificationObserver,
public BookmarkBarInstructionsGtk::Delegate,
public BookmarkContextMenuControllerDelegate {
- FRIEND_TEST(BookmarkBarGtkUnittest, DisplaysHelpMessageOnEmpty);
- FRIEND_TEST(BookmarkBarGtkUnittest, HidesHelpMessageWithBookmark);
- FRIEND_TEST(BookmarkBarGtkUnittest, BuildsButtons);
+ FRIEND_TEST_ALL_PREFIXES(BookmarkBarGtkUnittest, DisplaysHelpMessageOnEmpty);
+ FRIEND_TEST_ALL_PREFIXES(BookmarkBarGtkUnittest,
+ HidesHelpMessageWithBookmark);
+ FRIEND_TEST_ALL_PREFIXES(BookmarkBarGtkUnittest, BuildsButtons);
public:
explicit BookmarkBarGtk(BrowserWindowGtk* window,
Profile* profile, Browser* browser,
diff --git a/chrome/browser/gtk/bookmark_editor_gtk.h b/chrome/browser/gtk/bookmark_editor_gtk.h
index 904e193..f835b0e 100644
--- a/chrome/browser/gtk/bookmark_editor_gtk.h
+++ b/chrome/browser/gtk/bookmark_editor_gtk.h
@@ -10,25 +10,25 @@
#include <string>
#include "app/gtk_signal.h"
+#include "base/gtest_prod_util.h"
#include "chrome/browser/bookmarks/bookmark_editor.h"
#include "chrome/browser/bookmarks/bookmark_model_observer.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class GURL;
// GTK version of the bookmark editor dialog.
class BookmarkEditorGtk : public BookmarkEditor,
public BookmarkModelObserver {
- FRIEND_TEST(BookmarkEditorGtkTest, ChangeParent);
- FRIEND_TEST(BookmarkEditorGtkTest, ChangeParentAndURL);
- FRIEND_TEST(BookmarkEditorGtkTest, ChangeURLToExistingURL);
- FRIEND_TEST(BookmarkEditorGtkTest, EditTitleKeepsPosition);
- FRIEND_TEST(BookmarkEditorGtkTest, EditURLKeepsPosition);
- FRIEND_TEST(BookmarkEditorGtkTest, ModelsMatch);
- FRIEND_TEST(BookmarkEditorGtkTest, MoveToNewParent);
- FRIEND_TEST(BookmarkEditorGtkTest, NewURL);
- FRIEND_TEST(BookmarkEditorGtkTest, ChangeURLNoTree);
- FRIEND_TEST(BookmarkEditorGtkTest, ChangeTitleNoTree);
+ FRIEND_TEST_ALL_PREFIXES(BookmarkEditorGtkTest, ChangeParent);
+ FRIEND_TEST_ALL_PREFIXES(BookmarkEditorGtkTest, ChangeParentAndURL);
+ FRIEND_TEST_ALL_PREFIXES(BookmarkEditorGtkTest, ChangeURLToExistingURL);
+ FRIEND_TEST_ALL_PREFIXES(BookmarkEditorGtkTest, EditTitleKeepsPosition);
+ FRIEND_TEST_ALL_PREFIXES(BookmarkEditorGtkTest, EditURLKeepsPosition);
+ FRIEND_TEST_ALL_PREFIXES(BookmarkEditorGtkTest, ModelsMatch);
+ FRIEND_TEST_ALL_PREFIXES(BookmarkEditorGtkTest, MoveToNewParent);
+ FRIEND_TEST_ALL_PREFIXES(BookmarkEditorGtkTest, NewURL);
+ FRIEND_TEST_ALL_PREFIXES(BookmarkEditorGtkTest, ChangeURLNoTree);
+ FRIEND_TEST_ALL_PREFIXES(BookmarkEditorGtkTest, ChangeTitleNoTree);
public:
BookmarkEditorGtk(GtkWindow* window,
Profile* profile,
diff --git a/chrome/browser/gtk/keyword_editor_view.h b/chrome/browser/gtk/keyword_editor_view.h
index 8651fa80..7ba6e6c 100644
--- a/chrome/browser/gtk/keyword_editor_view.h
+++ b/chrome/browser/gtk/keyword_editor_view.h
@@ -9,9 +9,9 @@
#include "app/table_model_observer.h"
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "chrome/browser/search_engines/edit_search_engine_controller.h"
#include "chrome/browser/search_engines/template_url_model.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class AccessibleWidgetHelper;
class KeywordEditorController;
@@ -152,11 +152,11 @@ class KeywordEditorView : public TableModelObserver,
scoped_ptr<AccessibleWidgetHelper> accessible_widget_helper_;
friend class KeywordEditorViewTest;
- FRIEND_TEST(KeywordEditorViewTest, Empty);
- FRIEND_TEST(KeywordEditorViewTest, Add);
- FRIEND_TEST(KeywordEditorViewTest, MakeDefault);
- FRIEND_TEST(KeywordEditorViewTest, Remove);
- FRIEND_TEST(KeywordEditorViewTest, Edit);
+ FRIEND_TEST_ALL_PREFIXES(KeywordEditorViewTest, Empty);
+ FRIEND_TEST_ALL_PREFIXES(KeywordEditorViewTest, Add);
+ FRIEND_TEST_ALL_PREFIXES(KeywordEditorViewTest, MakeDefault);
+ FRIEND_TEST_ALL_PREFIXES(KeywordEditorViewTest, Remove);
+ FRIEND_TEST_ALL_PREFIXES(KeywordEditorViewTest, Edit);
DISALLOW_COPY_AND_ASSIGN(KeywordEditorView);
};
diff --git a/chrome/browser/gtk/options/cookies_view.h b/chrome/browser/gtk/options/cookies_view.h
index 3249306..8843ac4 100644
--- a/chrome/browser/gtk/options/cookies_view.h
+++ b/chrome/browser/gtk/options/cookies_view.h
@@ -11,6 +11,7 @@
#include "app/gtk_signal.h"
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/scoped_ptr.h"
#include "base/task.h"
#include "chrome/browser/browsing_data_appcache_helper.h"
@@ -19,7 +20,6 @@
#include "chrome/browser/gtk/gtk_chrome_cookie_view.h"
#include "chrome/browser/gtk/gtk_tree.h"
#include "net/base/cookie_monster.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class CookieDisplayGtk;
class CookiesTreeModel;
@@ -128,17 +128,17 @@ class CookiesView : public gtk_tree::TreeAdapter::Delegate {
bool destroy_dialog_in_destructor_;
friend class CookiesViewTest;
- FRIEND_TEST(CookiesViewTest, Empty);
- FRIEND_TEST(CookiesViewTest, Noop);
- FRIEND_TEST(CookiesViewTest, RemoveAll);
- FRIEND_TEST(CookiesViewTest, RemoveAllWithDefaultSelected);
- FRIEND_TEST(CookiesViewTest, Remove);
- FRIEND_TEST(CookiesViewTest, RemoveCookiesByType);
- FRIEND_TEST(CookiesViewTest, RemoveByDomain);
- FRIEND_TEST(CookiesViewTest, RemoveDefaultSelection);
- FRIEND_TEST(CookiesViewTest, Filter);
- FRIEND_TEST(CookiesViewTest, FilterRemoveAll);
- FRIEND_TEST(CookiesViewTest, FilterRemove);
+ FRIEND_TEST_ALL_PREFIXES(CookiesViewTest, Empty);
+ FRIEND_TEST_ALL_PREFIXES(CookiesViewTest, Noop);
+ FRIEND_TEST_ALL_PREFIXES(CookiesViewTest, RemoveAll);
+ FRIEND_TEST_ALL_PREFIXES(CookiesViewTest, RemoveAllWithDefaultSelected);
+ FRIEND_TEST_ALL_PREFIXES(CookiesViewTest, Remove);
+ FRIEND_TEST_ALL_PREFIXES(CookiesViewTest, RemoveCookiesByType);
+ FRIEND_TEST_ALL_PREFIXES(CookiesViewTest, RemoveByDomain);
+ FRIEND_TEST_ALL_PREFIXES(CookiesViewTest, RemoveDefaultSelection);
+ FRIEND_TEST_ALL_PREFIXES(CookiesViewTest, Filter);
+ FRIEND_TEST_ALL_PREFIXES(CookiesViewTest, FilterRemoveAll);
+ FRIEND_TEST_ALL_PREFIXES(CookiesViewTest, FilterRemove);
DISALLOW_COPY_AND_ASSIGN(CookiesView);
};
diff --git a/chrome/browser/gtk/options/languages_page_gtk.h b/chrome/browser/gtk/options/languages_page_gtk.h
index 69c72d6..17c83cb 100644
--- a/chrome/browser/gtk/options/languages_page_gtk.h
+++ b/chrome/browser/gtk/options/languages_page_gtk.h
@@ -17,11 +17,11 @@
#include <string>
#include "app/gtk_signal.h"
+#include "base/gtest_prod_util.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/gtk/gtk_tree.h"
#include "chrome/browser/pref_member.h"
#include "chrome/browser/options_page_base.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class LanguageComboboxModel;
class LanguageOrderTableModel;
@@ -118,12 +118,12 @@ class LanguagesPageGtk
bool initializing_;
friend class LanguagesPageGtkTest;
- FRIEND_TEST(LanguagesPageGtkTest, RemoveAcceptLang);
- FRIEND_TEST(LanguagesPageGtkTest, RemoveMultipleAcceptLang);
- FRIEND_TEST(LanguagesPageGtkTest, MoveAcceptLang);
- FRIEND_TEST(LanguagesPageGtkTest, AddAcceptLang);
- FRIEND_TEST(LanguagesPageGtkTest, EnableSpellChecking);
- FRIEND_TEST(LanguagesPageGtkTest, DictionaryLanguage);
+ FRIEND_TEST_ALL_PREFIXES(LanguagesPageGtkTest, RemoveAcceptLang);
+ FRIEND_TEST_ALL_PREFIXES(LanguagesPageGtkTest, RemoveMultipleAcceptLang);
+ FRIEND_TEST_ALL_PREFIXES(LanguagesPageGtkTest, MoveAcceptLang);
+ FRIEND_TEST_ALL_PREFIXES(LanguagesPageGtkTest, AddAcceptLang);
+ FRIEND_TEST_ALL_PREFIXES(LanguagesPageGtkTest, EnableSpellChecking);
+ FRIEND_TEST_ALL_PREFIXES(LanguagesPageGtkTest, DictionaryLanguage);
DISALLOW_COPY_AND_ASSIGN(LanguagesPageGtk);
};
diff --git a/chrome/browser/history/expire_history_backend.h b/chrome/browser/history/expire_history_backend.h
index 11c0416..22484c4 100644
--- a/chrome/browser/history/expire_history_backend.h
+++ b/chrome/browser/history/expire_history_backend.h
@@ -10,11 +10,11 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/task.h"
#include "base/time.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/history/history_types.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class BookmarkService;
class GURL;
@@ -101,11 +101,10 @@ class ExpireHistoryBackend {
}
private:
- // friend class ExpireHistoryTest_DeleteFaviconsIfPossible_Test;
- FRIEND_TEST(ExpireHistoryTest, DeleteTextIndexForURL);
- FRIEND_TEST(ExpireHistoryTest, DeleteFaviconsIfPossible);
- FRIEND_TEST(ExpireHistoryTest, ArchiveSomeOldHistory);
- FRIEND_TEST(ExpireHistoryTest, ExpiringVisitsReader);
+ FRIEND_TEST_ALL_PREFIXES(ExpireHistoryTest, DeleteTextIndexForURL);
+ FRIEND_TEST_ALL_PREFIXES(ExpireHistoryTest, DeleteFaviconsIfPossible);
+ FRIEND_TEST_ALL_PREFIXES(ExpireHistoryTest, ArchiveSomeOldHistory);
+ FRIEND_TEST_ALL_PREFIXES(ExpireHistoryTest, ExpiringVisitsReader);
friend class ::TestingProfile;
struct DeleteDependencies;
diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h
index 1e0079d..3330ae5 100644
--- a/chrome/browser/history/history_backend.h
+++ b/chrome/browser/history/history_backend.h
@@ -8,6 +8,7 @@
#include <utility>
#include "base/file_path.h"
+#include "base/gtest_prod_util.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/history/archived_database.h"
#include "chrome/browser/history/download_types.h"
@@ -19,7 +20,6 @@
#include "chrome/browser/history/thumbnail_database.h"
#include "chrome/browser/history/visit_tracker.h"
#include "chrome/common/mru_cache.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class BookmarkService;
class TestingProfile;
@@ -303,10 +303,10 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
friend class base::RefCountedThreadSafe<HistoryBackend>;
friend class CommitLaterTask; // The commit task needs to call Commit().
friend class HistoryTest; // So the unit tests can poke our innards.
- FRIEND_TEST(HistoryBackendTest, DeleteAll);
- FRIEND_TEST(HistoryBackendTest, ImportedFaviconsTest);
- FRIEND_TEST(HistoryBackendTest, URLsNoLongerBookmarked);
- FRIEND_TEST(HistoryBackendTest, StripUsernamePasswordTest);
+ FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, DeleteAll);
+ FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, ImportedFaviconsTest);
+ FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, URLsNoLongerBookmarked);
+ FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, StripUsernamePasswordTest);
friend class ::TestingProfile;
// Computes the name of the specified database on disk.
diff --git a/chrome/browser/history/in_memory_history_backend.h b/chrome/browser/history/in_memory_history_backend.h
index fe109d5..18184bf 100644
--- a/chrome/browser/history/in_memory_history_backend.h
+++ b/chrome/browser/history/in_memory_history_backend.h
@@ -16,9 +16,9 @@
#include <string>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/scoped_ptr.h"
#include "chrome/common/notification_registrar.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class FilePath;
class HistoryDatabase;
@@ -56,7 +56,7 @@ class InMemoryHistoryBackend : public NotificationObserver {
const NotificationDetails& details);
private:
- FRIEND_TEST(HistoryBackendTest, DeleteAll);
+ FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, DeleteAll);
// Handler for NOTIFY_HISTORY_TYPED_URLS_MODIFIED.
void OnTypedURLsModified(const URLsModifiedDetails& details);
diff --git a/chrome/browser/history/starred_url_database.h b/chrome/browser/history/starred_url_database.h
index 1dd3337..c11db84 100644
--- a/chrome/browser/history/starred_url_database.h
+++ b/chrome/browser/history/starred_url_database.h
@@ -9,9 +9,9 @@
#include "app/tree_node_model.h"
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/url_database.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class FilePath;
@@ -35,7 +35,7 @@ class StarredURLDatabase : public URLDatabase {
// The unit tests poke our innards.
friend class HistoryTest;
friend class StarredURLDatabaseTest;
- FRIEND_TEST(HistoryTest, CreateStarGroup);
+ FRIEND_TEST_ALL_PREFIXES(HistoryTest, CreateStarGroup);
// Writes bookmarks to the specified file.
bool MigrateBookmarksToFile(const FilePath& path);
diff --git a/chrome/browser/history/text_database_manager.h b/chrome/browser/history/text_database_manager.h
index fc23c13..47a2b16 100644
--- a/chrome/browser/history/text_database_manager.h
+++ b/chrome/browser/history/text_database_manager.h
@@ -10,13 +10,13 @@
#include "base/basictypes.h"
#include "base/file_path.h"
+#include "base/gtest_prod_util.h"
#include "base/task.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/text_database.h"
#include "chrome/browser/history/query_parser.h"
#include "chrome/browser/history/url_database.h"
#include "chrome/common/mru_cache.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
struct sqlite3;
@@ -156,11 +156,12 @@ class TextDatabaseManager {
private:
// These tests call ExpireRecentChangesForTime to force expiration.
- FRIEND_TEST(TextDatabaseManagerTest, InsertPartial);
- FRIEND_TEST(TextDatabaseManagerTest, PartialComplete);
- FRIEND_TEST(ExpireHistoryTest, FLAKY_DeleteURLAndFavicon);
- FRIEND_TEST(ExpireHistoryTest, FlushRecentURLsUnstarred);
- FRIEND_TEST(ExpireHistoryTest, FlushRecentURLsUnstarredRestricted);
+ FRIEND_TEST_ALL_PREFIXES(TextDatabaseManagerTest, InsertPartial);
+ FRIEND_TEST_ALL_PREFIXES(TextDatabaseManagerTest, PartialComplete);
+ FRIEND_TEST_ALL_PREFIXES(ExpireHistoryTest, DeleteURLAndFavicon);
+ FRIEND_TEST_ALL_PREFIXES(ExpireHistoryTest, FlushRecentURLsUnstarred);
+ FRIEND_TEST_ALL_PREFIXES(ExpireHistoryTest,
+ FlushRecentURLsUnstarredRestricted);
// Stores "recent stuff" that has happened with the page, since the page
// visit, title, and body all come in at different times.
diff --git a/chrome/browser/importer/firefox2_importer.h b/chrome/browser/importer/firefox2_importer.h
index 09a80d7..447027d 100644
--- a/chrome/browser/importer/firefox2_importer.h
+++ b/chrome/browser/importer/firefox2_importer.h
@@ -8,9 +8,9 @@
#include <set>
#include "base/file_path.h"
+#include "base/gtest_prod_util.h"
#include "chrome/browser/importer/importer.h"
#include "chrome/browser/importer/importer_data_types.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class TemplateURL;
@@ -49,8 +49,8 @@ class Firefox2Importer : public Importer {
std::vector<history::ImportedFavIconUsage>* favicons);
private:
- FRIEND_TEST(FirefoxImporterTest, Firefox2BookmarkParse);
- FRIEND_TEST(FirefoxImporterTest, Firefox2CookesParse);
+ FRIEND_TEST_ALL_PREFIXES(FirefoxImporterTest, Firefox2BookmarkParse);
+ FRIEND_TEST_ALL_PREFIXES(FirefoxImporterTest, Firefox2CookesParse);
virtual ~Firefox2Importer();
diff --git a/chrome/browser/importer/firefox_profile_lock.h b/chrome/browser/importer/firefox_profile_lock.h
index 8c828ec7..20b9065 100644
--- a/chrome/browser/importer/firefox_profile_lock.h
+++ b/chrome/browser/importer/firefox_profile_lock.h
@@ -15,7 +15,7 @@
#include "base/basictypes.h"
#include "base/file_path.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
+#include "base/gtest_prod_util.h"
// Firefox is designed to allow only one application to access its
// profile at the same time.
@@ -80,8 +80,8 @@ class FirefoxProfileLock {
bool HasAcquired();
private:
- FRIEND_TEST(FirefoxProfileLockTest, ProfileLock);
- FRIEND_TEST(FirefoxProfileLockTest, ProfileLockOrphaned);
+ FRIEND_TEST_ALL_PREFIXES(FirefoxProfileLockTest, ProfileLock);
+ FRIEND_TEST_ALL_PREFIXES(FirefoxProfileLockTest, ProfileLockOrphaned);
static const FilePath::CharType* kLockFileName;
static const FilePath::CharType* kOldLockFileName;
diff --git a/chrome/browser/importer/ie_importer.h b/chrome/browser/importer/ie_importer.h
index a43932b..d93405c 100644
--- a/chrome/browser/importer/ie_importer.h
+++ b/chrome/browser/importer/ie_importer.h
@@ -5,8 +5,8 @@
#ifndef CHROME_BROWSER_IMPORTER_IE_IMPORTER_H_
#define CHROME_BROWSER_IMPORTER_IE_IMPORTER_H_
+#include "base/gtest_prod_util.h"
#include "chrome/browser/importer/importer.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class IEImporter : public Importer {
public:
@@ -18,7 +18,7 @@ class IEImporter : public Importer {
ImporterBridge* bridge);
private:
- FRIEND_TEST(ImporterTest, IEImporter);
+ FRIEND_TEST_ALL_PREFIXES(ImporterTest, IEImporter);
virtual ~IEImporter() {}
diff --git a/chrome/browser/importer/safari_importer.h b/chrome/browser/importer/safari_importer.h
index c15ca30..6b686e9 100644
--- a/chrome/browser/importer/safari_importer.h
+++ b/chrome/browser/importer/safari_importer.h
@@ -12,9 +12,9 @@
#include <vector>
#include "base/file_path.h"
+#include "base/gtest_prod_util.h"
#include "chrome/common/sqlite_utils.h"
#include "chrome/browser/importer/importer_data_types.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
#if __OBJC__
@class NSDictionary;
@@ -44,9 +44,9 @@ class SafariImporter : public Importer {
// returns true if we can import the Safari profile.
static bool CanImport(const FilePath& library_dir, uint16 *services_supported);
private:
- FRIEND_TEST(SafariImporterTest, BookmarkImport);
- FRIEND_TEST(SafariImporterTest, FavIconImport);
- FRIEND_TEST(SafariImporterTest, HistoryImport);
+ FRIEND_TEST_ALL_PREFIXES(SafariImporterTest, BookmarkImport);
+ FRIEND_TEST_ALL_PREFIXES(SafariImporterTest, FavIconImport);
+ FRIEND_TEST_ALL_PREFIXES(SafariImporterTest, HistoryImport);
virtual ~SafariImporter();
diff --git a/chrome/browser/importer/toolbar_importer.h b/chrome/browser/importer/toolbar_importer.h
index 23f4291..1f5bb48 100644
--- a/chrome/browser/importer/toolbar_importer.h
+++ b/chrome/browser/importer/toolbar_importer.h
@@ -11,10 +11,10 @@
#include <string>
#include <vector>
+#include "base/gtest_prod_util.h"
#include "chrome/browser/importer/importer.h"
#include "chrome/browser/importer/importer_data_types.h"
#include "chrome/common/net/url_fetcher.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class ImporterBridge;
class XmlReader;
@@ -58,7 +58,7 @@ class Toolbar5Importer : public URLFetcher::Delegate, public Importer {
const std::string& data);
private:
- FRIEND_TEST(Toolbar5ImporterTest, BookmarkParse);
+ FRIEND_TEST_ALL_PREFIXES(Toolbar5ImporterTest, BookmarkParse);
virtual ~Toolbar5Importer();
diff --git a/chrome/browser/metrics/metrics_service.h b/chrome/browser/metrics/metrics_service.h
index 09f1ef8..51a22c3 100644
--- a/chrome/browser/metrics/metrics_service.h
+++ b/chrome/browser/metrics/metrics_service.h
@@ -15,6 +15,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/histogram.h"
#include "base/scoped_ptr.h"
#include "base/values.h"
@@ -22,7 +23,6 @@
#include "chrome/common/child_process_info.h"
#include "chrome/common/net/url_fetcher.h"
#include "chrome/common/notification_registrar.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
#include "webkit/glue/plugins/webplugininfo.h"
#if defined(OS_CHROMEOS)
@@ -510,9 +510,10 @@ class MetricsService : public NotificationObserver,
scoped_refptr<chromeos::ExternalMetrics> external_metrics_;
#endif
- FRIEND_TEST(MetricsServiceTest, ClientIdGeneratesAllZeroes);
- FRIEND_TEST(MetricsServiceTest, ClientIdGeneratesCorrectly);
- FRIEND_TEST(MetricsServiceTest, ClientIdCorrectlyFormatted);
+ FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes);
+ FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly);
+ FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted);
+
DISALLOW_COPY_AND_ASSIGN(MetricsService);
};
diff --git a/chrome/browser/net/dns_master.h b/chrome/browser/net/dns_master.h
index 8449731..0586b1c 100644
--- a/chrome/browser/net/dns_master.h
+++ b/chrome/browser/net/dns_master.h
@@ -19,12 +19,12 @@
#include <set>
#include <string>
+#include "base/gtest_prod_util.h"
#include "base/ref_counted.h"
#include "chrome/browser/net/dns_host_info.h"
#include "chrome/browser/net/referrer.h"
#include "chrome/common/net/dns.h"
#include "net/base/host_port_pair.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
namespace net {
class HostResolver;
@@ -115,13 +115,13 @@ class DnsMaster : public base::RefCountedThreadSafe<DnsMaster> {
private:
friend class base::RefCountedThreadSafe<DnsMaster>;
- FRIEND_TEST(DnsMasterTest, BenefitLookupTest);
- FRIEND_TEST(DnsMasterTest, ShutdownWhenResolutionIsPendingTest);
- FRIEND_TEST(DnsMasterTest, SingleLookupTest);
- FRIEND_TEST(DnsMasterTest, ConcurrentLookupTest);
- FRIEND_TEST(DnsMasterTest, MassiveConcurrentLookupTest);
- FRIEND_TEST(DnsMasterTest, PriorityQueuePushPopTest);
- FRIEND_TEST(DnsMasterTest, PriorityQueueReorderTest);
+ FRIEND_TEST_ALL_PREFIXES(DnsMasterTest, BenefitLookupTest);
+ FRIEND_TEST_ALL_PREFIXES(DnsMasterTest, ShutdownWhenResolutionIsPendingTest);
+ FRIEND_TEST_ALL_PREFIXES(DnsMasterTest, SingleLookupTest);
+ FRIEND_TEST_ALL_PREFIXES(DnsMasterTest, ConcurrentLookupTest);
+ FRIEND_TEST_ALL_PREFIXES(DnsMasterTest, MassiveConcurrentLookupTest);
+ FRIEND_TEST_ALL_PREFIXES(DnsMasterTest, PriorityQueuePushPopTest);
+ FRIEND_TEST_ALL_PREFIXES(DnsMasterTest, PriorityQueueReorderTest);
friend class WaitForResolutionHelper; // For testing.
~DnsMaster();
diff --git a/chrome/browser/net/passive_log_collector.h b/chrome/browser/net/passive_log_collector.h
index 207b45b..2c59b67 100644
--- a/chrome/browser/net/passive_log_collector.h
+++ b/chrome/browser/net/passive_log_collector.h
@@ -8,12 +8,12 @@
#include <string>
#include <vector>
+#include "base/gtest_prod_util.h"
#include "base/hash_tables.h"
#include "base/ref_counted.h"
#include "base/time.h"
#include "chrome/browser/net/chrome_net_log.h"
#include "net/base/net_log.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class PassiveLogCollector : public ChromeNetLog::Observer {
public:
@@ -245,8 +245,8 @@ class PassiveLogCollector : public ChromeNetLog::Observer {
void GetAllCapturedEvents(EntryList* out) const;
private:
- FRIEND_TEST(PassiveLogCollectorTest, LostConnectJob);
- FRIEND_TEST(PassiveLogCollectorTest, LostSocket);
+ FRIEND_TEST_ALL_PREFIXES(PassiveLogCollectorTest, LostConnectJob);
+ FRIEND_TEST_ALL_PREFIXES(PassiveLogCollectorTest, LostSocket);
ConnectJobTracker connect_job_tracker_;
SocketTracker socket_tracker_;
diff --git a/chrome/browser/printing/print_dialog_cloud.h b/chrome/browser/printing/print_dialog_cloud.h
index ca31db8..175103a 100644
--- a/chrome/browser/printing/print_dialog_cloud.h
+++ b/chrome/browser/printing/print_dialog_cloud.h
@@ -6,8 +6,7 @@
#define CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_H_
#include "base/basictypes.h"
-
-#include "testing/gtest/include/gtest/gtest_prod.h"
+#include "base/gtest_prod_util.h"
class Browser;
class FilePath;
@@ -21,8 +20,7 @@ class PrintDialogCloud {
static void CreatePrintDialogForPdf(const FilePath& path_to_pdf);
private:
- FRIEND_TEST(PrintDialogCloudTest, HandlersRegistered);
- FRIEND_TEST(PrintDialogCloudTest, DISABLED_HandlersRegistered);
+ FRIEND_TEST_ALL_PREFIXES(PrintDialogCloudTest, HandlersRegistered);
explicit PrintDialogCloud(const FilePath& path_to_pdf);
~PrintDialogCloud();
diff --git a/chrome/browser/privacy_blacklist/blacklist.h b/chrome/browser/privacy_blacklist/blacklist.h
index 181b7f0..e5d1b5f 100644
--- a/chrome/browser/privacy_blacklist/blacklist.h
+++ b/chrome/browser/privacy_blacklist/blacklist.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/linked_ptr.h"
#include "base/ref_counted.h"
#include "googleurl/src/gurl.h"
@@ -217,8 +218,9 @@ class Blacklist : public base::RefCountedThreadSafe<Blacklist> {
// Preferences where blacklist entries are stored.
PrefService* prefs_;
- FRIEND_TEST(BlacklistTest, Generic);
- FRIEND_TEST(BlacklistTest, PatternMatch);
+ FRIEND_TEST_ALL_PREFIXES(BlacklistTest, Generic);
+ FRIEND_TEST_ALL_PREFIXES(BlacklistTest, PatternMatch);
+
DISALLOW_COPY_AND_ASSIGN(Blacklist);
};
diff --git a/chrome/browser/renderer_host/audio_renderer_host.h b/chrome/browser/renderer_host/audio_renderer_host.h
index 5d7aaa4..289d258 100644
--- a/chrome/browser/renderer_host/audio_renderer_host.h
+++ b/chrome/browser/renderer_host/audio_renderer_host.h
@@ -77,6 +77,7 @@
#include <map>
+#include "base/gtest_prod_util.h"
#include "base/lock.h"
#include "base/process.h"
#include "base/ref_counted.h"
@@ -88,7 +89,6 @@
#include "ipc/ipc_message.h"
#include "media/audio/audio_output.h"
#include "media/audio/simple_sources.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class AudioManager;
struct ViewHostMsg_Audio_CreateStream_Params;
@@ -147,8 +147,8 @@ class AudioRendererHost
private:
friend class AudioRendererHost::IPCAudioSource;
friend class AudioRendererHostTest;
- FRIEND_TEST(AudioRendererHostTest, CreateMockStream);
- FRIEND_TEST(AudioRendererHostTest, MockStreamDataConversation);
+ FRIEND_TEST_ALL_PREFIXES(AudioRendererHostTest, CreateMockStream);
+ FRIEND_TEST_ALL_PREFIXES(AudioRendererHostTest, MockStreamDataConversation);
// The container for AudioOutputStream and serves the audio packet received
// via IPC.
diff --git a/chrome/browser/renderer_host/render_widget_host.h b/chrome/browser/renderer_host/render_widget_host.h
index 23ccbb8..f6e02bf 100644
--- a/chrome/browser/renderer_host/render_widget_host.h
+++ b/chrome/browser/renderer_host/render_widget_host.h
@@ -8,6 +8,7 @@
#include <deque>
#include "app/surface/transport_dib.h"
+#include "base/gtest_prod_util.h"
#include "base/process.h"
#include "base/scoped_ptr.h"
#include "base/string16.h"
@@ -19,7 +20,6 @@
#include "gfx/size.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_channel_handle.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
#include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h"
namespace gfx {
@@ -437,10 +437,10 @@ class RenderWidgetHost : public IPC::Channel::Listener,
bool renderer_initialized_;
private:
- FRIEND_TEST(RenderWidgetHostTest, Resize);
- FRIEND_TEST(RenderWidgetHostTest, ResizeThenCrash);
- FRIEND_TEST(RenderWidgetHostTest, HiddenPaint);
- FRIEND_TEST(RenderWidgetHostTest, PaintAtSize);
+ FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostTest, Resize);
+ FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostTest, ResizeThenCrash);
+ FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostTest, HiddenPaint);
+ FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostTest, PaintAtSize);
// Tell this object to destroy itself.
void Destroy();
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.h b/chrome/browser/renderer_host/resource_dispatcher_host.h
index bce21e8..2ff2cce 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.h
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.h
@@ -17,6 +17,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/logging.h"
#include "base/observer_list.h"
#include "base/process.h"
@@ -269,15 +270,16 @@ class ResourceDispatcherHost : public URLRequest::Delegate {
}
private:
- FRIEND_TEST(ResourceDispatcherHostTest, TestBlockedRequestsProcessDies);
- FRIEND_TEST(ResourceDispatcherHostTest,
- IncrementOutstandingRequestsMemoryCost);
- FRIEND_TEST(ResourceDispatcherHostTest,
- CalculateApproximateMemoryCost);
- FRIEND_TEST(ApplyExtensionLocalizationFilterTest, WrongScheme);
- FRIEND_TEST(ApplyExtensionLocalizationFilterTest, GoodScheme);
- FRIEND_TEST(ApplyExtensionLocalizationFilterTest,
- GoodSchemeWrongResourceType);
+ FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
+ TestBlockedRequestsProcessDies);
+ FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
+ IncrementOutstandingRequestsMemoryCost);
+ FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
+ CalculateApproximateMemoryCost);
+ FRIEND_TEST_ALL_PREFIXES(ApplyExtensionLocalizationFilterTest, WrongScheme);
+ FRIEND_TEST_ALL_PREFIXES(ApplyExtensionLocalizationFilterTest, GoodScheme);
+ FRIEND_TEST_ALL_PREFIXES(ApplyExtensionLocalizationFilterTest,
+ GoodSchemeWrongResourceType);
class ShutdownTask;
diff --git a/chrome/browser/renderer_host/test/test_render_view_host.h b/chrome/browser/renderer_host/test/test_render_view_host.h
index ff5a03d..10a76bd 100644
--- a/chrome/browser/renderer_host/test/test_render_view_host.h
+++ b/chrome/browser/renderer_host/test/test_render_view_host.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/message_loop.h"
#include "build/build_config.h"
#include "chrome/browser/renderer_host/mock_render_process_host.h"
@@ -170,7 +171,7 @@ class TestRenderViewHost : public RenderViewHost {
virtual bool IsRenderViewLive() const;
private:
- FRIEND_TEST(RenderViewHostTest, FilterNavigate);
+ FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, FilterNavigate);
// Tracks if the caller thinks if it created the RenderView. This is so we can
// respond to IsRenderViewLive appropriately.
diff --git a/chrome/browser/renderer_host/web_cache_manager.h b/chrome/browser/renderer_host/web_cache_manager.h
index 4017be3..61c6c1c 100644
--- a/chrome/browser/renderer_host/web_cache_manager.h
+++ b/chrome/browser/renderer_host/web_cache_manager.h
@@ -13,10 +13,10 @@
#include <set>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/shared_memory.h"
#include "base/task.h"
#include "base/time.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCache.h"
template<typename Type>
@@ -24,9 +24,8 @@ struct DefaultSingletonTraits;
class PrefService;
class WebCacheManager {
- // Unit tests are our friends.
friend class WebCacheManagerTest;
- FRIEND_TEST(WebCacheManagerBrowserTest, FLAKY_CrashOnceOnly);
+ FRIEND_TEST_ALL_PREFIXES(WebCacheManagerBrowserTest, CrashOnceOnly);
public:
static void RegisterPrefs(PrefService* prefs);
diff --git a/chrome/browser/safe_browsing/bloom_filter.h b/chrome/browser/safe_browsing/bloom_filter.h
index 2abe402..519282f 100644
--- a/chrome/browser/safe_browsing/bloom_filter.h
+++ b/chrome/browser/safe_browsing/bloom_filter.h
@@ -19,9 +19,9 @@
#include <vector>
+#include "base/gtest_prod_util.h"
#include "base/ref_counted.h"
#include "chrome/browser/safe_browsing/safe_browsing_util.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class FilePath;
@@ -60,8 +60,8 @@ class BloomFilter : public base::RefCountedThreadSafe<BloomFilter> {
private:
friend class base::RefCountedThreadSafe<BloomFilter>;
- FRIEND_TEST(SafeBrowsingBloomFilter, BloomFilterUse);
- FRIEND_TEST(SafeBrowsingBloomFilter, BloomFilterFile);
+ FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBloomFilter, BloomFilterUse);
+ FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBloomFilter, BloomFilterFile);
static const int kNumHashKeys = 20;
static const int kFileVersion = 1;
diff --git a/chrome/browser/safe_browsing/protocol_manager.h b/chrome/browser/safe_browsing/protocol_manager.h
index 75201ae..1526fe5 100644
--- a/chrome/browser/safe_browsing/protocol_manager.h
+++ b/chrome/browser/safe_browsing/protocol_manager.h
@@ -15,6 +15,7 @@
#include <string>
#include <vector>
+#include "base/gtest_prod_util.h"
#include "base/hash_tables.h"
#include "base/scoped_ptr.h"
#include "base/time.h"
@@ -24,7 +25,6 @@
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/safe_browsing/safe_browsing_util.h"
#include "chrome/common/net/url_fetcher.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class Task;
class Timer;
@@ -44,10 +44,10 @@ struct hash<const URLFetcher*> {
#endif
class SafeBrowsingProtocolManager : public URLFetcher::Delegate {
- // Testing friends:
- FRIEND_TEST(SafeBrowsingProtocolManagerTest, TestBackOffTimes);
- FRIEND_TEST(SafeBrowsingProtocolManagerTest, TestChunkStrings);
- FRIEND_TEST(SafeBrowsingProtocolManagerTest, TestGetHashBackOffTimes);
+ FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestBackOffTimes);
+ FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestChunkStrings);
+ FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest,
+ TestGetHashBackOffTimes);
public:
// Constructs a SafeBrowsingProtocolManager for |sb_service| that issues
diff --git a/chrome/browser/safe_browsing/safe_browsing_database.h b/chrome/browser/safe_browsing/safe_browsing_database.h
index 88bf58a..90723f1 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database.h
+++ b/chrome/browser/safe_browsing/safe_browsing_database.h
@@ -11,11 +11,11 @@
#include <vector>
#include "base/file_path.h"
+#include "base/gtest_prod_util.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "base/time.h"
#include "chrome/browser/safe_browsing/safe_browsing_util.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class BloomFilter;
class GURL;
@@ -83,7 +83,7 @@ class SafeBrowsingDatabase {
typedef base::hash_map<SBPrefix, HashList> HashCache;
friend class SafeBrowsingDatabaseTest;
- FRIEND_TEST(SafeBrowsingDatabaseTest, HashCaching);
+ FRIEND_TEST_ALL_PREFIXES(SafeBrowsingDatabaseTest, HashCaching);
static FilePath BloomFilterFilename(const FilePath& db_filename);
diff --git a/chrome/browser/search_engines/template_url.h b/chrome/browser/search_engines/template_url.h
index 40561ac..8641720 100644
--- a/chrome/browser/search_engines/template_url.h
+++ b/chrome/browser/search_engines/template_url.h
@@ -8,9 +8,9 @@
#include <string>
#include <vector>
+#include "base/gtest_prod_util.h"
#include "base/time.h"
#include "googleurl/src/gurl.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class TemplateURL;
@@ -113,13 +113,13 @@ class TemplateURLRef {
friend class TemplateURL;
friend class TemplateURLModelTest;
friend class TemplateURLTest;
- FRIEND_TEST(TemplateURLTest, ParseParameterKnown);
- FRIEND_TEST(TemplateURLTest, ParseParameterUnknown);
- FRIEND_TEST(TemplateURLTest, ParseURLEmpty);
- FRIEND_TEST(TemplateURLTest, ParseURLNoTemplateEnd);
- FRIEND_TEST(TemplateURLTest, ParseURLNoKnownParameters);
- FRIEND_TEST(TemplateURLTest, ParseURLTwoParameters);
- FRIEND_TEST(TemplateURLTest, ParseURLNestedParameter);
+ FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseParameterKnown);
+ FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseParameterUnknown);
+ FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseURLEmpty);
+ FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseURLNoTemplateEnd);
+ FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseURLNoKnownParameters);
+ FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseURLTwoParameters);
+ FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseURLNestedParameter);
// Enumeration of the known types.
enum ReplacementType {
diff --git a/chrome/browser/search_engines/template_url_model.h b/chrome/browser/search_engines/template_url_model.h
index 8bab7cb..544f49d 100644
--- a/chrome/browser/search_engines/template_url_model.h
+++ b/chrome/browser/search_engines/template_url_model.h
@@ -7,11 +7,11 @@
#include <set>
+#include "base/gtest_prod_util.h"
#include "base/observer_list.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/common/notification_registrar.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class Extension;
class PrefService;
@@ -229,11 +229,13 @@ class TemplateURLModel : public WebDataServiceConsumer,
const std::wstring& term);
private:
- FRIEND_TEST(TemplateURLModelTest, BuildQueryTerms);
- FRIEND_TEST(TemplateURLModelTest, UpdateKeywordSearchTermsForURL);
- FRIEND_TEST(TemplateURLModelTest, DontUpdateKeywordSearchForNonReplaceable);
- FRIEND_TEST(TemplateURLModelTest, ChangeGoogleBaseValue);
- FRIEND_TEST(TemplateURLModelTest, MergeDeletesUnusedProviders);
+ FRIEND_TEST_ALL_PREFIXES(TemplateURLModelTest, BuildQueryTerms);
+ FRIEND_TEST_ALL_PREFIXES(TemplateURLModelTest,
+ UpdateKeywordSearchTermsForURL);
+ FRIEND_TEST_ALL_PREFIXES(TemplateURLModelTest,
+ DontUpdateKeywordSearchForNonReplaceable);
+ FRIEND_TEST_ALL_PREFIXES(TemplateURLModelTest, ChangeGoogleBaseValue);
+ FRIEND_TEST_ALL_PREFIXES(TemplateURLModelTest, MergeDeletesUnusedProviders);
friend class TemplateURLModelTest;
typedef std::map<std::wstring, const TemplateURL*> KeywordToTemplateMap;
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index 5e72cc5..aa87d38 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -14,6 +14,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/autocomplete/autocomplete_edit.h"
#include "chrome/browser/cancelable_request.h"
@@ -716,9 +717,9 @@ class TabContents : public PageNavigator,
// automation purposes.
friend class AutomationProvider;
- FRIEND_TEST(TabContentsTest, NoJSMessageOnInterstitials);
- FRIEND_TEST(TabContentsTest, UpdateTitle);
- FRIEND_TEST(TabContentsTest, CrossSiteCantPreemptAfterUnload);
+ FRIEND_TEST_ALL_PREFIXES(TabContentsTest, NoJSMessageOnInterstitials);
+ FRIEND_TEST_ALL_PREFIXES(TabContentsTest, UpdateTitle);
+ FRIEND_TEST_ALL_PREFIXES(TabContentsTest, CrossSiteCantPreemptAfterUnload);
// Temporary until the view/contents separation is complete.
friend class TabContentsView;
diff --git a/chrome/browser/task_manager.h b/chrome/browser/task_manager.h
index 6f807b8..21cb7e6 100644
--- a/chrome/browser/task_manager.h
+++ b/chrome/browser/task_manager.h
@@ -11,6 +11,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/lock.h"
#include "base/observer_list.h"
#include "base/process_util.h"
@@ -19,7 +20,6 @@
#include "base/timer.h"
#include "chrome/browser/renderer_host/web_cache_manager.h"
#include "net/url_request/url_request_job_tracker.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCache.h"
class Extension;
@@ -148,9 +148,9 @@ class TaskManager {
void OpenAboutMemory();
private:
- FRIEND_TEST(TaskManagerTest, Basic);
- FRIEND_TEST(TaskManagerTest, Resources);
- FRIEND_TEST(TaskManagerTest, RefreshCalled);
+ FRIEND_TEST_ALL_PREFIXES(TaskManagerTest, Basic);
+ FRIEND_TEST_ALL_PREFIXES(TaskManagerTest, Resources);
+ FRIEND_TEST_ALL_PREFIXES(TaskManagerTest, RefreshCalled);
// Obtain an instance via GetInstance().
TaskManager();
@@ -261,7 +261,7 @@ class TaskManagerModel : public URLRequestJobTracker::JobObserver,
private:
friend class base::RefCountedThreadSafe<TaskManagerModel>;
- FRIEND_TEST(TaskManagerTest, RefreshCalled);
+ FRIEND_TEST_ALL_PREFIXES(TaskManagerTest, RefreshCalled);
~TaskManagerModel();
diff --git a/chrome/browser/thumbnail_store.h b/chrome/browser/thumbnail_store.h
index ed95a02..a26b299 100644
--- a/chrome/browser/thumbnail_store.h
+++ b/chrome/browser/thumbnail_store.h
@@ -11,6 +11,7 @@
#include "app/sql/connection.h"
#include "base/file_path.h"
+#include "base/gtest_prod_util.h"
#include "base/message_loop.h"
#include "base/ref_counted.h"
#include "base/timer.h"
@@ -21,7 +22,6 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/ref_counted_util.h"
#include "chrome/common/thumbnail_score.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class DictionaryValue;
class GURL;
@@ -63,10 +63,10 @@ class ThumbnailStore : public base::RefCountedThreadSafe<ThumbnailStore>,
private:
friend class base::RefCountedThreadSafe<ThumbnailStore>;
- FRIEND_TEST(ThumbnailStoreTest, RetrieveFromCache);
- FRIEND_TEST(ThumbnailStoreTest, RetrieveFromDisk);
- FRIEND_TEST(ThumbnailStoreTest, UpdateThumbnail);
- FRIEND_TEST(ThumbnailStoreTest, FollowRedirects);
+ FRIEND_TEST_ALL_PREFIXES(ThumbnailStoreTest, RetrieveFromCache);
+ FRIEND_TEST_ALL_PREFIXES(ThumbnailStoreTest, RetrieveFromDisk);
+ FRIEND_TEST_ALL_PREFIXES(ThumbnailStoreTest, UpdateThumbnail);
+ FRIEND_TEST_ALL_PREFIXES(ThumbnailStoreTest, FollowRedirects);
friend class ThumbnailStoreTest;
~ThumbnailStore();
diff --git a/chrome/browser/views/generic_info_view.h b/chrome/browser/views/generic_info_view.h
index ff03b14..f237e57 100644
--- a/chrome/browser/views/generic_info_view.h
+++ b/chrome/browser/views/generic_info_view.h
@@ -5,9 +5,9 @@
#ifndef CHROME_BROWSER_VIEWS_GENERIC_INFO_VIEW_H_
#define CHROME_BROWSER_VIEWS_GENERIC_INFO_VIEW_H_
+#include "base/gtest_prod_util.h"
#include "base/scoped_ptr.h"
#include "base/string16.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
#include "views/view.h"
namespace views {
@@ -48,7 +48,7 @@ class GenericInfoView : public views::View {
bool is_add, views::View* parent, views::View* child);
private:
- FRIEND_TEST(GenericInfoViewTest, GenericInfoView);
+ FRIEND_TEST_ALL_PREFIXES(GenericInfoViewTest, GenericInfoView);
void InitGenericInfoView();
void AddRow(int layout_id, views::GridLayout* layout,
diff --git a/chrome/browser/visitedlink_master.h b/chrome/browser/visitedlink_master.h
index fc35ff9..169a765 100644
--- a/chrome/browser/visitedlink_master.h
+++ b/chrome/browser/visitedlink_master.h
@@ -13,11 +13,11 @@
#include <vector>
#include "base/file_path.h"
+#include "base/gtest_prod_util.h"
#include "base/ref_counted.h"
#include "base/shared_memory.h"
#include "chrome/browser/history/history.h"
#include "chrome/common/visitedlink_common.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class GURL;
class MessageLoop;
@@ -121,9 +121,9 @@ class VisitedLinkMaster : public VisitedLinkCommon {
#endif
private:
- FRIEND_TEST(VisitedLinkTest, Delete);
- FRIEND_TEST(VisitedLinkTest, BigDelete);
- FRIEND_TEST(VisitedLinkTest, BigImport);
+ FRIEND_TEST_ALL_PREFIXES(VisitedLinkTest, Delete);
+ FRIEND_TEST_ALL_PREFIXES(VisitedLinkTest, BigDelete);
+ FRIEND_TEST_ALL_PREFIXES(VisitedLinkTest, BigImport);
// Object to rebuild the table on the history thread (see the .cc file).
class TableBuilder;
diff --git a/chrome/browser/webdata/web_database.h b/chrome/browser/webdata/web_database.h
index 18837309..b379c29 100644
--- a/chrome/browser/webdata/web_database.h
+++ b/chrome/browser/webdata/web_database.h
@@ -10,10 +10,10 @@
#include "app/sql/connection.h"
#include "app/sql/init_status.h"
#include "app/sql/meta_table.h"
+#include "base/gtest_prod_util.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/search_engines/template_url.h"
#include "third_party/skia/include/core/SkBitmap.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
#include "webkit/glue/form_field.h"
class AutofillChange;
@@ -273,13 +273,16 @@ class WebDatabase {
bool RemoveWebApp(const GURL& url);
private:
- FRIEND_TEST(WebDatabaseTest, Autofill);
- FRIEND_TEST(WebDatabaseTest, Autofill_AddChanges);
- FRIEND_TEST(WebDatabaseTest, Autofill_RemoveBetweenChanges);
- FRIEND_TEST(WebDatabaseTest, Autofill_GetAllAutofillEntries_OneResult);
- FRIEND_TEST(WebDatabaseTest, Autofill_GetAllAutofillEntries_TwoDistinct);
- FRIEND_TEST(WebDatabaseTest, Autofill_GetAllAutofillEntries_TwoSame);
- FRIEND_TEST(WebDatabaseTest, Autofill_UpdateDontReplace);
+ FRIEND_TEST_ALL_PREFIXES(WebDatabaseTest, Autofill);
+ FRIEND_TEST_ALL_PREFIXES(WebDatabaseTest, Autofill_AddChanges);
+ FRIEND_TEST_ALL_PREFIXES(WebDatabaseTest, Autofill_RemoveBetweenChanges);
+ FRIEND_TEST_ALL_PREFIXES(WebDatabaseTest,
+ Autofill_GetAllAutofillEntries_OneResult);
+ FRIEND_TEST_ALL_PREFIXES(WebDatabaseTest,
+ Autofill_GetAllAutofillEntries_TwoDistinct);
+ FRIEND_TEST_ALL_PREFIXES(WebDatabaseTest,
+ Autofill_GetAllAutofillEntries_TwoSame);
+ FRIEND_TEST_ALL_PREFIXES(WebDatabaseTest, Autofill_UpdateDontReplace);
// Methods for adding autofill entries at a specified time. For
// testing only.
bool AddFormFieldValuesTime(