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

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

Issue 1713473002: Make TestRenderWidgetHostView::Show/Hide call through to RWHI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@crash
Patch Set: Tentatively undo render_widget_host_view_base.cc modification Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/push_messaging/push_messaging_notification_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_context_menu_model_unittest.cc
diff --git a/chrome/browser/extensions/extension_context_menu_model_unittest.cc b/chrome/browser/extensions/extension_context_menu_model_unittest.cc
index 3ace2ca56266b6aff432ed4ca7e784180772a50f..d933bb47f031555e3fb7d4bbab612aecceaa40e2 100644
--- a/chrome/browser/extensions/extension_context_menu_model_unittest.cc
+++ b/chrome/browser/extensions/extension_context_menu_model_unittest.cc
@@ -43,6 +43,7 @@
#include "extensions/common/value_builder.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/display/test/test_screen.h"
#include "ui/gfx/image/image.h"
namespace extensions {
@@ -140,6 +141,7 @@ class ExtensionContextMenuModelTest : public ExtensionServiceTestBase {
void TearDown() override;
private:
+ display::test::TestScreen test_screen_;
std::unique_ptr<TestBrowserWindow> test_window_;
std::unique_ptr<Browser> browser_;
@@ -192,6 +194,7 @@ Browser* ExtensionContextMenuModelTest::GetBrowser() {
}
void ExtensionContextMenuModelTest::SetUp() {
+ display::Screen::SetScreenInstance(&test_screen_);
ExtensionServiceTestBase::SetUp();
if (content::IsBrowserSideNavigationEnabled())
content::BrowserSideNavigationSetUp();
@@ -201,6 +204,7 @@ void ExtensionContextMenuModelTest::TearDown() {
if (content::IsBrowserSideNavigationEnabled())
content::BrowserSideNavigationTearDown();
ExtensionServiceTestBase::TearDown();
+ display::Screen::SetScreenInstance(nullptr);
}
// Tests that applicable menu items are disabled when a ManagementPolicy
« no previous file with comments | « no previous file | chrome/browser/push_messaging/push_messaging_notification_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698