Commit b1c401d0 authored by Henrik Skupin's avatar Henrik Skupin
Browse files

Bug 1398792 - [marionette] Waive Xrays in "WebDriver:GetElementProperty" to...

Bug 1398792 - [marionette] Waive Xrays in "WebDriver:GetElementProperty" to get unfiltered access to untrusted elements. r=webdriver-reviewers,jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D154219
parent 37c6118e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -297,7 +297,9 @@ class MarionetteCommandsChild extends JSWindowActorChild {
  async getElementProperty(options = {}) {
    const { name, elem } = options;

    return typeof elem[name] != "undefined" ? elem[name] : null;
    // Waive Xrays to get unfiltered access to the untrusted element.
    const el = Cu.waiveXrays(elem);
    return typeof el[name] != "undefined" ? el[name] : null;
  }

  /**
+0 −12
Original line number Diff line number Diff line
@@ -7,24 +7,12 @@
    disabled:
      if os == "android": https://bugzilla.mozilla.org/show_bug.cgi?id=1506782

  [test_primitives["foobar"-foobar\]]
    expected: FAIL

  [test_primitives[42-42\]]
    expected: FAIL

  [test_primitives[js_primitive2-py_primitive2\]]
    expected: FAIL

  [test_primitives[js_primitive3-py_primitive3\]]
    expected: FAIL

  [test_primitives_set_by_execute_script["foobar"-foobar\]]
    expected: FAIL

  [test_primitives_set_by_execute_script[42-42\]]
    expected: FAIL

  [test_primitives_set_by_execute_script[js_primitive2-py_primitive2\]]
    expected: FAIL