1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/browser/accessibility/accessibility_mode_helper.h"
6 #include "content/common/view_message_enums.h"
7 #include "testing/gtest/include/gtest/gtest.h"
11 TEST(AccessibilityModeHelperTest
, TestNoOpRemove
) {
12 EXPECT_EQ(AccessibilityModeComplete
,
13 RemoveAccessibilityModeFrom(AccessibilityModeComplete
,
14 AccessibilityModeOff
));
17 TEST(AccessibilityModeHelperTest
, TestRemoveSelf
) {
18 EXPECT_EQ(AccessibilityModeOff
,
19 RemoveAccessibilityModeFrom(AccessibilityModeComplete
,
20 AccessibilityModeComplete
));
24 RemoveAccessibilityModeFrom(AccessibilityModeEditableTextOnly
,
25 AccessibilityModeEditableTextOnly
));
28 TEST(AccessibilityModeHelperTest
, TestAddMode
) {
30 AccessibilityModeComplete
,
31 AddAccessibilityModeTo(AccessibilityModeEditableTextOnly
,
32 AccessibilityModeComplete
));
34 AccessibilityModeComplete
,
35 AddAccessibilityModeTo(AccessibilityModeEditableTextOnly
,
36 AccessibilityModeTreeOnly
));
39 } // namespace content