Bug 1130951 - Part1: v2 a little refactoring for test_selectioncarets.py. r=Automatedtester
authorJeremy Chen <jichen@mozilla.com>
Tue, 10 Feb 2015 00:46:00 +0100
changeset 255765 7c8d49762b134c6902acb10bb9dec38e576014f1
parent 255764 48b2d69db54d061e43c69c6b0ae9e2fc85ca1e1c
child 255766 b3990dda83f8ba525baaccc915a5eaf1d82c5a47
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersAutomatedtester
bugs1130951
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1130951 - Part1: v2 a little refactoring for test_selectioncarets.py. r=Automatedtester
layout/base/tests/marionette/test_selectioncarets.py
--- a/layout/base/tests/marionette/test_selectioncarets.py
+++ b/layout/base/tests/marionette/test_selectioncarets.py
@@ -100,17 +100,17 @@ class SelectionCaretsTest(MarionetteTest
         x, y = self._first_word_location(el)
         self._long_press_to_select(el, x, y)
 
         # Move the right caret to the end of the content.
         (caret1_x, caret1_y), (caret2_x, caret2_y) = sel.selection_carets_location()
         self.actions.flick(el, caret2_x, caret2_y, end_caret_x, end_caret_y).perform()
 
         # Move the left caret to the previous position of the right caret.
-        self.actions.flick(el, caret1_x, caret2_y, caret2_x, caret2_y).perform()
+        self.actions.flick(el, caret1_x, caret1_y, caret2_x, caret2_y).perform()
 
         # Ignore extra spaces at the beginning of the content in comparison.
         assertFunc(target_content.lstrip(), sel.selected_content.lstrip())
 
     def _test_minimum_select_one_character(self, el, assertFunc,
                                            x=None, y=None):
         sel = SelectionManager(el)
         original_content = sel.content
@@ -135,17 +135,17 @@ class SelectionCaretsTest(MarionetteTest
         self._long_press_to_select(el, x, y)
 
         # Move the right caret to the end of the content.
         (caret1_x, caret1_y), (caret2_x, caret2_y) = sel.selection_carets_location()
         self.actions.flick(el, caret2_x, caret2_y, end_caret_x, end_caret_y).perform()
 
         # Move the right caret to the position of the left caret.
         (caret1_x, caret1_y), (caret2_x, caret2_y) = sel.selection_carets_location()
-        self.actions.flick(el, caret2_x, caret2_y, caret1_x, caret1_y,).perform()
+        self.actions.flick(el, caret2_x, caret2_y, caret1_x, caret1_y).perform()
 
         assertFunc(target_content, sel.selected_content)
 
     def _test_focus_obtained_by_long_press(self, el1, el2):
         '''Test the focus could be changed from el1 to el2 by long press.
 
         If the focus is changed to e2 successfully, SelectionCarets should
         appear and could be dragged.
@@ -168,17 +168,17 @@ class SelectionCaretsTest(MarionetteTest
     def test_input_long_press_to_select_a_word(self):
         self.openTestHtml(enabled=True)
         self._test_long_press_to_select_a_word(self._input, self.assertEqual)
 
     def test_input_move_selection_carets(self):
         self.openTestHtml(enabled=True)
         self._test_move_selection_carets(self._input, self.assertEqual)
 
-    def test_input_minimum_select_one_caracter(self):
+    def test_input_minimum_select_one_character(self):
         self.openTestHtml(enabled=True)
         self._test_minimum_select_one_character(self._input, self.assertEqual)
 
     def test_input_focus_obtained_by_long_press_from_textarea(self):
         self.openTestHtml(enabled=True)
         self._test_focus_obtained_by_long_press(self._textarea, self._input)
 
     def test_input_focus_obtained_by_long_press_from_contenteditable(self):
@@ -206,17 +206,17 @@ class SelectionCaretsTest(MarionetteTest
     def test_textarea_long_press_to_select_a_word(self):
         self.openTestHtml(enabled=True)
         self._test_long_press_to_select_a_word(self._textarea, self.assertEqual)
 
     def test_textarea_move_selection_carets(self):
         self.openTestHtml(enabled=True)
         self._test_move_selection_carets(self._textarea, self.assertEqual)
 
-    def test_textarea_minimum_select_one_caracter(self):
+    def test_textarea_minimum_select_one_character(self):
         self.openTestHtml(enabled=True)
         self._test_minimum_select_one_character(self._textarea, self.assertEqual)
 
     def test_textarea_focus_obtained_by_long_press_from_input(self):
         self.openTestHtml(enabled=True)
         self._test_focus_obtained_by_long_press(self._input, self._textarea)
 
     def test_textarea_focus_obtained_by_long_press_from_contenteditable(self):
@@ -244,17 +244,17 @@ class SelectionCaretsTest(MarionetteTest
     def test_textarea_rtl_long_press_to_select_a_word(self):
         self.openTestHtml(enabled=True)
         self._test_long_press_to_select_a_word(self._textarea_rtl, self.assertEqual)
 
     def test_textarea_rtl_move_selection_carets(self):
         self.openTestHtml(enabled=True)
         self._test_move_selection_carets(self._textarea_rtl, self.assertEqual)
 
-    def test_textarea_rtl_minimum_select_one_caracter(self):
+    def test_textarea_rtl_minimum_select_one_character(self):
         self.openTestHtml(enabled=True)
         self._test_minimum_select_one_character(self._textarea_rtl, self.assertEqual)
 
     ########################################################################
     # <textarea> right-to-left test cases with selection carets disabled
     ########################################################################
     def test_textarea_rtl_long_press_to_select_a_word_disabled(self):
         self.openTestHtml(enabled=False)