Bug 1277090 - Update unit tests for getElementAttribute() changes. r=ato a=test-only
authorHenrik Skupin <mail@hskupin.info>
Mon, 12 Dec 2016 20:45:58 +0100
changeset 353309 f7b123f1e6231c3460f1a2efd852832a7f636069
parent 353308 c92720f695faeb7814eb660bc94e333338fa557b
child 353310 286cc5f7a92de651814fa733f8f54081d6cfaff3
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato, test-only
bugs1277090
milestone52.0a2
Bug 1277090 - Update unit tests for getElementAttribute() changes. r=ato a=test-only MozReview-Commit-ID: 4eDpV2MzKLN
testing/marionette/harness/marionette_harness/tests/unit/test_mouse_action.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))