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

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: Removed redundant functions 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 2397 matching lines...) Expand 10 before | Expand all | Expand 10 after
2424 // <webview> screenshot capture fails with ubercomp. 2425 // <webview> screenshot capture fails with ubercomp.
2425 // See http://crbug.com/327035. 2426 // See http://crbug.com/327035.
2426 IN_PROC_BROWSER_TEST_F(WebViewCaptureTest, 2427 IN_PROC_BROWSER_TEST_F(WebViewCaptureTest,
2427 DISABLED_Shim_ScreenshotCapture) { 2428 DISABLED_Shim_ScreenshotCapture) {
2428 TestHelper("testScreenshotCapture", "web_view/shim", NO_TEST_SERVER); 2429 TestHelper("testScreenshotCapture", "web_view/shim", NO_TEST_SERVER);
2429 } 2430 }
2430 2431
2431 // Tests that browser process does not crash when loading plugin inside 2432 // Tests that browser process does not crash when loading plugin inside
2432 // <webview> with content settings set to CONTENT_SETTING_BLOCK. 2433 // <webview> with content settings set to CONTENT_SETTING_BLOCK.
2433 IN_PROC_BROWSER_TEST_F(WebViewTest, TestPlugin) { 2434 IN_PROC_BROWSER_TEST_F(WebViewTest, TestPlugin) {
2434 browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting( 2435 HostContentSettingsMapFactory::GetForProfile(browser()->profile())
2435 CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_BLOCK); 2436 ->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS,
2437 CONTENT_SETTING_BLOCK);
2436 TestHelper("testPlugin", "web_view/shim", NEEDS_TEST_SERVER); 2438 TestHelper("testPlugin", "web_view/shim", NEEDS_TEST_SERVER);
2437 } 2439 }
2438 2440
2439 #if defined(OS_WIN) 2441 #if defined(OS_WIN)
2440 // Test is disabled on Windows because it times out often. 2442 // Test is disabled on Windows because it times out often.
2441 // http://crbug.com/403325 2443 // http://crbug.com/403325
2442 #define MAYBE_WebViewInBackgroundPage \ 2444 #define MAYBE_WebViewInBackgroundPage \
2443 DISABLED_WebViewInBackgroundPage 2445 DISABLED_WebViewInBackgroundPage
2444 #else 2446 #else
2445 #define MAYBE_WebViewInBackgroundPage WebViewInBackgroundPage 2447 #define MAYBE_WebViewInBackgroundPage WebViewInBackgroundPage
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
2739 const task_management::Task* task = task_manager.tasks().back(); 2741 const task_management::Task* task = task_manager.tasks().back();
2740 EXPECT_EQ(task_management::Task::GUEST, task->GetType()); 2742 EXPECT_EQ(task_management::Task::GUEST, task->GetType());
2741 const base::string16 title = task->title(); 2743 const base::string16 title = task->title();
2742 const base::string16 expected_prefix = GetExpectedPrefix(guest_contents); 2744 const base::string16 expected_prefix = GetExpectedPrefix(guest_contents);
2743 EXPECT_TRUE(base::StartsWith(title, 2745 EXPECT_TRUE(base::StartsWith(title,
2744 expected_prefix, 2746 expected_prefix,
2745 base::CompareCase::INSENSITIVE_ASCII)); 2747 base::CompareCase::INSENSITIVE_ASCII));
2746 } 2748 }
2747 2749
2748 #endif // defined(ENABLE_TASK_MANAGER) 2750 #endif // defined(ENABLE_TASK_MANAGER)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698