diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-01 14:30:51 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-01 14:30:51 +0000 |
commit | a918f877c38b7a0bc684a2963fba4a4341a243e8 (patch) | |
tree | b58938b92989fa1a75e8e2b0b62c21944d4cd3bb /chrome/browser/renderer_host | |
parent | be4d55fe8d843628223a7b40162007ab734d1402 (diff) | |
download | chromium_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
Diffstat (limited to 'chrome/browser/renderer_host')
5 files changed, 23 insertions, 21 deletions
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); |