Bug 1253989 Part 1 - Remove tests for accessiblecaret preference off. r?mtseng draft
authorTing-Yu Lin <tlin@mozilla.com>
Tue, 08 Mar 2016 22:21:30 +0800
changeset 338112 11c4464ba4387ee74234070e7bd8bc6af930ea5c
parent 338095 05c087337043dd8e71cc27bdb5b9d55fd00aaa26
child 338113 ed763f6fd58f1ede2785b20d3f98df225ce9762f
push id12431
push usertlin@mozilla.com
push dateTue, 08 Mar 2016 14:22:21 +0000
reviewersmtseng
bugs1253989
milestone48.0a1
Bug 1253989 Part 1 - Remove tests for accessiblecaret preference off. r?mtseng I don't feel these tests are helpful. It's unlikely that someone will accidentally turn on AccessibleCaret on desktop platforms without being noticed. Remove these tests also reduces the test running time. MozReview-Commit-ID: 33RQQSy77gZ
layout/base/tests/marionette/test_accessiblecaret_cursor_mode.py
layout/base/tests/marionette/test_accessiblecaret_selection_mode.py
--- a/layout/base/tests/marionette/test_accessiblecaret_cursor_mode.py
+++ b/layout/base/tests/marionette/test_accessiblecaret_cursor_mode.py
@@ -217,29 +217,16 @@ class AccessibleCaretCursorModeTestCase(
         self._test_caret_not_appear_when_typing_in_scrollable_content(self._input, self.assertEqual)
 
     def test_input_touch_caret_timeout(self):
         with self.marionette.using_prefs({self.caret_timeout_ms_pref: 1000}):
             self.open_test_html()
             self._test_touch_caret_timeout_by_dragging_it_to_top_left_corner_after_timout(self._input, self.assertNotEqual)
 
     ########################################################################
-    # <input> test cases with touch caret disabled
-    ########################################################################
-    def test_input_move_caret_to_the_right_by_one_character_disabled(self):
-        with self.marionette.using_prefs({self.caret_tested_pref: False}):
-            self.open_test_html()
-            self._test_move_caret_to_the_right_by_one_character(self._input, self.assertNotEqual)
-
-    def test_input_move_caret_to_front_by_dragging_touch_caret_to_top_left_corner_disabled(self):
-        with self.marionette.using_prefs({self.caret_tested_pref: False}):
-            self.open_test_html()
-            self._test_move_caret_to_front_by_dragging_touch_caret_to_front_of_content(self._input, self.assertNotEqual)
-
-    ########################################################################
     # <textarea> test cases with touch caret enabled
     ########################################################################
     def test_textarea_move_caret_to_the_right_by_one_character(self):
         self.open_test_html()
         self._test_move_caret_to_the_right_by_one_character(self._textarea, self.assertEqual)
 
     def test_textarea_move_caret_to_end_by_dragging_touch_caret_to_bottom_right_corner(self):
         self.open_test_html()
@@ -250,29 +237,16 @@ class AccessibleCaretCursorModeTestCase(
         self._test_move_caret_to_front_by_dragging_touch_caret_to_front_of_content(self._textarea, self.assertEqual)
 
     def test_textarea_touch_caret_timeout(self):
         with self.marionette.using_prefs({self.caret_timeout_ms_pref: 1000}):
             self.open_test_html()
             self._test_touch_caret_timeout_by_dragging_it_to_top_left_corner_after_timout(self._textarea, self.assertNotEqual)
 
     ########################################################################
-    # <textarea> test cases with touch caret disabled
-    ########################################################################
-    def test_textarea_move_caret_to_the_right_by_one_character_disabled(self):
-        with self.marionette.using_prefs({self.caret_tested_pref: False}):
-            self.open_test_html()
-            self._test_move_caret_to_the_right_by_one_character(self._textarea, self.assertNotEqual)
-
-    def test_textarea_move_caret_to_front_by_dragging_touch_caret_to_top_left_corner_disabled(self):
-        with self.marionette.using_prefs({self.caret_tested_pref: False}):
-            self.open_test_html()
-            self._test_move_caret_to_front_by_dragging_touch_caret_to_front_of_content(self._textarea, self.assertNotEqual)
-
-    ########################################################################
     # <div> contenteditable test cases with touch caret enabled
     ########################################################################
     def test_contenteditable_move_caret_to_the_right_by_one_character(self):
         self.open_test_html()
         self._test_move_caret_to_the_right_by_one_character(self._contenteditable, self.assertEqual)
 
     def test_contenteditable_move_caret_to_end_by_dragging_touch_caret_to_bottom_right_corner(self):
         self.open_test_html()
@@ -282,29 +256,16 @@ class AccessibleCaretCursorModeTestCase(
         self.open_test_html()
         self._test_move_caret_to_front_by_dragging_touch_caret_to_front_of_content(self._contenteditable, self.assertEqual)
 
     def test_contenteditable_touch_caret_timeout(self):
         with self.marionette.using_prefs({self.caret_timeout_ms_pref: 1000}):
             self.open_test_html()
             self._test_touch_caret_timeout_by_dragging_it_to_top_left_corner_after_timout(self._contenteditable, self.assertNotEqual)
 
-    ########################################################################
-    # <div> contenteditable test cases with touch caret disabled
-    ########################################################################
-    def test_contenteditable_move_caret_to_the_right_by_one_character_disabled(self):
-        with self.marionette.using_prefs({self.caret_tested_pref: False}):
-            self.open_test_html()
-            self._test_move_caret_to_the_right_by_one_character(self._contenteditable, self.assertNotEqual)
-
-    def test_contenteditable_move_caret_to_front_by_dragging_touch_caret_to_top_left_corner_disabled(self):
-        with self.marionette.using_prefs({self.caret_tested_pref: False}):
-            self.open_test_html()
-            self._test_move_caret_to_front_by_dragging_touch_caret_to_front_of_content(self._contenteditable, self.assertNotEqual)
-
     def test_caret_does_not_jump_when_dragging_to_editable_content_boundary(self):
         self.open_test_html()
         el = self._input
         sel = SelectionManager(el)
         content_to_add = '!'
         non_target_content = sel.content + content_to_add
 
         # Goal: the cursor position does not being changed after dragging the
--- a/layout/base/tests/marionette/test_accessiblecaret_selection_mode.py
+++ b/layout/base/tests/marionette/test_accessiblecaret_selection_mode.py
@@ -498,29 +498,16 @@ class AccessibleCaretSelectionModeTestCa
         self.open_test_html()
         self._test_handle_tilt_when_carets_overlap_to_each_other(self._input, self.assertEqual)
 
     def test_input_focus_not_changed_by_long_press_on_non_selectable(self):
         self.open_test_html()
         self._test_focus_not_being_changed_by_long_press_on_non_selectable(self._input)
 
     ########################################################################
-    # <input> test cases with selection carets disabled
-    ########################################################################
-    def test_input_long_press_to_select_a_word_disabled(self):
-        with self.marionette.using_prefs({self.carets_tested_pref: False}):
-            self.open_test_html()
-            self._test_long_press_to_select_a_word(self._input, self.assertNotEqual)
-
-    def test_input_move_selection_carets_disabled(self):
-        with self.marionette.using_prefs({self.carets_tested_pref: False}):
-            self.open_test_html()
-            self._test_move_selection_carets(self._input, self.assertNotEqual)
-
-    ########################################################################
     # <textarea> test cases with selection carets enabled
     ########################################################################
     def test_textarea_long_press_to_select_a_word(self):
         self.open_test_html()
         self._test_long_press_to_select_a_word(self._textarea, self.assertEqual)
 
     def test_textarea_move_selection_carets(self):
         self.open_test_html()
@@ -546,29 +533,16 @@ class AccessibleCaretSelectionModeTestCa
         self.open_test_html()
         self._test_handle_tilt_when_carets_overlap_to_each_other(self._textarea, self.assertEqual)
 
     def test_textarea_focus_not_changed_by_long_press_on_non_selectable(self):
         self.open_test_html()
         self._test_focus_not_being_changed_by_long_press_on_non_selectable(self._textarea)
 
     ########################################################################
-    # <textarea> test cases with selection carets disabled
-    ########################################################################
-    def test_textarea_long_press_to_select_a_word_disabled(self):
-        with self.marionette.using_prefs({self.carets_tested_pref: False}):
-            self.open_test_html()
-            self._test_long_press_to_select_a_word(self._textarea, self.assertNotEqual)
-
-    def test_textarea_move_selection_carets_disable(self):
-        with self.marionette.using_prefs({self.carets_tested_pref: False}):
-            self.open_test_html()
-            self._test_move_selection_carets(self._textarea, self.assertNotEqual)
-
-    ########################################################################
     # <textarea> right-to-left test cases with selection carets enabled
     ########################################################################
     def test_textarea_rtl_long_press_to_select_a_word(self):
         self.open_test_html()
         self._test_long_press_to_select_a_word(self._textarea_rtl, self.assertEqual)
 
     def test_textarea_rtl_move_selection_carets(self):
         self.open_test_html()
@@ -578,29 +552,16 @@ class AccessibleCaretSelectionModeTestCa
         self.open_test_html()
         self._test_minimum_select_one_character(self._textarea_rtl, self.assertEqual)
 
     def test_textarea_rtl_focus_not_changed_by_long_press_on_non_selectable(self):
         self.open_test_html()
         self._test_focus_not_being_changed_by_long_press_on_non_selectable(self._textarea_rtl)
 
     ########################################################################
-    # <textarea> right-to-left test cases with selection carets disabled
-    ########################################################################
-    def test_textarea_rtl_long_press_to_select_a_word_disabled(self):
-        with self.marionette.using_prefs({self.carets_tested_pref: False}):
-            self.open_test_html()
-            self._test_long_press_to_select_a_word(self._textarea_rtl, self.assertNotEqual)
-
-    def test_textarea_rtl_move_selection_carets_disabled(self):
-        with self.marionette.using_prefs({self.carets_tested_pref: False}):
-            self.open_test_html()
-            self._test_move_selection_carets(self._textarea_rtl, self.assertNotEqual)
-
-    ########################################################################
     # <div> contenteditable test cases with selection carets enabled
     ########################################################################
     def test_contenteditable_long_press_to_select_a_word(self):
         self.open_test_html()
         self._test_long_press_to_select_a_word(self._contenteditable, self.assertEqual)
 
     def test_contenteditable_move_selection_carets(self):
         self.open_test_html()
@@ -626,29 +587,16 @@ class AccessibleCaretSelectionModeTestCa
         self.open_test_html()
         self._test_handle_tilt_when_carets_overlap_to_each_other(self._contenteditable, self.assertEqual)
 
     def test_contenteditable_focus_not_changed_by_long_press_on_non_selectable(self):
         self.open_test_html()
         self._test_focus_not_being_changed_by_long_press_on_non_selectable(self._contenteditable)
 
     ########################################################################
-    # <div> contenteditable test cases with selection carets disabled
-    ########################################################################
-    def test_contenteditable_long_press_to_select_a_word_disabled(self):
-        with self.marionette.using_prefs({self.carets_tested_pref: False}):
-            self.open_test_html()
-            self._test_long_press_to_select_a_word(self._contenteditable, self.assertNotEqual)
-
-    def test_contenteditable_move_selection_carets_disabled(self):
-        with self.marionette.using_prefs({self.carets_tested_pref: False}):
-            self.open_test_html()
-            self._test_move_selection_carets(self._contenteditable, self.assertNotEqual)
-
-    ########################################################################
     # <div> non-editable test cases with selection carets enabled
     ########################################################################
     def test_content_non_editable_long_press_to_select_a_word(self):
         self.open_test_html()
         self._test_long_press_to_select_a_word(self._content, self.assertEqual)
 
     def test_content_non_editable_move_selection_carets(self):
         self.open_test_html()