diff options
author | Matt A. Tobin <email@mattatobin.com> | 2018-02-09 06:46:43 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2018-02-09 06:46:43 -0500 |
commit | ac46df8daea09899ce30dc8fd70986e258c746bf (patch) | |
tree | 2750d3125fc253fd5b0671e4bd268eff1fd97296 /toolkit/jetpack/method/test/browser.js | |
parent | 8cecf8d5208f3945b35f879bba3015bb1a11bec6 (diff) | |
download | UXP-ac46df8daea09899ce30dc8fd70986e258c746bf.tar UXP-ac46df8daea09899ce30dc8fd70986e258c746bf.tar.gz UXP-ac46df8daea09899ce30dc8fd70986e258c746bf.tar.lz UXP-ac46df8daea09899ce30dc8fd70986e258c746bf.tar.xz UXP-ac46df8daea09899ce30dc8fd70986e258c746bf.zip |
Move Add-on SDK source to toolkit/jetpack
Diffstat (limited to 'toolkit/jetpack/method/test/browser.js')
-rw-r--r-- | toolkit/jetpack/method/test/browser.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/toolkit/jetpack/method/test/browser.js b/toolkit/jetpack/method/test/browser.js new file mode 100644 index 000000000..7c8e6cd52 --- /dev/null +++ b/toolkit/jetpack/method/test/browser.js @@ -0,0 +1,20 @@ +"use strict"; + +exports["test common"] = require("./common") + +var Method = require("../core") + +exports["test host objects"] = function(assert) { + var isElement = Method("is-element") + isElement.define(function() { return false }) + + isElement.define(Element, function() { return true }) + + assert.notDeepEqual(typeof(Element.prototype[isElement]), "number", + "Host object's prototype is extended with a number value") + + assert.ok(!isElement({}), "object is not an Element") + assert.ok(document.createElement("div"), "Element is an element") +} + +require("test").run(exports) |