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

Side by Side Diff: chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc

Issue 14307023: chrome: Use base::MessageLoop. (Part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 | Annotate | Revision Log
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 "base/auto_reset.h" 5 #include "base/auto_reset.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/content_settings/host_content_settings_map.h" 8 #include "chrome/browser/content_settings/host_content_settings_map.h"
9 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
10 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 10 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
11 #include "chrome/browser/infobars/infobar_delegate.h" 11 #include "chrome/browser/infobars/infobar_delegate.h"
12 #include "chrome/browser/infobars/infobar_service.h" 12 #include "chrome/browser/infobars/infobar_service.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" 14 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
15 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
16 #include "chrome/common/content_settings.h" 16 #include "chrome/common/content_settings.h"
17 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 17 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
18 #include "chrome/test/base/testing_profile.h" 18 #include "chrome/test/base/testing_profile.h"
19 #include "content/public/browser/web_contents.h" 19 #include "content/public/browser/web_contents.h"
20 #include "content/public/test/test_browser_thread.h" 20 #include "content/public/test/test_browser_thread.h"
21 #include "content/public/test/web_contents_tester.h" 21 #include "content/public/test/web_contents_tester.h"
22 #include "testing/gtest/include/gtest/gtest.h" 22 #include "testing/gtest/include/gtest/gtest.h"
23 23
24 using content::BrowserThread; 24 using content::BrowserThread;
25 using content::WebContentsTester; 25 using content::WebContentsTester;
26 26
27 class ContentSettingBubbleModelTest : public ChromeRenderViewHostTestHarness { 27 class ContentSettingBubbleModelTest : public ChromeRenderViewHostTestHarness {
28 protected: 28 protected:
29 ContentSettingBubbleModelTest() 29 ContentSettingBubbleModelTest()
30 : ui_thread_(BrowserThread::UI, MessageLoop::current()) { 30 : ui_thread_(BrowserThread::UI, base::MessageLoop::current()) {}
31 }
32 31
33 virtual void SetUp() OVERRIDE { 32 virtual void SetUp() OVERRIDE {
34 ChromeRenderViewHostTestHarness::SetUp(); 33 ChromeRenderViewHostTestHarness::SetUp();
35 TabSpecificContentSettings::CreateForWebContents(web_contents()); 34 TabSpecificContentSettings::CreateForWebContents(web_contents());
36 InfoBarService::CreateForWebContents(web_contents()); 35 InfoBarService::CreateForWebContents(web_contents());
37 } 36 }
38 37
39 void CheckGeolocationBubble(size_t expected_domains, 38 void CheckGeolocationBubble(size_t expected_domains,
40 bool expect_clear_link, 39 bool expect_clear_link,
41 bool expect_reload_hint) { 40 bool expect_reload_hint) {
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 ProtocolHandler handler = registry.GetHandlerFor("mailto"); 504 ProtocolHandler handler = registry.GetHandlerFor("mailto");
506 ASSERT_FALSE(handler.IsEmpty()); 505 ASSERT_FALSE(handler.IsEmpty());
507 EXPECT_EQ(ASCIIToUTF16("Handler"), handler.title()); 506 EXPECT_EQ(ASCIIToUTF16("Handler"), handler.title());
508 EXPECT_EQ(CONTENT_SETTING_ALLOW, 507 EXPECT_EQ(CONTENT_SETTING_ALLOW,
509 content_settings->pending_protocol_handler_setting()); 508 content_settings->pending_protocol_handler_setting());
510 EXPECT_FALSE(registry.IsIgnored(test_handler)); 509 EXPECT_FALSE(registry.IsIgnored(test_handler));
511 } 510 }
512 511
513 registry.Shutdown(); 512 registry.Shutdown();
514 } 513 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698