summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-01 16:42:16 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-01 16:42:16 +0000
commit754bebc123ff35ecd50c68f43b7675953b1cb431 (patch)
tree744f3516d716d7c4ca66c98424a05176d64cc789 /chrome/browser
parent0e12d7d59d4778e1a8ef692d244bf66aea1a80b8 (diff)
downloadchromium_src-754bebc123ff35ecd50c68f43b7675953b1cb431.zip
chromium_src-754bebc123ff35ecd50c68f43b7675953b1cb431.tar.gz
chromium_src-754bebc123ff35ecd50c68f43b7675953b1cb431.tar.bz2
aura: Fix unit_tests on linux
Make sure the aura::Desktop is destroyed with the message-loop. This is done by adding a DestroyMessagePump notification to MessagePumpObserver. Also remove some views_unittests that were added to test NativeWidgetViews (which aren't used anymore), and do proper cleanup in AccessibilityEventRouter unittest. TBR=darin@chromium.org BUG=104559, 105613 TEST=unit_tests Review URL: http://codereview.chromium.org/8566037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112474 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/profiles/profile_info_cache_unittest.cc8
-rw-r--r--chrome/browser/ui/views/accessibility_event_router_views_unittest.cc12
2 files changed, 6 insertions, 14 deletions
diff --git a/chrome/browser/profiles/profile_info_cache_unittest.cc b/chrome/browser/profiles/profile_info_cache_unittest.cc
index a3009c4..ccbefcf 100644
--- a/chrome/browser/profiles/profile_info_cache_unittest.cc
+++ b/chrome/browser/profiles/profile_info_cache_unittest.cc
@@ -305,13 +305,7 @@ TEST_F(ProfileInfoCacheTest, GAIAPicture) {
profile_image, GetCache()->GetAvatarIconOfProfileAtIndex(1)));
}
-#if defined(USE_AURA)
-#define MAYBE_PersistGAIAPicture DISABLED_PersistGAIAPicture
-#else
-#define MAYBE_PersistGAIAPicture PersistGAIAPicture
-#endif
-
-TEST_F(ProfileInfoCacheTest, MAYBE_PersistGAIAPicture) {
+TEST_F(ProfileInfoCacheTest, PersistGAIAPicture) {
GetCache()->AddProfileToCache(
GetProfilePath("path_1"), ASCIIToUTF16("name_1"), string16(), 0);
gfx::Image gaia_image(gfx::test::CreateImage());
diff --git a/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc b/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc
index 1f5dbba..be7c828 100644
--- a/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc
+++ b/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc
@@ -90,20 +90,17 @@ class AccessibilityEventRouterViewsTest
public:
virtual void SetUp() {
views::ViewsDelegate::views_delegate = new AccessibilityViewsDelegate();
- window_delegate_ = NULL;
}
virtual void TearDown() {
delete views::ViewsDelegate::views_delegate;
views::ViewsDelegate::views_delegate = NULL;
- if (window_delegate_)
- delete window_delegate_;
}
views::Widget* CreateWindowWithContents(views::View* contents) {
- window_delegate_ = new AccessibilityWindowDelegate(contents);
- return views::Widget::CreateWindowWithBounds(window_delegate_,
- gfx::Rect(0, 0, 500, 500));
+ return views::Widget::CreateWindowWithBounds(
+ new AccessibilityWindowDelegate(contents),
+ gfx::Rect(0, 0, 500, 500));
}
protected:
@@ -122,7 +119,6 @@ class AccessibilityEventRouterViewsTest
MessageLoopForUI message_loop_;
int focus_event_count_;
std::string last_control_name_;
- AccessibilityWindowDelegate* window_delegate_;
};
TEST_F(AccessibilityEventRouterViewsTest, TestFocusNotification) {
@@ -184,6 +180,8 @@ TEST_F(AccessibilityEventRouterViewsTest, TestFocusNotification) {
focus_manager->AdvanceFocus(false);
EXPECT_EQ(3, focus_event_count_);
EXPECT_EQ(kButton1ASCII, last_control_name_);
+
+ window->CloseNow();
}
#endif // defined(TOOLKIT_VIEWS)