summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-17 23:36:40 +0000
committerjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-17 23:36:40 +0000
commit6acf501cf2f370bf74586cb2b3601ea1d6a729e8 (patch)
tree7615bf2a724cf747fb9bd775acdadf758b7b2288
parent668ee4b57cb8060d6b63c98960a6f9a7b4ce968a (diff)
downloadchromium_src-6acf501cf2f370bf74586cb2b3601ea1d6a729e8.zip
chromium_src-6acf501cf2f370bf74586cb2b3601ea1d6a729e8.tar.gz
chromium_src-6acf501cf2f370bf74586cb2b3601ea1d6a729e8.tar.bz2
Aura: unit_tests now run on Linux
Marked several tests DISABLED and several tests FAILS. Most are due to functionality that isn't implemented yet on Aura. Filed bugs with Feature-Aura for the ones we need to fix. BUG=100352 TEST=unit_tests Review URL: http://codereview.chromium.org/8298007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105962 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/all.gyp6
-rw-r--r--chrome/browser/bookmarks/bookmark_context_menu_controller_unittest.cc9
-rw-r--r--chrome/browser/bookmarks/bookmark_utils_unittest.cc3
-rw-r--r--chrome/browser/metrics/display_utils_unittest.cc9
-rw-r--r--chrome/browser/printing/print_job_unittest.cc8
-rw-r--r--chrome/browser/shell_integration_unittest.cc8
-rw-r--r--chrome/browser/ui/views/accessibility_event_router_views_unittest.cc8
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc8
-rw-r--r--chrome/test/base/ui_test_utils_aura.cc2
-rw-r--r--content/browser/renderer_host/render_widget_host_unittest.cc16
10 files changed, 68 insertions, 9 deletions
diff --git a/build/all.gyp b/build/all.gyp
index f3995c4..a9a0be3 100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -630,6 +630,12 @@
'../chrome/chrome.gyp:crash_service_win64',
],
}],
+ ['OS=="linux"', {
+ # Aura unit_tests currently only work on Linux.
+ 'dependencies': [
+ '../chrome/chrome.gyp:unit_tests',
+ ],
+ }],
],
},
], # targets
diff --git a/chrome/browser/bookmarks/bookmark_context_menu_controller_unittest.cc b/chrome/browser/bookmarks/bookmark_context_menu_controller_unittest.cc
index 0189634..f20c648 100644
--- a/chrome/browser/bookmarks/bookmark_context_menu_controller_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_context_menu_controller_unittest.cc
@@ -288,7 +288,14 @@ TEST_F(BookmarkContextMenuControllerTest, EmptyNodesNullParent) {
controller.IsCommandIdEnabled(IDC_BOOKMARK_BAR_NEW_FOLDER));
}
-TEST_F(BookmarkContextMenuControllerTest, CutCopyPasteNode) {
+// Fails on Linux Aura, probably because clipboard isn't built yet.
+// See http://crbug.com/100347
+#if defined(USE_AURA) && !defined(OS_WIN)
+#define MAYBE_CutCopyPasteNode FAILS_CutCopyPasteNode
+#else
+#define MAYBE_CutCopyPasteNode CutCopyPasteNode
+#endif
+TEST_F(BookmarkContextMenuControllerTest, MAYBE_CutCopyPasteNode) {
const BookmarkNode* bb_node = model_->bookmark_bar_node();
std::vector<const BookmarkNode*> nodes;
nodes.push_back(bb_node->GetChild(0));
diff --git a/chrome/browser/bookmarks/bookmark_utils_unittest.cc b/chrome/browser/bookmarks/bookmark_utils_unittest.cc
index 4eb78db..ae7ef24 100644
--- a/chrome/browser/bookmarks/bookmark_utils_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_utils_unittest.cc
@@ -126,6 +126,9 @@ TEST(BookmarkUtilsTest, DoesBookmarkContainText) {
// TODO(wyck): Functionality disabled on TOUCH_UI to work around clipboard hang
// in http://crbug.com/96448
#define MAYBE_CopyPaste FAILS_CopyPaste
+#elif defined(USE_AURA) && !defined(OS_WIN)
+// Clipboard not yet implemented on Linux Aura, see http://crbug.com/100348
+#define MAYBE_CopyPaste FAILS_CopyPaste
#else
#define MAYBE_CopyPaste CopyPaste
#endif
diff --git a/chrome/browser/metrics/display_utils_unittest.cc b/chrome/browser/metrics/display_utils_unittest.cc
index 11ef45e..40ebc4c 100644
--- a/chrome/browser/metrics/display_utils_unittest.cc
+++ b/chrome/browser/metrics/display_utils_unittest.cc
@@ -7,7 +7,14 @@
#include "content/browser/browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
-TEST(DisplayUtilsTest, GetPrimaryDisplayDimensions) {
+// Crashes on Linux Aura, probably because we need to initialize a Screen
+// object. See http://crbug.com/100341
+#if defined(USE_AURA) && !defined(OS_WIN)
+#define MAYBE_GetPrimaryDisplayDimensions DISABLED_GetPrimaryDisplayDimensions
+#else
+#define MAYBE_GetPrimaryDisplayDimensions GetPrimaryDisplayDimensions
+#endif
+TEST(DisplayUtilsTest, MAYBE_GetPrimaryDisplayDimensions) {
MessageLoop message_loop;
BrowserThread ui_thread(BrowserThread::UI, &message_loop);
int width = 0, height = 0;
diff --git a/chrome/browser/printing/print_job_unittest.cc b/chrome/browser/printing/print_job_unittest.cc
index 946669a..33171b3 100644
--- a/chrome/browser/printing/print_job_unittest.cc
+++ b/chrome/browser/printing/print_job_unittest.cc
@@ -85,7 +85,13 @@ class TestPrintNotifObserv : public NotificationObserver {
typedef testing::Test PrintJobTest;
-TEST_F(PrintJobTest, SimplePrint) {
+// Crashes under Linux Aura, see http://crbug.com/100340
+#if defined(USE_AURA) && !defined(OS_WIN)
+#define MAYBE_SimplePrint DISABLED_SimplePrint
+#else
+#define MAYBE_SimplePrint SimplePrint
+#endif
+TEST_F(PrintJobTest, MAYBE_SimplePrint) {
// Test the multi-threaded nature of PrintJob to make sure we can use it with
// known lifetime.
diff --git a/chrome/browser/shell_integration_unittest.cc b/chrome/browser/shell_integration_unittest.cc
index f5c41cb..02fd70e 100644
--- a/chrome/browser/shell_integration_unittest.cc
+++ b/chrome/browser/shell_integration_unittest.cc
@@ -159,7 +159,13 @@ TEST(ShellIntegrationTest, GetDesktopShortcutFilename) {
}
}
-TEST(ShellIntegrationTest, GetDesktopFileContents) {
+// Fails on Linux Aura, see http://crbug.com/100346
+#if defined(USE_AURA) && !defined(OS_WIN)
+#define MAYBE_GetDesktopFileContents FAILS_GetDesktopFileContents
+#else
+#define MAYBE_GetDesktopFileContents GetDesktopFileContents
+#endif
+TEST(ShellIntegrationTest, MAYBE_GetDesktopFileContents) {
const struct {
const char* url;
const char* title;
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 497a4db..fb9fb24 100644
--- a/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc
+++ b/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc
@@ -126,7 +126,13 @@ class AccessibilityEventRouterViewsTest
AccessibilityWindowDelegate* window_delegate_;
};
-TEST_F(AccessibilityEventRouterViewsTest, TestFocusNotification) {
+// Crashes on Linux Aura, http://crbug.com/100338
+#if defined(USE_AURA) && !defined(OS_WIN)
+#define MAYBE_TestFocusNotification DISABLED_TestFocusNotification
+#else
+#define MAYBE_TestFocusNotification TestFocusNotification
+#endif
+TEST_F(AccessibilityEventRouterViewsTest, MAYBE_TestFocusNotification) {
const char kButton1ASCII[] = "Button1";
const char kButton2ASCII[] = "Button2";
const char kButton3ASCII[] = "Button3";
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc b/chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc
index e41f844..b0f8ea1 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc
@@ -291,7 +291,13 @@ TEST_F(BookmarkContextMenuTest, EmptyNodesNullParent) {
controller.IsCommandEnabled(IDC_BOOKMARK_BAR_NEW_FOLDER));
}
-TEST_F(BookmarkContextMenuTest, CutCopyPasteNode) {
+// Fails on Linux Aura, clipboard not yet implemented, http://crbug.com/100350
+#if defined(USE_AURA) && !defined(OS_WIN)
+#define MAYBE_CutCopyPasteNode FAILS_CutCopyPasteNode
+#else
+#define MAYBE_CutCopyPasteNode CutCopyPasteNode
+#endif
+TEST_F(BookmarkContextMenuTest, MAYBE_CutCopyPasteNode) {
const BookmarkNode* bb_node = model_->bookmark_bar_node();
std::vector<const BookmarkNode*> nodes;
nodes.push_back(bb_node->GetChild(0));
diff --git a/chrome/test/base/ui_test_utils_aura.cc b/chrome/test/base/ui_test_utils_aura.cc
index 51781af..b62ac21 100644
--- a/chrome/test/base/ui_test_utils_aura.cc
+++ b/chrome/test/base/ui_test_utils_aura.cc
@@ -37,7 +37,7 @@ void ClickOnView(const Browser* browser, ViewID vid) {
view,
ui_controls::LEFT,
ui_controls::DOWN | ui_controls::UP,
- new MessageLoop::QuitTask());
+ MessageLoop::QuitClosure());
RunMessageLoop();
}
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc
index 7a8bea2..3b56125 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -577,7 +577,13 @@ TEST_F(RenderWidgetHostTest, PaintAtSize) {
EXPECT_EQ(30, observer.size().height());
}
-TEST_F(RenderWidgetHostTest, HandleKeyEventsWeSent) {
+// Fails on Linux Aura, see http://crbug.com/100344
+#if defined(USE_AURA) && !defined(OS_WIN)
+#define MAYBE_HandleKeyEventsWeSent FAILS_HandleKeyEventsWeSent
+#else
+#define MAYBE_HandleKeyEventsWeSent HandleKeyEventsWeSent
+#endif
+TEST_F(RenderWidgetHostTest, MAYBE_HandleKeyEventsWeSent) {
// Simulate a keyboard event.
SimulateKeyboardEvent(WebInputEvent::RawKeyDown);
@@ -614,7 +620,13 @@ TEST_F(RenderWidgetHostTest, IgnoreKeyEventsHandledByRenderer) {
EXPECT_FALSE(host_->unhandled_keyboard_event_called());
}
-TEST_F(RenderWidgetHostTest, PreHandleRawKeyDownEvent) {
+// Fails on Linux Aura, see http://crbug.com/100345
+#if defined(USE_AURA) && !defined(OS_WIN)
+#define MAYBE_PreHandleRawKeyDownEvent FAILS_PreHandleRawKeyDownEvent
+#else
+#define MAYBE_PreHandleRawKeyDownEvent PreHandleRawKeyDownEvent
+#endif
+TEST_F(RenderWidgetHostTest, MAYBE_PreHandleRawKeyDownEvent) {
// Simluate the situation that the browser handled the key down event during
// pre-handle phrase.
host_->set_prehandle_keyboard_event(true);