Bug 1284874 - Skip irrelevant Marionette tests on Fennec; r=automatedtester,dustin,gbrown

MozReview-Commit-ID: K2Wy9ij6dz3

--HG--
extra : rebase_source : 2123d9368c95ec19b51b94afe4e88cd68f1e416e
This commit is contained in:
Maja Frydrychowicz 2016-08-25 11:11:21 -04:00
parent 5aa7bdf380
commit 579e8d9c0b
8 changed files with 114 additions and 90 deletions

View File

@ -989,6 +989,7 @@ setReq.onerror = function() {
filters.append(tags(self.test_tags))
json_path = update_mozinfo(filepath)
self.logger.info("mozinfo updated with the following: {}".format(None))
self.logger.info("mozinfo is: {}".format(mozinfo.info))
manifest_tests = manifest.active_tests(exists=False,
disabled=True,
filters=filters,

View File

@ -14,30 +14,3 @@ class TestElementSize(MarionetteTestCase):
size = shrinko.rect
self.assertTrue(size['width'] > 0)
self.assertTrue(size['height'] > 0)
class TestElementSizeChrome(MarionetteTestCase):
def setUp(self):
MarionetteTestCase.setUp(self)
self.marionette.set_context("chrome")
self.win = self.marionette.current_window_handle
self.marionette.execute_script(
"window.open('chrome://marionette/content/test2.xul', 'foo', 'chrome,centerscreen');")
self.marionette.switch_to_window('foo')
self.assertNotEqual(self.win, self.marionette.current_window_handle)
def tearDown(self):
self.assertNotEqual(self.win, self.marionette.current_window_handle)
self.marionette.execute_script("window.close();")
self.marionette.switch_to_window(self.win)
MarionetteTestCase.tearDown(self)
def testShouldReturnTheSizeOfAnInput(self):
wins = self.marionette.window_handles
wins.remove(self.win)
newWin = wins.pop()
self.marionette.switch_to_window(newWin)
shrinko = self.marionette.find_element(By.ID, 'textInput')
size = shrinko.rect
self.assertTrue(size['width'] > 0)
self.assertTrue(size['height'] > 0)

View File

@ -0,0 +1,33 @@
# 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/.
from marionette import MarionetteTestCase
from marionette_driver.by import By
class TestElementSizeChrome(MarionetteTestCase):
def setUp(self):
MarionetteTestCase.setUp(self)
self.marionette.set_context("chrome")
self.win = self.marionette.current_window_handle
self.marionette.execute_script(
"window.open('chrome://marionette/content/test2.xul', 'foo', 'chrome,centerscreen');")
self.marionette.switch_to_window('foo')
self.assertNotEqual(self.win, self.marionette.current_window_handle)
def tearDown(self):
self.assertNotEqual(self.win, self.marionette.current_window_handle)
self.marionette.execute_script("window.close();")
self.marionette.switch_to_window(self.win)
MarionetteTestCase.tearDown(self)
def testShouldReturnTheSizeOfAnInput(self):
wins = self.marionette.window_handles
wins.remove(self.win)
newWin = wins.pop()
self.marionette.switch_to_window(newWin)
shrinko = self.marionette.find_element(By.ID, 'textInput')
size = shrinko.rect
self.assertTrue(size['width'] > 0)
self.assertTrue(size['height'] > 0)

View File

@ -25,27 +25,3 @@ class TestPageSource(MarionetteTestCase):
source = self.marionette.page_source
import re
self.assertEqual(re.sub("\s", "", source), "<xml><foo><bar>baz</bar></foo></xml>")
class TestPageSourceChrome(MarionetteTestCase):
def setUp(self):
MarionetteTestCase.setUp(self)
self.marionette.set_context("chrome")
self.win = self.marionette.current_window_handle
self.marionette.execute_script("window.open('chrome://marionette/content/test.xul', 'foo', 'chrome,centerscreen');")
self.marionette.switch_to_window('foo')
self.assertNotEqual(self.win, self.marionette.current_window_handle)
def tearDown(self):
self.assertNotEqual(self.win, self.marionette.current_window_handle)
self.marionette.execute_script("window.close();")
self.marionette.switch_to_window(self.win)
MarionetteTestCase.tearDown(self)
def testShouldReturnXULDetails(self):
wins = self.marionette.window_handles
wins.remove(self.win)
newWin = wins.pop()
self.marionette.switch_to_window(newWin)
source = self.marionette.page_source
self.assertTrue('<textbox id="textInput"' in source)

View File

@ -0,0 +1,29 @@
# 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/.
from marionette import MarionetteTestCase
class TestPageSourceChrome(MarionetteTestCase):
def setUp(self):
MarionetteTestCase.setUp(self)
self.marionette.set_context("chrome")
self.win = self.marionette.current_window_handle
self.marionette.execute_script("window.open('chrome://marionette/content/test.xul', 'foo', 'chrome,centerscreen');")
self.marionette.switch_to_window('foo')
self.assertNotEqual(self.win, self.marionette.current_window_handle)
def tearDown(self):
self.assertNotEqual(self.win, self.marionette.current_window_handle)
self.marionette.execute_script("window.close();")
self.marionette.switch_to_window(self.win)
MarionetteTestCase.tearDown(self)
def testShouldReturnXULDetails(self):
wins = self.marionette.window_handles
wins.remove(self.win)
newWin = wins.pop()
self.marionette.switch_to_window(newWin)
source = self.marionette.page_source
self.assertTrue('<textbox id="textInput"' in source)

View File

@ -4,25 +4,6 @@
from marionette import MarionetteTestCase
class TestTitleChrome(MarionetteTestCase):
def setUp(self):
MarionetteTestCase.setUp(self)
self.marionette.set_context("chrome")
self.win = self.marionette.current_window_handle
self.marionette.execute_script("window.open('chrome://marionette/content/test.xul', 'foo', 'chrome,centerscreen');")
self.marionette.switch_to_window('foo')
self.assertNotEqual(self.win, self.marionette.current_window_handle)
def tearDown(self):
self.assertNotEqual(self.win, self.marionette.current_window_handle)
self.marionette.execute_script("window.close();")
self.marionette.switch_to_window(self.win)
MarionetteTestCase.tearDown(self)
def test_get_chrome_title(self):
title = self.marionette.execute_script("return window.document.documentElement.getAttribute('title');")
self.assertEqual(title, self.marionette.title)
self.assertEqual('Title Test', self.marionette.title)
class TestTitle(MarionetteTestCase):
def test_get_html_title(self):

View File

@ -0,0 +1,26 @@
# 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/.
from marionette import MarionetteTestCase
class TestTitleChrome(MarionetteTestCase):
def setUp(self):
MarionetteTestCase.setUp(self)
self.marionette.set_context("chrome")
self.win = self.marionette.current_window_handle
self.marionette.execute_script("window.open('chrome://marionette/content/test.xul', 'foo', 'chrome,centerscreen');")
self.marionette.switch_to_window('foo')
self.assertNotEqual(self.win, self.marionette.current_window_handle)
def tearDown(self):
self.assertNotEqual(self.win, self.marionette.current_window_handle)
self.marionette.execute_script("window.close();")
self.marionette.switch_to_window(self.win)
MarionetteTestCase.tearDown(self)
def test_get_chrome_title(self):
title = self.marionette.execute_script("return window.document.documentElement.getAttribute('title');")
self.assertEqual(title, self.marionette.title)
self.assertEqual('Title Test', self.marionette.title)

View File

@ -12,18 +12,20 @@ expected = fail
skip-if = buildapp == 'b2g'
[test_click.py]
[test_click_chrome.py]
skip-if = buildapp == 'b2g'
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_checkbox.py]
[test_checkbox_chrome.py]
skip-if = buildapp == 'b2g'
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_elementsize.py]
[test_elementsize_chrome.py]
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_position.py]
[test_rendered_element.py]
[test_chrome_element_css.py]
skip-if = buildapp == 'b2g'
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_element_state.py]
[test_element_state_chrome.py]
skip-if = buildapp == 'b2g'
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_text.py]
[test_text_chrome.py]
skip-if = true # "Bug 896046"
@ -41,7 +43,7 @@ skip-if = buildapp == 'b2g' || (e10s && os == 'win')
[test_simpletest_fail.js]
[test_element_retrieval.py]
[test_findelement_chrome.py]
skip-if = buildapp == 'b2g'
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_navigation.py]
@ -56,7 +58,7 @@ skip-if = true # buildapp != 'b2g' -- Bug 1060060
[test_single_finger.py]
skip-if = true # buildapp != 'b2g' -- Bug 1060060
[test_single_finger_desktop.py]
skip-if = buildapp == 'b2g' || os == "win" # Bug 1025040
skip-if = buildapp == 'b2g' || appname == 'fennec' || os == "win" # Bug 1025040
[test_multi_finger.py]
skip-if = true # buildapp != 'b2g' -- Bug 1060060
@ -66,33 +68,36 @@ skip-if = true # buildapp != 'b2g' -- Bug 1060060
[test_simpletest_chrome.js]
[test_simpletest_timeout.js]
[test_anonymous_content.py]
skip-if = buildapp == 'b2g'
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_switch_frame.py]
skip-if = buildapp == 'b2g' || os == "win" # Bug 1078237
[test_switch_frame_chrome.py]
skip-if = buildapp == 'b2g'
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_switch_remote_frame.py]
skip-if = buildapp == 'b2g'
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_pagesource.py]
skip-if = buildapp == 'b2g'
[test_pagesource_chrome.py]
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_visibility.py]
[test_window_switching.py]
skip-if = buildapp == 'b2g'
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_window_management.py]
skip-if = buildapp == 'b2g'
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_window_position.py]
skip-if = buildapp == 'b2g'
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_window_handles.py]
skip-if = buildapp == 'b2g'
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_screenshot.py]
[test_cookies.py]
skip-if = buildapp == 'b2g'
[test_window_title.py]
[test_window_title_chrome.py]
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_window_type.py]
skip-if = buildapp == 'b2g'
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_implicit_waits.py]
[test_wait.py]
[test_expected.py]
@ -108,18 +113,18 @@ skip-if = true # buildapp == 'b2g' -- Bug 925688
[test_profile_management.py]
skip-if = buildapp == 'b2g'
[test_set_window_size.py]
skip-if = buildapp == 'b2g' || os == "linux" # Bug 1085717
skip-if = buildapp == 'b2g' || os == "linux" || appname == 'fennec' # Bug 1085717
[test_with_using_context.py]
[test_modal_dialogs.py]
skip-if = buildapp == 'b2g'
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_key_actions.py]
[test_mouse_action.py]
skip-if = buildapp == 'b2g' || (os == "win" && !debug && os_version == "6.1") # Bug 1273758
skip-if = buildapp == 'b2g' || (os == "win" && !debug && os_version == "6.1") || appname == 'fennec'# Bug 1273758
[test_teardown_context_preserved.py]
skip-if = buildapp == 'b2g'
[test_file_upload.py]
skip-if = buildapp == 'b2g' || os == "win" # http://bugs.python.org/issue14574
skip-if = buildapp == 'b2g' || appname == 'fennec' || os == "win" # http://bugs.python.org/issue14574
[test_execute_sandboxes.py]
[test_using_permissions.py]
@ -128,7 +133,7 @@ skip-if = buildapp == 'b2g' || os == "win" # http://bugs.python.org/issue14574
[test_shadow_dom.py]
[test_chrome.py]
skip-if = buildapp == 'b2g'
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_addons.py]