2
Copyright (C) 2014 Christian Dywan <christian@twotoasts.de>
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Lesser General Public
6
License as published by the Free Software Foundation; either
7
version 2.1 of the License, or (at your option) any later version.
9
See the file COPYING for the full license text.
12
void notebook_menu () {
13
var notebook = new Midori.Notebook ();
14
/* FIXME: we should just use a Tab but currently it has no title property */
15
var tab = new Midori.View.with_title ("a_fairy_tale", new Midori.WebSettings ());
16
/*var tab = new Midori.View.with_title (null, new Midori.WebSettings ());
17
view.set_html ("<title>a_fairy_tale</title><body>The earth is <em>flat</em> for a fact.</body>");
18
var loop = MainContext.default ();
19
do { loop.iteration (true); } while (view.load_status != Midori.LoadStatus.FINISHED);*/
20
notebook.insert (tab, 0);
21
var menu = notebook.get_context_action ();
22
var tab_menu = menu.get_by_name ("Tab0");
23
assert (tab_menu != null);
24
/* The underscores should be escaped */
25
Katze.assert_str_equal ("Tab0", tab_menu.label, "a__fairy__tale");
28
void main (string[] args) {
30
Midori.App.setup (ref args, null);
31
Test.add_func ("/notebook/menu", notebook_menu);