Closed Bug 1330323 Opened 8 years ago Closed 8 years ago

Intermittent test_execute_script.py TestExecuteChrome.* | UnsupportedOperationException: Only supported in Firefox

Categories

(Testing :: Marionette Client and Harness, defect)

Version 3
defect
Not set
normal

Tracking

(firefox51 unaffected, firefox52 fixed, firefox53 fixed)

RESOLVED FIXED
mozilla53
Tracking Status
firefox51 --- unaffected
firefox52 --- fixed
firefox53 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: whimboo)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Comment on attachment 8825834 [details] Bug 1330323 - Fix test failures in test_execute_script for Fennec. https://reviewboard.mozilla.org/r/103908/#review104580 ::: testing/marionette/harness/marionette_harness/tests/unit/test_execute_script.py:197 (Diff revision 1) > + try: > - self.marionette.execute_script("window.wrappedJSObject.foo = 3") > + self.marionette.execute_script("window.wrappedJSObject.foo = 3") > - self.assertEqual( > + self.assertEqual( > - 3, self.marionette.execute_script("return window.wrappedJSObject.foo")) > + self.marionette.execute_script("return window.wrappedJSObject.foo"), 3) > + finally: > + self.marionette.execute_script("delete window.wrappedJSObject.foo") Andreas, do you know why it is necessary to reset the property? If we don't do it here the test_exception() will fail because it checks for the same property as not existent.
Attachment #8825834 - Flags: review?(ato)
Comment on attachment 8825834 [details] Bug 1330323 - Fix test failures in test_execute_script for Fennec. https://reviewboard.mozilla.org/r/103908/#review104580 > Andreas, do you know why it is necessary to reset the property? If we don't do it here the test_exception() will fail because it checks for the same property as not existent. This is because `execute_script` without a `sandbox` kwarg gets executed in the same sandbox, which means `window.wrappedJSObject.foo` and the `window` state is being preserved. So the adding a finally-block here makes total sense and is the correct solution.
Comment on attachment 8825834 [details] Bug 1330323 - Fix test failures in test_execute_script for Fennec. https://reviewboard.mozilla.org/r/103908/#review104594
Attachment #8825834 - Flags: review?(ato) → review+
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d22302d25085 Fix test failures in test_execute_script for Fennec. r=ato
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Please uplift this test-only patch to aurora. Thanks.
Whiteboard: [checkin-needed-aurora]
Flags: in-testsuite+
Whiteboard: [checkin-needed-aurora]
Product: Testing → Remote Protocol
Moving bug to Testing::Marionette Client and Harness component per bug 1815831.
Component: Marionette → Marionette Client and Harness
Product: Remote Protocol → Testing
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: