gecko/browser/devtools/shared/test/browser_browser_basic.js
Joe Walker 402922fb61 Bug 742672 - GCLI needs a new home; r=robcee
--HG--
rename : browser/devtools/webconsole/GcliCommands.jsm => browser/devtools/commandline/GcliCommands.jsm
rename : browser/devtools/webconsole/GcliTiltCommands.jsm => browser/devtools/commandline/GcliTiltCommands.jsm
rename : browser/devtools/webconsole/gcli.css => browser/devtools/commandline/gcli.css
rename : browser/devtools/webconsole/gcli.jsm => browser/devtools/commandline/gcli.jsm
rename : browser/devtools/webconsole/gcliblank.xhtml => browser/devtools/commandline/gcliblank.xhtml
rename : browser/devtools/shared/test/browser_gcli_break.html => browser/devtools/commandline/test/browser_gcli_break.html
rename : browser/devtools/shared/test/browser_gcli_break.js => browser/devtools/commandline/test/browser_gcli_break.js
rename : browser/devtools/shared/test/browser_gcli_commands.js => browser/devtools/commandline/test/browser_gcli_commands.js
rename : browser/devtools/shared/test/browser_gcli_inspect.html => browser/devtools/commandline/test/browser_gcli_inspect.html
rename : browser/devtools/shared/test/browser_gcli_inspect.js => browser/devtools/commandline/test/browser_gcli_inspect.js
rename : browser/devtools/shared/test/browser_gcli_integrate.js => browser/devtools/commandline/test/browser_gcli_integrate.js
rename : browser/devtools/shared/test/browser_gcli_web.js => browser/devtools/commandline/test/browser_gcli_web.js
rename : browser/devtools/shared/test/browser_gcli_require.js => browser/devtools/shared/test/browser_require_basic.js
2012-05-17 19:04:33 +01:00

38 lines
962 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
// Tests exports from Browser.jsm
const TEST_URI = "data:text/html;charset=utf-8,<p id=id>Text</p>";
let imported = {};
Components.utils.import("resource:///modules/devtools/Browser.jsm", imported);
registerCleanupFunction(function tearDown() {
imported = undefined;
});
function test() {
addTab(TEST_URI, function(browser, tab, document) {
runTest(browser, tab, document);
});
}
function runTest(browser, tab, document) {
let timeout = imported.setTimeout(shouldNotBeCalled, 100);
imported.clearTimeout(timeout);
var p = document.getElementById("id");
ok(p instanceof imported.Node, "Node correctly defined");
ok(p instanceof imported.HTMLElement, "HTMLElement correctly defined");
let timeout = imported.setTimeout(function() {
finish();
}, 100);
}
function shouldNotBeCalled() {
ok(false, "Timeout cleared");
}