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

Side by Side Diff: chrome/browser/metrics/display_utils_unittest.cc

Issue 8298007: Aura: unit_tests now run on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ui_test_utils_aura Bind Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "chrome/browser/metrics/display_utils.h" 6 #include "chrome/browser/metrics/display_utils.h"
7 #include "content/browser/browser_thread.h" 7 #include "content/browser/browser_thread.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 TEST(DisplayUtilsTest, GetPrimaryDisplayDimensions) { 10 // Crashes on Linux Aura, probably because we need to initialize a Screen
11 // object. See http://crbug.com/100341
12 #if defined(USE_AURA) && !defined(OS_WIN)
13 #define MAYBE_GetPrimaryDisplayDimensions DISABLED_GetPrimaryDisplayDimensions
14 #else
15 #define MAYBE_GetPrimaryDisplayDimensions GetPrimaryDisplayDimensions
16 #endif
17 TEST(DisplayUtilsTest, MAYBE_GetPrimaryDisplayDimensions) {
11 MessageLoop message_loop; 18 MessageLoop message_loop;
12 BrowserThread ui_thread(BrowserThread::UI, &message_loop); 19 BrowserThread ui_thread(BrowserThread::UI, &message_loop);
13 int width = 0, height = 0; 20 int width = 0, height = 0;
14 // We aren't actually testing that it's correct, just that it's sane. 21 // We aren't actually testing that it's correct, just that it's sane.
15 DisplayUtils::GetPrimaryDisplayDimensions(&width, &height); 22 DisplayUtils::GetPrimaryDisplayDimensions(&width, &height);
16 EXPECT_GE(width, 10); 23 EXPECT_GE(width, 10);
17 EXPECT_GE(height, 10); 24 EXPECT_GE(height, 10);
18 } 25 }
19 26
20 TEST(DisplayUtilsTest, GetDisplayCount) { 27 TEST(DisplayUtilsTest, GetDisplayCount) {
21 MessageLoop message_loop; 28 MessageLoop message_loop;
22 BrowserThread ui_thread(BrowserThread::UI, &message_loop); 29 BrowserThread ui_thread(BrowserThread::UI, &message_loop);
23 // We aren't actually testing that it's correct, just that it's sane. 30 // We aren't actually testing that it's correct, just that it's sane.
24 EXPECT_GE(DisplayUtils::GetDisplayCount(), 1); 31 EXPECT_GE(DisplayUtils::GetDisplayCount(), 1);
25 } 32 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_utils_unittest.cc ('k') | chrome/browser/printing/print_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698