Mercurial > bugzilla-dashboard
view js/black-box.js @ 99:544d339d2b4c
Added the beginnings of a black-box app that can be used to generate/run functional tests.
author | Atul Varma <avarma@mozilla.com> |
---|---|
date | Tue, 27 Apr 2010 09:59:15 -0700 |
parents | |
children | c486d35fad27 |
line wrap: on
line source
function onDashboardLoaded(dashboard, options) { var require = Require.build(); // Needed for Firebug, which won't log iframe errors to the console. $(dashboard).error( function(event) { console.warn("An error occurred in the dashboard iframe."); }); var moduleExports = {}; var dbrequire = dashboard.Require.build(dashboard.Require.modules, moduleExports); options.cache = require("mocks/cache").create(); options.Bugzilla = require("mocks/bugzilla").create(options.Bugzilla); dbrequire("date-utils").now = function() { return new Date("Tue Apr 27 2010 09:00:00 GMT"); }; dbrequire("app/loader").init(moduleExports, options); } $(window).ready( function() { var iframe = $("#dashboard").get(0); iframe.src = "index.html?testing=1"; });