Bug 1277090 - Update unit tests for getElementAttribute() changes. r=ato
☠☠ backed out by 5e9f3113e1e7 ☠ ☠
authorHenrik Skupin <mail@hskupin.info>
Mon, 12 Dec 2016 20:45:58 +0100
changeset 325915 46499bc1717808ccfcbb8a302370eba9c2dce74e
parent 325914 837d6a698a1b72ec69fe664a97bce0fb3441eb1c
child 325916 403bfd796368e1f3e4a40b7e8b0d0b2c2e392ab5
push id31080
push usercbook@mozilla.com
push dateThu, 15 Dec 2016 13:16:19 +0000
treeherdermozilla-central@f14683f7fad5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato
bugs1277090
milestone53.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 1277090 - Update unit tests for getElementAttribute() changes. r=ato MozReview-Commit-ID: 4eDpV2MzKLN
testing/marionette/harness/marionette_harness/tests/unit/test_mouse_action.py
testing/marionette/harness/marionette_harness/tests/unit/test_typing.py
--- a/testing/marionette/harness/marionette_harness/tests/unit/test_mouse_action.py
+++ b/testing/marionette/harness/marionette_harness/tests/unit/test_mouse_action.py
@@ -46,17 +46,17 @@ class TestMouseAction(MarionetteTestCase
     def test_context_click_action(self):
         test_html = self.marionette.absolute_url("javascriptPage.html")
         self.marionette.navigate(test_html)
         click_el = self.marionette.find_element(By.ID, "resultContainer")
 
         def context_menu_state():
             with self.marionette.using_context("chrome"):
                 cm_el = self.marionette.find_element(By.ID, "contentAreaContextMenu")
-                return cm_el.get_attribute("state")
+                return cm_el.get_property("state")
 
         self.assertEqual("closed", context_menu_state())
         self.action.context_click(click_el).perform()
         self.wait_for_condition(lambda _: context_menu_state() == "open")
 
         with self.marionette.using_context("chrome"):
             self.marionette.find_element(By.ID, "main-window").send_keys(Keys.ESCAPE)
         self.wait_for_condition(lambda _: context_menu_state() == "closed")
@@ -83,30 +83,30 @@ class TestMouseAction(MarionetteTestCase
         self.wait_for_condition(lambda mn: mn.get_url() == data_uri)
 
     def test_chrome_double_click(self):
         self.marionette.navigate("about:blank")
         test_word = "quux"
 
         with self.marionette.using_context("chrome"):
             urlbar = self.marionette.find_element(By.ID, "urlbar")
-            self.assertEqual("", urlbar.get_attribute("value"))
+            self.assertEqual("", urlbar.get_property("value"))
 
             urlbar.send_keys(test_word)
-            self.assertEqual(urlbar.get_attribute("value"), test_word)
+            self.assertEqual(urlbar.get_property("value"), test_word)
             (self.action.double_click(urlbar).perform()
                         .key_down(self.mod_key)
                         .key_down("x").perform())
-            self.assertEqual(urlbar.get_attribute("value"), "")
+            self.assertEqual(urlbar.get_property("value"), "")
 
     def test_chrome_context_click_action(self):
         self.marionette.set_context("chrome")
         def context_menu_state():
             cm_el = self.marionette.find_element(By.ID, "tabContextMenu")
-            return cm_el.get_attribute("state")
+            return cm_el.get_property("state")
 
         currtab = self.marionette.execute_script("return gBrowser.selectedTab")
         self.assertEqual("closed", context_menu_state())
         self.action.context_click(currtab).perform()
         self.wait_for_condition(lambda _: context_menu_state() == "open")
 
         (self.marionette.find_element(By.ID, "main-window")
                         .send_keys(Keys.ESCAPE))
--- a/testing/marionette/harness/marionette_harness/tests/unit/test_typing.py
+++ b/testing/marionette/harness/marionette_harness/tests/unit/test_typing.py
@@ -79,19 +79,19 @@ class TestTyping(MarionetteTestCase):
 
         with self.marionette.using_context("chrome"):
             url_bar = self.marionette.find_element(By.ID, "urlbar")
 
             # lear and paste
             url_bar.send_keys(mod_key, "a")
             url_bar.send_keys(Keys.BACK_SPACE)
 
-            self.assertEqual("", url_bar.get_attribute("value"))
+            self.assertEqual("", url_bar.get_property("value"))
             url_bar.send_keys(mod_key, "v")
-            self.assertEqual("zyxwvutsr", url_bar.get_attribute("value"))
+            self.assertEqual("zyxwvutsr", url_bar.get_property("value"))
 
     def testShouldBeAbleToTypeQuoteMarks(self):
         test_html = self.marionette.absolute_url("javascriptPage.html")
         self.marionette.navigate(test_html)
 
         keyReporter = self.marionette.find_element(By.ID, "keyReporter")
         keyReporter.send_keys("\"")
         self.assertEqual("\"", keyReporter.get_property("value"))