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

Unified Diff: chrome/browser/extensions/gpu_browsertest.cc

Issue 233093006: Stop disabling force_compositing_mode for background RenderViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: background: codemoved Created 6 years, 8 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/extensions/gpu_browsertest.cc
diff --git a/chrome/browser/extensions/gpu_browsertest.cc b/chrome/browser/extensions/gpu_browsertest.cc
index 718e5b1a1f540daa0f1171dd7e77c97f33f16fe5..9c31aae48f0b3d1871725fae4ca671368665d63f 100644
--- a/chrome/browser/extensions/gpu_browsertest.cc
+++ b/chrome/browser/extensions/gpu_browsertest.cc
@@ -2,10 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/ui/browser.h"
#include "content/public/browser/render_view_host.h"
@@ -14,9 +10,9 @@
#include "extensions/browser/process_manager.h"
#include "webkit/common/webpreferences.h"
-// Tests that GPU acceleration is disabled for extension background
-// pages. See crbug.com/163698 .
-IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, WebKitPrefsBackgroundPage) {
+// Tests that background pages are marked as never visible to prevent GPU
+// resource allocation. See crbug.com/362165 and crbug.com/163698.
+IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, BackgroundPageIsNeverVisible) {
ASSERT_TRUE(LoadExtension(
test_data_dir_.AppendASCII("good").AppendASCII("Extensions")
.AppendASCII("behllobkkfkfnphdnhnkndlbkcpglgmj")
@@ -26,7 +22,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, WebKitPrefsBackgroundPage) {
extensions::ExtensionSystem::Get(browser()->profile())->process_manager();
extensions::ExtensionHost* host =
FindHostWithPath(manager, "/backgroundpage.html", 1);
- WebPreferences prefs =
- host->render_view_host()->GetWebkitPreferences();
- ASSERT_FALSE(prefs.accelerated_compositing_enabled);
+ ASSERT_TRUE(host->host_contents()->GetDelegate()->IsNeverVisible(
+ host->host_contents()));
}
« no previous file with comments | « chrome/browser/extensions/extension_webkit_preferences.cc ('k') | chrome/browser/tab_contents/background_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698