Bug 1155716: Part 2: Remove HTMLElement#submit from marionette-driver
authorAndreas Tolfsen <ato@mozilla.com>
Wed, 29 Apr 2015 11:32:01 +0100
changeset 273153 b1ed7125efa77fc657a668c3280e32f262da36dc
parent 273152 786dc785bae6c3888c774398c98991d3c7d8ca2c
child 273154 b9583beee1163962683f4fa7ce0dc2166f6541e2
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1155716
milestone40.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 1155716: Part 2: Remove HTMLElement#submit from marionette-driver Also bumps the marionette-driver version to 0.6 and removes submit tests. r=dburns
testing/marionette/client/marionette/tests/unit/test_submit.py
testing/marionette/client/marionette/tests/unit/unit-tests.ini
testing/marionette/driver/marionette_driver/marionette.py
testing/marionette/driver/setup.py
deleted file mode 100644
--- a/testing/marionette/client/marionette/tests/unit/test_submit.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-import time
-
-from marionette_driver.by import By
-from marionette_driver.errors import NoSuchElementException
-from marionette_driver.wait import Wait
-from marionette import MarionetteTestCase
-
-class TestSubmit(MarionetteTestCase):
-
-    def test_should_be_able_to_submit_forms(self):
-        test_html = self.marionette.absolute_url("formPage.html")
-        self.marionette.navigate(test_html)
-        self.marionette.find_element(By.NAME, "login").submit()
-        for x in xrange(1, 10):
-            try:
-                self.marionette.find_element(By.NAME, "login")
-                time.sleep(1)
-            except NoSuchElementException:
-                break
-
-        Wait(self.marionette, timeout=10, ignored_exceptions=NoSuchElementException)\
-            .until(lambda m: m.find_element(By.ID, 'email'))
-        title = self.marionette.title
-        count = 0
-        while self.marionette.title == '' and count <= 10:
-            time.sleep(1)
-            title = self.marionette.title
-            count = count + 1
-            if title != '':
-                break
-        self.assertEqual(title, "We Arrive Here")
-
-    def test_should_submit_a_form_when_any_input_element_within_that_form_is_submitted(self):
-        test_html = self.marionette.absolute_url("formPage.html")
-        self.marionette.navigate(test_html)
-        self.marionette.find_element(By.ID, "checky").submit()
-
-        for x in xrange(1, 10):
-            try:
-                self.marionette.find_element(By.ID, "checky")
-                time.sleep(1)
-            except NoSuchElementException:
-                break
-
-        Wait(self.marionette, ignored_exceptions=NoSuchElementException).until(
-            lambda m: m.find_element(By.ID, 'email'))
-        self.assertEqual(self.marionette.title, "We Arrive Here")
-
-    def test_should_submit_a_form_when_any_element_wihin_that_form_is_submitted(self):
-        test_html = self.marionette.absolute_url("formPage.html")
-        self.marionette.navigate(test_html)
-        self.marionette.find_element(By.XPATH, "//form/p").submit()
-
-        for x in xrange(1, 10):
-            try:
-                self.marionette.find_element(By.XPATH, "//form/p")
-                time.sleep(1)
-            except NoSuchElementException:
-                break
-
-        Wait(self.marionette, ignored_exceptions=NoSuchElementException).until(
-            lambda m: m.find_element(By.ID, 'email'))
-        self.assertEqual(self.marionette.title, "We Arrive Here")
--- a/testing/marionette/client/marionette/tests/unit/unit-tests.ini
+++ b/testing/marionette/client/marionette/tests/unit/unit-tests.ini
@@ -127,17 +127,16 @@ b2g = false
 b2g = false
 [test_implicit_waits.py]
 [test_wait.py]
 [test_expected.py]
 [test_date_time_value.py]
 [test_getactiveframe_oop.py]
 disabled = "Bug 925688"
 b2g = false
-[test_submit.py]
 [test_chrome_async_finish.js]
 [test_screen_orientation.py]
 browser = false
 [test_errors.py]
 
 [test_execute_isolate.py]
 [test_click_scrolling.py]
 [test_profile_management.py]
--- a/testing/marionette/driver/marionette_driver/marionette.py
+++ b/testing/marionette/driver/marionette_driver/marionette.py
@@ -169,21 +169,16 @@ class HTMLElement(object):
         '''
         Gets the value of the specified CSS property name.
 
         :param property_name: Property name to get the value of.
         '''
         return self.marionette._send_message('getElementValueOfCssProperty', 'value',
                                              id=self.id,
                                              propertyName=property_name)
-    def submit(self):
-        '''
-        Submits if the element is a form or is within a form
-        '''
-        return self.marionette._send_message('submitElement', 'ok', id=self.id)
 
 class MouseButton(object):
     '''
     Enum-like class for mouse button constants
     '''
     LEFT = 0
     MIDDLE = 1
     RIGHT = 2
--- a/testing/marionette/driver/setup.py
+++ b/testing/marionette/driver/setup.py
@@ -1,11 +1,11 @@
 from setuptools import setup, find_packages
 
-version = '0.5'
+version = '0.6'
 
 # dependencies
 with open('requirements.txt') as f:
     deps = f.read().splitlines()
 
 setup(name='marionette_driver',
       version=version,
       description="Marionette Driver",