зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1212186
- Disable 'layout.word_select.eat_space_to_next_word' in carets tests. r=mtseng
To get the same behavior across all platforms for carets test, disable 'layout.word_select.eat_space_to_next_word'. In this way, we don't need to worry about the spaces being selected on Windows, and those strip() in individual tests can be eliminated. --HG-- extra : commitid : CbqEsabADIl extra : rebase_source : df60d7092ecf95baef64fff4706dd189fbb11b9e
This commit is contained in:
Родитель
9f084aa31c
Коммит
a16944ff67
|
@ -165,7 +165,7 @@ class CommonCaretsTestCase(object):
|
|||
self.long_press_on_word(el, 0)
|
||||
|
||||
# Ignore extra spaces selected after the word.
|
||||
assertFunc(target_content, sel.selected_content.rstrip())
|
||||
assertFunc(target_content, sel.selected_content)
|
||||
|
||||
def _test_move_selection_carets(self, el, assertFunc):
|
||||
sel = SelectionManager(el)
|
||||
|
@ -191,8 +191,7 @@ class CommonCaretsTestCase(object):
|
|||
# Move the left caret to the previous position of the right caret.
|
||||
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())
|
||||
assertFunc(target_content, sel.selected_content)
|
||||
|
||||
def _test_minimum_select_one_character(self, el, assertFunc,
|
||||
x=None, y=None):
|
||||
|
@ -358,7 +357,7 @@ class CommonCaretsTestCase(object):
|
|||
# Drag end caret back to the target word
|
||||
self.actions.flick(self._body, start_caret_x, start_caret_y, caret2_x, caret2_y).perform()
|
||||
|
||||
self.assertEqual(self.to_unix_line_ending(sel.selected_content.strip()), 'select')
|
||||
self.assertEqual(self.to_unix_line_ending(sel.selected_content), 'select')
|
||||
|
||||
@skip_if_not_rotatable
|
||||
def test_caret_position_after_changing_orientation_of_device(self):
|
||||
|
@ -382,7 +381,7 @@ class CommonCaretsTestCase(object):
|
|||
# other tests
|
||||
self.marionette.set_orientation('portrait')
|
||||
|
||||
self.assertEqual(self.to_unix_line_ending(sel.selected_content.strip()), 'o')
|
||||
self.assertEqual(self.to_unix_line_ending(sel.selected_content), 'o')
|
||||
|
||||
def test_select_word_inside_an_iframe(self):
|
||||
'''Bug 1088552
|
||||
|
@ -404,7 +403,7 @@ class CommonCaretsTestCase(object):
|
|||
self._bottomtext = self.marionette.find_element(By.ID, 'bottomtext')
|
||||
self.long_press_on_location(self._bottomtext)
|
||||
|
||||
self.assertNotEqual(self.to_unix_line_ending(sel.selected_content.strip()), '')
|
||||
self.assertNotEqual(self.to_unix_line_ending(sel.selected_content), '')
|
||||
|
||||
########################################################################
|
||||
# <input> test cases with selection carets enabled
|
||||
|
@ -623,9 +622,9 @@ class SelectionCaretsTestCase(CommonCaretsTestCase, MarionetteTestCase):
|
|||
def setUp(self):
|
||||
super(SelectionCaretsTestCase, self).setUp()
|
||||
self.carets_tested_pref = 'selectioncaret.enabled'
|
||||
|
||||
self.prefs = {
|
||||
'layout.accessiblecaret.enabled': False,
|
||||
'layout.word_select.eat_space_to_next_word': False,
|
||||
self.carets_tested_pref: True,
|
||||
}
|
||||
self.marionette.set_prefs(self.prefs)
|
||||
|
@ -635,9 +634,9 @@ class AccessibleCaretSelectionModeTestCase(CommonCaretsTestCase, MarionetteTestC
|
|||
def setUp(self):
|
||||
super(AccessibleCaretSelectionModeTestCase, self).setUp()
|
||||
self.carets_tested_pref = 'layout.accessiblecaret.enabled'
|
||||
|
||||
self.prefs = {
|
||||
'selectioncaret.enabled': False,
|
||||
'layout.word_select.eat_space_to_next_word': False,
|
||||
'layout.accessiblecaret.use_long_tap_injector': False,
|
||||
self.carets_tested_pref: True,
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче