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

Side by Side Diff: chrome/browser/apps/guest_view/web_view_browsertest.cc

Issue 1312453005: Removed Profile::GetHostContentSettingsMap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed patch conflict Created 5 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <queue> 5 #include <queue>
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/process/process.h" 9 #include "base/process/process.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
11 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "base/thread_task_runner_handle.h" 13 #include "base/thread_task_runner_handle.h"
14 #include "chrome/app/chrome_command_ids.h" 14 #include "chrome/app/chrome_command_ids.h"
15 #include "chrome/browser/apps/app_browsertest_util.h" 15 #include "chrome/browser/apps/app_browsertest_util.h"
16 #include "chrome/browser/chrome_content_browser_client.h" 16 #include "chrome/browser/chrome_content_browser_client.h"
17 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
17 #include "chrome/browser/lifetime/application_lifetime.h" 18 #include "chrome/browser/lifetime/application_lifetime.h"
18 #include "chrome/browser/pdf/pdf_extension_test_util.h" 19 #include "chrome/browser/pdf/pdf_extension_test_util.h"
19 #include "chrome/browser/prerender/prerender_link_manager.h" 20 #include "chrome/browser/prerender/prerender_link_manager.h"
20 #include "chrome/browser/prerender/prerender_link_manager_factory.h" 21 #include "chrome/browser/prerender/prerender_link_manager_factory.h"
21 #include "chrome/browser/profiles/profile.h" 22 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" 23 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
23 #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_uti l.h" 24 #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_uti l.h"
24 #include "chrome/browser/task_management/task_management_browsertest_util.h" 25 #include "chrome/browser/task_management/task_management_browsertest_util.h"
25 #include "chrome/browser/task_manager/task_manager_browsertest_util.h" 26 #include "chrome/browser/task_manager/task_manager_browsertest_util.h"
26 #include "chrome/browser/ui/browser.h" 27 #include "chrome/browser/ui/browser.h"
(...skipping 2414 matching lines...) Expand 10 before | Expand all | Expand 10 after
2441 // <webview> screenshot capture fails with ubercomp. 2442 // <webview> screenshot capture fails with ubercomp.
2442 // See http://crbug.com/327035. 2443 // See http://crbug.com/327035.
2443 IN_PROC_BROWSER_TEST_F(WebViewCaptureTest, 2444 IN_PROC_BROWSER_TEST_F(WebViewCaptureTest,
2444 DISABLED_Shim_ScreenshotCapture) { 2445 DISABLED_Shim_ScreenshotCapture) {
2445 TestHelper("testScreenshotCapture", "web_view/shim", NO_TEST_SERVER); 2446 TestHelper("testScreenshotCapture", "web_view/shim", NO_TEST_SERVER);
2446 } 2447 }
2447 2448
2448 // Tests that browser process does not crash when loading plugin inside 2449 // Tests that browser process does not crash when loading plugin inside
2449 // <webview> with content settings set to CONTENT_SETTING_BLOCK. 2450 // <webview> with content settings set to CONTENT_SETTING_BLOCK.
2450 IN_PROC_BROWSER_TEST_F(WebViewTest, TestPlugin) { 2451 IN_PROC_BROWSER_TEST_F(WebViewTest, TestPlugin) {
2451 browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting( 2452 HostContentSettingsMapFactory::GetForProfile(browser()->profile())
2452 CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_BLOCK); 2453 ->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS,
2454 CONTENT_SETTING_BLOCK);
2453 TestHelper("testPlugin", "web_view/shim", NEEDS_TEST_SERVER); 2455 TestHelper("testPlugin", "web_view/shim", NEEDS_TEST_SERVER);
2454 } 2456 }
2455 2457
2456 #if defined(OS_WIN) 2458 #if defined(OS_WIN)
2457 // Test is disabled on Windows because it times out often. 2459 // Test is disabled on Windows because it times out often.
2458 // http://crbug.com/403325 2460 // http://crbug.com/403325
2459 #define MAYBE_WebViewInBackgroundPage \ 2461 #define MAYBE_WebViewInBackgroundPage \
2460 DISABLED_WebViewInBackgroundPage 2462 DISABLED_WebViewInBackgroundPage
2461 #else 2463 #else
2462 #define MAYBE_WebViewInBackgroundPage WebViewInBackgroundPage 2464 #define MAYBE_WebViewInBackgroundPage WebViewInBackgroundPage
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
2763 const task_management::Task* task = task_manager.tasks().back(); 2765 const task_management::Task* task = task_manager.tasks().back();
2764 EXPECT_EQ(task_management::Task::GUEST, task->GetType()); 2766 EXPECT_EQ(task_management::Task::GUEST, task->GetType());
2765 const base::string16 title = task->title(); 2767 const base::string16 title = task->title();
2766 const base::string16 expected_prefix = GetExpectedPrefix(guest_contents); 2768 const base::string16 expected_prefix = GetExpectedPrefix(guest_contents);
2767 EXPECT_TRUE(base::StartsWith(title, 2769 EXPECT_TRUE(base::StartsWith(title,
2768 expected_prefix, 2770 expected_prefix,
2769 base::CompareCase::INSENSITIVE_ASCII)); 2771 base::CompareCase::INSENSITIVE_ASCII));
2770 } 2772 }
2771 2773
2772 #endif // defined(ENABLE_TASK_MANAGER) 2774 #endif // defined(ENABLE_TASK_MANAGER)
OLDNEW
« no previous file with comments | « chrome/browser/android/preferences/website_preference_bridge.cc ('k') | chrome/browser/banners/app_banner_settings_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698