159
159
g_object_unref (settings);
163
browser_appmenu_visibility (void)
165
MidoriApp* app = midori_app_new (NULL);
166
MidoriBrowser* browser = midori_app_create_browser (app);
167
GtkToolItem* appmenu = midori_window_get_tool_item (MIDORI_WINDOW (browser), "CompactMenu");
168
gboolean menubar_visible;
169
gboolean appmenu_visible;
171
midori_test_log_set_fatal_handler_for_icons ();
173
g_object_get (appmenu, "visible", &appmenu_visible, NULL);
174
g_object_get (browser, "show-menubar", &menubar_visible, NULL);
175
g_assert (menubar_visible == !appmenu_visible);
177
g_object_set (browser, "show-menubar", !menubar_visible, NULL);
179
g_object_get (appmenu, "visible", &appmenu_visible, NULL);
180
g_object_get (browser, "show-menubar", &menubar_visible, NULL);
181
g_assert (menubar_visible == !appmenu_visible);
183
g_object_set (browser, "show-menubar", TRUE, NULL);
185
g_object_get (appmenu, "visible", &appmenu_visible, NULL);
186
g_object_get (browser, "show-menubar", &menubar_visible, NULL);
187
g_assert (menubar_visible && !appmenu_visible);
189
g_object_set (browser, "show-menubar", FALSE, NULL);
191
g_object_get (appmenu, "visible", &appmenu_visible, NULL);
192
g_object_get (browser, "show-menubar", &menubar_visible, NULL);
193
g_assert (!menubar_visible && appmenu_visible);
195
gtk_widget_destroy (GTK_WIDGET (browser));
196
g_object_unref (app);
176
213
g_test_add_func ("/browser/tooltips", browser_tooltips);
177
214
g_test_add_func ("/browser/site_data", browser_site_data);
178
215
g_test_add_func ("/browser/block_uris", browser_block_uris);
216
g_test_add_func ("/browser/appmenu_visibility", browser_appmenu_visibility);
180
218
return g_test_run ();