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

Unified Diff: ash/display/display_error_observer_unittest.cc

Issue 23286003: ash: Get output info from chromeos instead of XRandR. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use index from XRandR Created 7 years, 4 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 | « ash/display/display_error_observer_chromeos_unittest.cc ('k') | ash/display/display_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_error_observer_unittest.cc
diff --git a/ash/display/display_error_observer_unittest.cc b/ash/display/display_error_observer_unittest.cc
deleted file mode 100644
index abe49076140998dc8dab7132ba4c357e91b9d7c5..0000000000000000000000000000000000000000
--- a/ash/display/display_error_observer_unittest.cc
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/display_error_observer.h"
-
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "grit/ash_strings.h"
-#include "ui/aura/window.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-class DisplayErrorObserverTest : public test::AshTestBase {
- protected:
- DisplayErrorObserverTest() {
- }
-
- virtual ~DisplayErrorObserverTest() {
- }
-
- virtual void SetUp() OVERRIDE {
- test::AshTestBase::SetUp();
- observer_.reset(new DisplayErrorObserver());
- }
-
- protected:
- DisplayErrorObserver* observer() { return observer_.get(); }
-
- base::string16 GetMessageContents() {
- return observer_->GetTitleOfDisplayErrorNotificationForTest();
- }
-
- private:
- scoped_ptr<DisplayErrorObserver> observer_;
-
- DISALLOW_COPY_AND_ASSIGN(DisplayErrorObserverTest);
-};
-
-TEST_F(DisplayErrorObserverTest, Normal) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("200x200,300x300");
- observer()->OnDisplayModeChangeFailed(chromeos::STATE_DUAL_MIRROR);
- EXPECT_EQ(l10n_util::GetStringUTF16(IDS_ASH_DISPLAY_FAILURE_ON_MIRRORING),
- GetMessageContents());
-}
-
-TEST_F(DisplayErrorObserverTest, CallTwice) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("200x200,300x300");
- observer()->OnDisplayModeChangeFailed(chromeos::STATE_DUAL_MIRROR);
- base::string16 message = GetMessageContents();
- EXPECT_FALSE(message.empty());
-
- observer()->OnDisplayModeChangeFailed(chromeos::STATE_DUAL_MIRROR);
- base::string16 message2 = GetMessageContents();
- EXPECT_FALSE(message2.empty());
- EXPECT_EQ(message, message2);
-}
-
-TEST_F(DisplayErrorObserverTest, CallWithDifferentState) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("200x200,300x300");
- observer()->OnDisplayModeChangeFailed(chromeos::STATE_DUAL_MIRROR);
- EXPECT_EQ(l10n_util::GetStringUTF16(IDS_ASH_DISPLAY_FAILURE_ON_MIRRORING),
- GetMessageContents());
-
- observer()->OnDisplayModeChangeFailed(chromeos::STATE_DUAL_EXTENDED);
- EXPECT_EQ(l10n_util::GetStringUTF16(IDS_ASH_DISPLAY_FAILURE_ON_NON_MIRRORING),
- GetMessageContents());
-}
-
-} // namespace internal
-} // namespace ash
« no previous file with comments | « ash/display/display_error_observer_chromeos_unittest.cc ('k') | ash/display/display_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698