gecko/browser/metro/base/tests/mochitest/browser_test.js
Jim Mathies 334c23eeee Bug 855090 - Move mochitests into a sub dir within browser/metro/base/tests. r=mbrubeck
--HG--
rename : browser/metro/base/tests/browser_canonizeURL.js => browser/metro/base/tests/mochitest/browser_canonizeURL.js
rename : browser/metro/base/tests/browser_context_menu_tests.js => browser/metro/base/tests/mochitest/browser_context_menu_tests.js
rename : browser/metro/base/tests/browser_context_menu_tests_01.html => browser/metro/base/tests/mochitest/browser_context_menu_tests_01.html
rename : browser/metro/base/tests/browser_context_menu_tests_02.html => browser/metro/base/tests/mochitest/browser_context_menu_tests_02.html
rename : browser/metro/base/tests/browser_context_menu_tests_03.html => browser/metro/base/tests/mochitest/browser_context_menu_tests_03.html
rename : browser/metro/base/tests/browser_context_ui.js => browser/metro/base/tests/mochitest/browser_context_ui.js
rename : browser/metro/base/tests/browser_downloads.js => browser/metro/base/tests/mochitest/browser_downloads.js
rename : browser/metro/base/tests/browser_onscreen_keyboard.html => browser/metro/base/tests/mochitest/browser_onscreen_keyboard.html
rename : browser/metro/base/tests/browser_onscreen_keyboard.js => browser/metro/base/tests/mochitest/browser_onscreen_keyboard.js
rename : browser/metro/base/tests/browser_plugin_input.html => browser/metro/base/tests/mochitest/browser_plugin_input.html
rename : browser/metro/base/tests/browser_plugin_input_keyboard.js => browser/metro/base/tests/mochitest/browser_plugin_input_keyboard.js
rename : browser/metro/base/tests/browser_plugin_input_mouse.js => browser/metro/base/tests/mochitest/browser_plugin_input_mouse.js
rename : browser/metro/base/tests/browser_remotetabs.js => browser/metro/base/tests/mochitest/browser_remotetabs.js
rename : browser/metro/base/tests/browser_sanitize_ui.js => browser/metro/base/tests/mochitest/browser_sanitize_ui.js
rename : browser/metro/base/tests/browser_test.js => browser/metro/base/tests/mochitest/browser_test.js
rename : browser/metro/base/tests/browser_tilegrid.xul => browser/metro/base/tests/mochitest/browser_tilegrid.xul
rename : browser/metro/base/tests/browser_tiles.js => browser/metro/base/tests/mochitest/browser_tiles.js
rename : browser/metro/base/tests/browser_topsites.js => browser/metro/base/tests/mochitest/browser_topsites.js
rename : browser/metro/base/tests/head.js => browser/metro/base/tests/mochitest/head.js
rename : browser/metro/base/tests/res/image01.png => browser/metro/base/tests/mochitest/res/image01.png
rename : browser/metro/base/tests/text-block.html => browser/metro/base/tests/mochitest/text-block.html
2013-03-31 15:35:18 -05:00

31 lines
623 B
JavaScript

// Tests for the test functions in head.js
function test() {
waitForExplicitFinish();
runTests();
}
gTests.push({
desc: "task sanity check",
run: function() {
let sum2plus2 = yield asyncSum(2, 2);
ok(sum2plus2 == 4, "asyncSum responded 2+2=4");
function asyncSum(a, b) {
var defd = Promise.defer();
setTimeout(function(){
defd.resolve(a+b);
}, 25);
return defd.promise;
}
}
});
gTests.push({
desc: "addTab",
run: function testAddTab() {
let tab = yield addTab("http://example.com/");
is(tab, Browser.selectedTab, "The new tab is selected");
}
});