summaryrefslogtreecommitdiff
path: root/src/tests/elementary/elm_test_config.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-06-23 20:02:41 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-06-24 17:10:21 +0900
commit3ee261780a0f1bf227eb491d2be0974374133192 (patch)
tree300aa23c451eb8cc256bde0447f5b6e7b36f5737 /src/tests/elementary/elm_test_config.c
parent07613bf2f6ef322e6a4b9cf68249b3b8297788b7 (diff)
config: Implement support for audio_mute
Instead of being a key "audio_mute" + another key "channel" I've simply implemented a number of different keys: audio_mute (= all) audio_mute_all audio_mute_effect ...
Diffstat (limited to '')
-rw-r--r--src/tests/elementary/elm_test_config.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/tests/elementary/elm_test_config.c b/src/tests/elementary/elm_test_config.c
index bdedc11..51eee4f 100644
--- a/src/tests/elementary/elm_test_config.c
+++ b/src/tests/elementary/elm_test_config.c
@@ -108,7 +108,6 @@ START_TEST (elm_config_eoapi)
108 //color_overlay_unset 108 //color_overlay_unset
109 CONFIG_CHKB(magnifier_enable, 0); 109 CONFIG_CHKB(magnifier_enable, 0);
110 CONFIG_CHKD(magnifier_scale, 0); 110 CONFIG_CHKD(magnifier_scale, 0);
111 //audio_mute
112 CONFIG_CHKB(window_auto_focus_enable, 0); 111 CONFIG_CHKB(window_auto_focus_enable, 0);
113 CONFIG_CHKB(window_auto_focus_animate, 0); 112 CONFIG_CHKB(window_auto_focus_animate, 0);
114 CONFIG_CHKB(popup_scrollable, 0); 113 CONFIG_CHKB(popup_scrollable, 0);
@@ -116,6 +115,33 @@ START_TEST (elm_config_eoapi)
116 CONFIG_CHKD(transition_duration_factor, 0); 115 CONFIG_CHKD(transition_duration_factor, 0);
117 CONFIG_CHKS(web_backend, old); // no value change (requires web support) 116 CONFIG_CHKS(web_backend, old); // no value change (requires web support)
118 117
118 static const struct {
119 Edje_Channel chan;
120 const char *name;
121 } channels[] = {
122 { EDJE_CHANNEL_EFFECT, "audio_mute_effect" },
123 { EDJE_CHANNEL_BACKGROUND, "audio_mute_background" },
124 { EDJE_CHANNEL_MUSIC, "audio_mute_music" },
125 { EDJE_CHANNEL_FOREGROUND, "audio_mute_foreground" },
126 { EDJE_CHANNEL_INTERFACE, "audio_mute_interface" },
127 { EDJE_CHANNEL_INPUT, "audio_mute_input" },
128 { EDJE_CHANNEL_ALERT, "audio_mute_alert" },
129 { EDJE_CHANNEL_ALL, "audio_mute_all" },
130 { EDJE_CHANNEL_ALL, "audio_mute" },
131 };
132
133 for (unsigned i = 0; i < (sizeof(channels) / sizeof(channels[0])); i++)
134 {
135 Eina_Bool b = elm_config_audio_mute_get(channels[i].chan);
136 if (b != efl_config_bool_get(cfg, channels[i].name))
137 fail(channels[i].name);
138 efl_config_bool_set(cfg, channels[i].name, !b);
139 if(efl_config_bool_get(cfg, channels[i].name) != !b)
140 fail(channels[i].name);
141 if(elm_config_audio_mute_get(channels[i].chan) != !b)
142 fail(channels[i].name);
143 }
144
119 elm_shutdown(); 145 elm_shutdown();
120} 146}
121END_TEST 147END_TEST