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

Side by Side Diff: chrome/browser/chromeos/accessibility/magnification_manager_unittest.cc

Issue 14200048: Introduce AcccessibilityManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments & minor fix Created 7 years, 8 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/chromeos/accessibility/magnification_manager.h" 5 #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
6 6
7 #include "ash/magnifier/magnifier_constants.h" 7 #include "ash/magnifier/magnifier_constants.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 23 matching lines...) Expand all
34 34
35 void reset() { observed_ = false; } 35 void reset() { observed_ = false; }
36 36
37 private: 37 private:
38 // content::NotificationObserver implimentation: 38 // content::NotificationObserver implimentation:
39 virtual void Observe(int type, 39 virtual void Observe(int type,
40 const content::NotificationSource& source, 40 const content::NotificationSource& source,
41 const content::NotificationDetails& details) OVERRIDE { 41 const content::NotificationDetails& details) OVERRIDE {
42 switch (type) { 42 switch (type) {
43 case chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER: 43 case chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER:
44 accessibility::AccessibilityStatusEventDetails* accessibility_status = 44 AccessibilityStatusEventDetails* accessibility_status =
45 content::Details<accessibility::AccessibilityStatusEventDetails>( 45 content::Details<AccessibilityStatusEventDetails>(
46 details).ptr(); 46 details).ptr();
Daniel Erat 2013/04/26 13:58:58 i think you can unwrap this line now
yoshiki 2013/05/24 18:49:45 Done.
47 47
48 observed_ = true; 48 observed_ = true;
49 observed_enabled_ = accessibility_status->enabled; 49 observed_enabled_ = accessibility_status->enabled;
50 observed_type_ = accessibility_status->magnifier_type; 50 observed_type_ = accessibility_status->magnifier_type;
51 } 51 }
52 } 52 }
53 53
54 bool observed_; 54 bool observed_;
55 bool observed_enabled_; 55 bool observed_enabled_;
56 ash::MagnifierType observed_type_; 56 ash::MagnifierType observed_type_;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 SetMagnifierType(ash::MAGNIFIER_PARTIAL); 128 SetMagnifierType(ash::MAGNIFIER_PARTIAL);
129 EXPECT_EQ(GetMagnifierType(), ash::MAGNIFIER_FULL); 129 EXPECT_EQ(GetMagnifierType(), ash::MAGNIFIER_FULL);
130 130
131 // Disables magnifier, and confirm the status is set successfully. 131 // Disables magnifier, and confirm the status is set successfully.
132 DisableMagnifier(); 132 DisableMagnifier();
133 EXPECT_FALSE(IsMagnifierEnabled()); 133 EXPECT_FALSE(IsMagnifierEnabled());
134 EXPECT_EQ(GetMagnifierType(), ash::MAGNIFIER_FULL); 134 EXPECT_EQ(GetMagnifierType(), ash::MAGNIFIER_FULL);
135 } 135 }
136 136
137 } // namespace chromeos 137 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698