Skip to content

Commit

Permalink
Remove test classes from python marionette tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davehunt committed Oct 21, 2016
1 parent fe594a6 commit fff22cd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 23 deletions.
17 changes: 7 additions & 10 deletions py/test/selenium/webdriver/marionette/mn_context_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@
# under the License.


class TestUsingContext(object):
def test_context_sets_correct_context_and_returns(driver):

def test_context_sets_correct_context_and_returns(self, driver):

def get_context():
return driver.execute('GET_CONTEXT').pop('value')

assert get_context() == driver.CONTEXT_CONTENT
with driver.context(driver.CONTEXT_CHROME):
assert get_context() == driver.CONTEXT_CHROME
assert get_context() == driver.CONTEXT_CONTENT
def get_context():
return driver.execute('GET_CONTEXT').pop('value')

assert get_context() == driver.CONTEXT_CONTENT
with driver.context(driver.CONTEXT_CHROME):
assert get_context() == driver.CONTEXT_CHROME
assert get_context() == driver.CONTEXT_CONTENT
6 changes: 2 additions & 4 deletions py/test/selenium/webdriver/marionette/mn_launcher_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,5 @@
# under the License.


class TestMarionetteLauncher(object):

def test_launch_and_close_browser(self, driver):
assert 'appBuildId' in driver.capabilities
def test_launch_and_close_browser(driver):
assert 'appBuildId' in driver.capabilities
12 changes: 3 additions & 9 deletions py/test/selenium/webdriver/marionette/mn_set_context_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
# under the License.


from selenium.webdriver import Firefox


class TestMarionetteSpecific(object):

def test_we_can_switch_context_to_chrome(self, capabilities):
driver = Firefox(capabilities=capabilities)
driver.set_context('chrome')
assert 1 == driver.execute_script("var c = Components.classes; return 1;")
def test_we_can_switch_context_to_chrome(driver):
driver.set_context('chrome')
assert 1 == driver.execute_script("var c = Components.classes; return 1;")

0 comments on commit fff22cd

Please sign in to comment.