michael@0: /* Any copyright is dedicated to the public domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: // Test that scroll event bubbles up. michael@0: "use strict"; michael@0: michael@0: SimpleTest.waitForExplicitFinish(); michael@0: browserElementTestHelpers.setEnabledPref(true); michael@0: browserElementTestHelpers.addPermission(); michael@0: michael@0: function runTest() { michael@0: var iframe = document.createElement('iframe'); michael@0: SpecialPowers.wrap(iframe).mozbrowser = true; michael@0: document.body.appendChild(iframe); michael@0: michael@0: iframe.addEventListener("mozbrowserscroll", function(e) { michael@0: ok(true, "got mozbrowserscroll event."); michael@0: ok(e.detail, "event.detail is not null."); michael@0: ok(e.detail.top === 4000, "top position is correct."); michael@0: ok(e.detail.left === 4000, "left position is correct."); michael@0: SimpleTest.finish(); michael@0: }); michael@0: michael@0: iframe.src = "data:text/html,"; michael@0: } michael@0: michael@0: addEventListener('testready', runTest);