diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /js/xpconnect/tests/mochitest/chrome_wrappers_helper.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/xpconnect/tests/mochitest/chrome_wrappers_helper.html')
-rw-r--r-- | js/xpconnect/tests/mochitest/chrome_wrappers_helper.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/js/xpconnect/tests/mochitest/chrome_wrappers_helper.html b/js/xpconnect/tests/mochitest/chrome_wrappers_helper.html new file mode 100644 index 000000000..26973b713 --- /dev/null +++ b/js/xpconnect/tests/mochitest/chrome_wrappers_helper.html @@ -0,0 +1,30 @@ +<html> + <head> + <script> + function check_wrapper(ok, wrapper, expected, note) { + + var utils = SpecialPowers.DOMWindowUtils; + ok(utils.getClassName(wrapper) === expected, note); + } + function run_test(ok, xpcnw, sjow) { + // both wrappers should point to our window: XOW + check_wrapper(ok, ok, "Proxy", "functions are wrapped properly") + check_wrapper(ok, xpcnw, "Proxy", "XPCNWs are transformed correctly"); + check_wrapper(ok, sjow, "Proxy", "SJOWs are transformed correctly"); + + check_wrapper(ok, window.location, "Proxy", + "Content needs a same-compartment security wrappers around location"); + + ok(defprop1 === 1, "defprop1 exists"); + window.defprop1 = 2; + ok(defprop1 === 2, "defprop1 is properly writable"); + + // defprop2 = {}; disabled because the test doesn't work + } + + window.xhr = new XMLHttpRequest(); + </script> + </head> + <body> + </body> +</html> |