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

Unified Diff: chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc

Issue 273073002: Changes code using Compositor to pass in ContextFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tooltip on chromeos Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
diff --git a/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc b/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
index 49328c7660394396b2f5a6058604d344e096ee64..12ae6da0504e9e0391f8506b57ff2fc3cfee0615 100644
--- a/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
+++ b/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
@@ -52,6 +52,7 @@ class AccessibilityViewsDelegate : public views::TestViewsDelegate {
view, event_type);
}
+ private:
DISALLOW_COPY_AND_ASSIGN(AccessibilityViewsDelegate);
};
@@ -106,14 +107,16 @@ class AccessibilityEventRouterViewsTest
#if defined(OS_WIN)
ole_initializer_.reset(new ui::ScopedOleInitializer());
#endif
- views::ViewsDelegate::views_delegate = new AccessibilityViewsDelegate();
+ views_delegate_.reset(new AccessibilityViewsDelegate);
#if defined(USE_AURA)
// The ContextFactory must exist before any Compositors are created.
bool enable_pixel_output = false;
- ui::InitializeContextFactoryForTests(enable_pixel_output);
+ ui::ContextFactory* context_factory =
+ ui::InitializeContextFactoryForTests(enable_pixel_output);
aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_));
- aura_test_helper_->SetUp();
+ aura_test_helper_->SetUp(context_factory);
+ views_delegate_->set_context_factory(context_factory);
new wm::DefaultActivationClient(aura_test_helper_->root_window());
#endif // USE_AURA
EnableAccessibilityAndListenToFocusNotifications();
@@ -125,8 +128,7 @@ class AccessibilityEventRouterViewsTest
aura_test_helper_->TearDown();
ui::TerminateContextFactoryForTests();
#endif
- delete views::ViewsDelegate::views_delegate;
- views::ViewsDelegate::views_delegate = NULL;
+ views_delegate_.reset();
// The Widget's FocusManager is deleted using DeleteSoon - this
// forces it to be deleted now, so we don't have any memory leaks
@@ -192,6 +194,7 @@ class AccessibilityEventRouterViewsTest
#if defined(USE_AURA)
scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_;
#endif
+ scoped_ptr<AccessibilityViewsDelegate> views_delegate_;
};
TEST_F(AccessibilityEventRouterViewsTest, TestFocusNotification) {
« no previous file with comments | « chrome/browser/ui/ash/ash_init.cc ('k') | chrome/browser/ui/views/frame/browser_desktop_window_tree_host_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698