| Index: telemetry/telemetry/internal/actions/action_runner_unittest.py
|
| diff --git a/telemetry/telemetry/internal/actions/action_runner_unittest.py b/telemetry/telemetry/internal/actions/action_runner_unittest.py
|
| index a708e0efba999f2e9d5cfe5cf5a52f99b001433f..7cd68cd6c50e474d872afb30ccd57f4733a0c2e9 100644
|
| --- a/telemetry/telemetry/internal/actions/action_runner_unittest.py
|
| +++ b/telemetry/telemetry/internal/actions/action_runner_unittest.py
|
| @@ -255,6 +255,31 @@ class ActionRunnerTest(tab_test_case.TabTestCase):
|
| self.assertTrue(action_runner.EvaluateJavaScript(
|
| '(document.scrollingElement || document.body).scrollLeft') > 75)
|
|
|
| + def testEnterText(self):
|
| + self.Navigate('blank.html')
|
| + self._tab.ExecuteJavaScript(
|
| + '(function() {'
|
| + ' var elem = document.createElement("textarea");'
|
| + ' document.body.appendChild(elem);'
|
| + ' elem.focus();'
|
| + '})();')
|
| +
|
| + action_runner = action_runner_module.ActionRunner(self._tab,
|
| + skip_waits=True)
|
| + action_runner.EnterText('That is boring') # That is boring|.
|
| + action_runner.PressKey('Home') # |That is boring.
|
| + action_runner.PressKey('ArrowRight', repeat_count=2) # Th|at is boring.
|
| + action_runner.PressKey('Delete', repeat_count=2) # Th| is boring.
|
| + action_runner.EnterText('is') # This| is boring.
|
| + action_runner.PressKey('End') # This is boring|.
|
| + action_runner.PressKey('ArrowLeft', repeat_count=3) # This is bor|ing.
|
| + action_runner.PressKey('Backspace', repeat_count=3) # This is |ing.
|
| + action_runner.EnterText('interest') # This is interest|ing.
|
| +
|
| + self.assertEqual('This is interesting',
|
| + self._tab.EvaluateJavaScript(
|
| + 'document.querySelector("textarea").value'))
|
| +
|
|
|
| class InteractionTest(unittest.TestCase):
|
|
|
|
|