Rename ClientWebView to Components.WebView per code style
This commit is contained in:
parent
99d4e1bdce
commit
ceb9c9764a
22 changed files with 72 additions and 72 deletions
|
|
@ -6,22 +6,22 @@
|
|||
*/
|
||||
|
||||
|
||||
public abstract class ClientWebViewTestCase<V> : TestCase {
|
||||
public abstract class Components.WebViewTestCase<V> : TestCase {
|
||||
|
||||
protected V? test_view = null;
|
||||
protected Application.Configuration? config = null;
|
||||
|
||||
protected ClientWebViewTestCase(string name) {
|
||||
protected WebViewTestCase(string name) {
|
||||
base(name);
|
||||
this.config = new Application.Configuration(Application.Client.SCHEMA_ID);
|
||||
this.config.enable_debug = true;
|
||||
ClientWebView.init_web_context(
|
||||
WebView.init_web_context(
|
||||
this.config,
|
||||
File.new_for_path(_BUILD_ROOT_DIR).get_child("src"),
|
||||
File.new_for_path("/tmp") // XXX use something better here
|
||||
);
|
||||
try {
|
||||
ClientWebView.load_resources(GLib.File.new_for_path("/tmp"));
|
||||
WebView.load_resources(GLib.File.new_for_path("/tmp"));
|
||||
} catch (GLib.Error err) {
|
||||
assert_not_reached();
|
||||
}
|
||||
|
|
@ -34,7 +34,7 @@ public abstract class ClientWebViewTestCase<V> : TestCase {
|
|||
protected abstract V set_up_test_view();
|
||||
|
||||
protected virtual void load_body_fixture(string html = "") {
|
||||
ClientWebView client_view = (ClientWebView) this.test_view;
|
||||
WebView client_view = (WebView) this.test_view;
|
||||
client_view.load_html(html);
|
||||
while (!client_view.is_content_loaded) {
|
||||
Gtk.main_iteration();
|
||||
|
|
@ -42,7 +42,7 @@ public abstract class ClientWebViewTestCase<V> : TestCase {
|
|||
}
|
||||
|
||||
protected WebKit.JavascriptResult run_javascript(string command) throws Error {
|
||||
ClientWebView view = (ClientWebView) this.test_view;
|
||||
WebView view = (WebView) this.test_view;
|
||||
view.run_javascript.begin(
|
||||
command, null, (obj, res) => { async_complete(res); }
|
||||
);
|
||||
|
|
@ -5,10 +5,10 @@
|
|||
* (version 2.1 or later). See the COPYING file in this distribution.
|
||||
*/
|
||||
|
||||
public class ClientWebViewTest : TestCase {
|
||||
public class Components.WebViewTest : TestCase {
|
||||
|
||||
public ClientWebViewTest() {
|
||||
base("ClientWebViewTest");
|
||||
public WebViewTest() {
|
||||
base("Components.WebViewTest");
|
||||
add_test("init_web_context", init_web_context);
|
||||
add_test("load_resources", load_resources);
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ public class ClientWebViewTest : TestCase {
|
|||
Application.Client.SCHEMA_ID
|
||||
);
|
||||
config.enable_debug = true;
|
||||
ClientWebView.init_web_context(
|
||||
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
|
||||
|
|
@ -27,7 +27,7 @@ public class ClientWebViewTest : TestCase {
|
|||
|
||||
public void load_resources() throws GLib.Error {
|
||||
try {
|
||||
ClientWebView.load_resources(GLib.File.new_for_path("/tmp"));
|
||||
WebView.load_resources(GLib.File.new_for_path("/tmp"));
|
||||
} catch (GLib.Error err) {
|
||||
assert_not_reached();
|
||||
}
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
* (version 2.1 or later). See the COPYING file in this distribution.
|
||||
*/
|
||||
|
||||
public class Composer.WebViewTest : ClientWebViewTestCase<Composer.WebView> {
|
||||
public class Composer.WebViewTest : Components.WebViewTestCase<Composer.WebView> {
|
||||
|
||||
|
||||
public WebViewTest() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue