Debian package: Declare compliance with Debian Policy 4.3.0
[conkeror.git] / tests / simple / theme.js
bloba7336efa79f183a15248b190640cd3ad409f5abb
2 require('walnut.js');
4 walnut_run({
5 test_get_contents_asynchronously_1: function () {
6 assert(get_contents_synchronously("chrome://conkeror/content/conkeror.js"));
7 },
8 test_get_contents_asynchronously_2: function () {
9 assert_null(get_contents_synchronously("chrome://conkeror/content/non-existent.file"));
11 test_get_contents_asynchronously_3: function () {
12 assert(get_contents_synchronously(make_uri("chrome://conkeror/content/conkeror.js")));
14 test_theme_module_was_loaded: function () {
15 assert(theme_load, "theme module was loaded");
17 test_theme1: function () {
18 assert_error(function () { theme_load(" nonexistent theme name!"); });
20 test_theme_load_paths_exists: function () {
21 assert(theme_load_paths);
23 test_default_theme_exists: function () {
24 assert(theme_find("default"));
26 test_theme_location_prop_exists: function () {
27 assert(theme_find("default").location);
29 test_theme_sheets_prop_exists: function () {
30 assert(theme_find("default").sheets);
32 test_theme_find_recycles: function () {
33 let th1 = theme_find("default");
34 let th2 = theme_find("default");
35 assert_equals(th1, th2);
37 test_theme_cssfile_module_1: function () {
38 assert_equals(theme_cssfile_module("foo.css"), "foo");
40 test_theme_cssfile_module_2: function () {
41 assert_equals(theme_cssfile_module("foo--bar.css"), "foo");
43 test_theme_unregister_method_exists: function () {
44 assert(theme_find("default").unregister);
46 test_theme_register_method_exists: function () {
47 assert(theme_find("default").register);
49 test_theme_registered_p_method_exists: function () {
50 assert(theme_find("default").registered_p);
52 });