geary/test/client/components/components-web-view-test.vala
Michael James Gratton d7af23201c Revert "Revert "Merge branch 'mjog/558-webkit-shared-process' into 'mainline'""
This reverts commit cbe6e0ba9b, which reinstates
commit e4a5b85698.

See !411 and !374
2020-10-13 00:02:02 +11:00

36 lines
1.1 KiB
Vala

/*
* Copyright 2016 Michael Gratton <mike@vee.net>
*
* This software is licensed under the GNU Lesser General Public License
* (version 2.1 or later). See the COPYING file in this distribution.
*/
public class Components.WebViewTest : TestCase {
public WebViewTest() {
base("Components.WebViewTest");
add_test("init_web_context", init_web_context);
add_test("load_resources", load_resources);
}
public void init_web_context() throws Error {
Application.Configuration config = new Application.Configuration(
Application.Client.SCHEMA_ID
);
config.enable_debug = true;
WebView.init_web_context(
config,
File.new_for_path(_BUILD_ROOT_DIR).get_child("src"),
File.new_for_path("/tmp") // XXX use something better here
);
}
public void load_resources() throws GLib.Error {
try {
WebView.load_resources(GLib.File.new_for_path("/tmp"));
} catch (GLib.Error err) {
assert_not_reached();
}
}
}