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

Unified Diff: chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm

Issue 14197014: Add TestBrowserThreadBundle into RenderViewHostTestHarness. Kill some unnecessary real threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged ToT Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm
diff --git a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm
index 37079c0641f8635985479d72633022101ae94d01..f7f1a434204f35c3f656a1ebefe1e151857499ac 100644
--- a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm
+++ b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm
@@ -8,20 +8,18 @@
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/memory/scoped_nsobject.h"
+#include "chrome/browser/media/media_capture_devices_dispatcher.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
#include "chrome/common/content_settings_types.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/common/media_stream_request.h"
-#include "content/public/test/test_browser_thread.h"
#include "grit/generated_resources.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gtest_mac.h"
#include "ui/base/l10n/l10n_util.h"
-using content::BrowserThread;
-
namespace {
class DummyContentSettingBubbleModel : public ContentSettingBubbleModel {
@@ -45,10 +43,6 @@ class DummyContentSettingBubbleModel : public ContentSettingBubbleModel {
class ContentSettingBubbleControllerTest
: public ChromeRenderViewHostTestHarness {
- public:
- ContentSettingBubbleControllerTest();
- virtual ~ContentSettingBubbleControllerTest();
-
protected:
// Helper function to create the bubble controller.
ContentSettingBubbleController* CreateBubbleController(
@@ -57,19 +51,9 @@ class ContentSettingBubbleControllerTest
scoped_nsobject<NSWindow> parent_;
private:
- content::TestBrowserThread browser_thread_;
-
base::mac::ScopedNSAutoreleasePool pool_;
};
-ContentSettingBubbleControllerTest::ContentSettingBubbleControllerTest()
- : ChromeRenderViewHostTestHarness(),
- browser_thread_(BrowserThread::UI, &message_loop_) {
-}
-
-ContentSettingBubbleControllerTest::~ContentSettingBubbleControllerTest() {
-}
-
ContentSettingBubbleController*
ContentSettingBubbleControllerTest::CreateBubbleController(
ContentSettingsType settingsType) {
@@ -119,6 +103,8 @@ TEST_F(ContentSettingBubbleControllerTest, Init) {
// Check that the bubble works for CONTENT_SETTINGS_TYPE_MEDIASTREAM.
TEST_F(ContentSettingBubbleControllerTest, MediaStreamBubble) {
+ MediaCaptureDevicesDispatcher::GetInstance()->
+ DisableDeviceEnumerationForTesting();
ContentSettingBubbleController* controller =
CreateBubbleController(CONTENT_SETTINGS_TYPE_MEDIASTREAM);
content_setting_bubble::MediaMenuPartsMap* mediaMenus =

Powered by Google App Engine
This is Rietveld 408576698