diff --git a/testing/marionette/client/marionette/marionette_test.py b/testing/marionette/client/marionette/marionette_test.py index fa6e789609be..a56375dc19b3 100644 --- a/testing/marionette/client/marionette/marionette_test.py +++ b/testing/marionette/client/marionette/marionette_test.py @@ -645,14 +645,10 @@ class MarionetteTestCase(CommonTestCase): def tearDown(self): if not self.marionette.check_for_crash(): - try: - self.marionette.execute_script("log('TEST-END: %s:%s')" % - (self.filepath.replace('\\', '\\\\'), self.methodName)) - self.marionette.test_name = None - except MarionetteException: - # We have tried to log the test end when there is no listener object that we can access - pass - + self.marionette.set_context("content") + self.marionette.execute_script("log('TEST-END: %s:%s')" % + (self.filepath.replace('\\', '\\\\'), self.methodName)) + self.marionette.test_name = None CommonTestCase.tearDown(self) def get_new_emulator(self): diff --git a/testing/marionette/client/marionette/tests/unit/test_chrome.py b/testing/marionette/client/marionette/tests/unit/test_chrome.py deleted file mode 100644 index 5e4a7823582c..000000000000 --- a/testing/marionette/client/marionette/tests/unit/test_chrome.py +++ /dev/null @@ -1,32 +0,0 @@ -#Copyright 2007-2009 WebDriver committers -#Copyright 2007-2009 Google Inc. -# -#Licensed under the Apache License, Version 2.0 (the "License"); -#you may not use this file except in compliance with the License. -#You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -#Unless required by applicable law or agreed to in writing, software -#distributed under the License is distributed on an "AS IS" BASIS, -#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -#See the License for the specific language governing permissions and -#limitations under the License. - -from marionette_driver import By -from marionette_driver.application_cache import ApplicationCache -from marionette_driver.errors import NoSuchElementException -from marionette import MarionetteTestCase - - -class ChromeTests(MarionetteTestCase): - - def test_hang_until_timeout(self): - with self.marionette.using_context('chrome'): - current_handle = self.marionette.current_chrome_window_handle - menu = self.marionette.find_element(By.ID, 'aboutName') - menu.click() - handles = self.marionette.chrome_window_handles - handles.remove(current_handle) - self.marionette.switch_to_window(handles[0]) - self.assertRaises(NoSuchElementException, self.marionette.find_element, By.ID, 'dek') diff --git a/testing/marionette/client/marionette/tests/unit/unit-tests.ini b/testing/marionette/client/marionette/tests/unit/unit-tests.ini index d2eb2259fa51..5e30ee0db8b8 100644 --- a/testing/marionette/client/marionette/tests/unit/unit-tests.ini +++ b/testing/marionette/client/marionette/tests/unit/unit-tests.ini @@ -142,8 +142,6 @@ browser = false b2g = false [test_set_window_size.py] b2g = false -[test_chrome.py] -b2g = false skip-if = os == "linux" # Bug 1085717 [test_with_using_context.py] diff --git a/testing/marionette/marionette-server.js b/testing/marionette/marionette-server.js index c5680fb58f7d..255303f04f7f 100644 --- a/testing/marionette/marionette-server.js +++ b/testing/marionette/marionette-server.js @@ -296,13 +296,8 @@ MarionetteServerConnection.prototype = { } else { this.curBrowser.executeWhenReady(() => { - if (this.curBrowser.curFrameId) { - this.messageManager.broadcastAsyncMessage( - "Marionette:" + name + this.curBrowser.curFrameId, values); - } - else { - this.sendError("Can not send call to listener as it does not exist", 500, null, commandId); - } + this.messageManager.broadcastAsyncMessage( + "Marionette:" + name + this.curBrowser.curFrameId, values); }); } return success;