diff options
author | gue5t <gue5t@midori.launchpad> | 2015-08-16 10:31:01 +0000 |
---|---|---|
committer | RabbitBot <> | 2015-08-16 10:31:01 +0000 |
commit | f9088858d8043279588b3c196424f2cabfdbdbba (patch) | |
tree | abc6231090acb263fa8c5e14e3ad059721a043b4 /tests | |
parent | dbe523b173a6054603abe9f09477c9ee7b5b244a (diff) | |
parent | 4b639dfadb8c2f8eb79ddf30b177f61fb29e5bd6 (diff) | |
download | midori-git-f9088858d8043279588b3c196424f2cabfdbdbba.tar.gz |
Ensure vala knows the prototypes of functions it calls, fixing pointer truncation in tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/actions.vala | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/actions.vala b/tests/actions.vala index b44c891c..90ae8f62 100644 --- a/tests/actions.vala +++ b/tests/actions.vala @@ -20,13 +20,17 @@ void actions_view_page () { var hit_test_result = Object.new (typeof (WebKit.HitTestResult), "context", WebKit.HitTestResultContext.DOCUMENT) as WebKit.HitTestResult; var menu = view.get_page_context_action (hit_test_result); + assert (menu != null); assert (menu.name == "PageContextMenu"); assert (menu.get_by_name ("Back") != null); #if !HAVE_WEBKIT2 - hit_test_result = Object.new (typeof (WebKit.HitTestResult), "context", WebKit.HitTestResultContext.EDITABLE) as WebKit.HitTestResult; - menu = view.get_page_context_action (hit_test_result); - var copy = menu.get_by_name ("Copy"); + var hit_test_result2 = Object.new (typeof (WebKit.HitTestResult), "context", WebKit.HitTestResultContext.EDITABLE) as WebKit.HitTestResult; + var menu2 = view.get_page_context_action (hit_test_result2); + assert (menu2 != null); + assert (menu2.name == "PageContextMenu"); + var copy = menu2.get_by_name ("Copy"); + assert (copy != null); assert (!copy.sensitive); assert (view.web_view.search_text ("flat", true, false, false)); menu = view.get_page_context_action (hit_test_result); |