Merge branch 'mainline' into remove-old-msgs-beyond-storage-pref
This commit is contained in:
commit
a6595ebc2f
40 changed files with 2601 additions and 1513 deletions
|
|
@ -35,15 +35,20 @@ public class Composer.WebViewTest : Components.WebViewTestCase<Composer.WebView>
|
|||
}
|
||||
|
||||
public void edit_context() throws Error {
|
||||
assert(!(new WebView.EditContext("0,,,").is_link));
|
||||
assert(new WebView.EditContext("1,,,").is_link);
|
||||
assert(new WebView.EditContext("1,url,,").link_url == "url");
|
||||
assert(!(new WebView.EditContext("0;;;;").is_link));
|
||||
assert(new WebView.EditContext("1;;;;").is_link);
|
||||
assert(new WebView.EditContext("1;url;;;").link_url == "url");
|
||||
|
||||
assert(new WebView.EditContext("0,,Helvetica,").font_family == "sans");
|
||||
assert(new WebView.EditContext("0,,Times New Roman,").font_family == "serif");
|
||||
assert(new WebView.EditContext("0,,Courier,").font_family == "monospace");
|
||||
assert(new WebView.EditContext("0;;Helvetica;;").font_family == "sans");
|
||||
assert(new WebView.EditContext("0;;Times New Roman;;").font_family == "serif");
|
||||
assert(new WebView.EditContext("0;;Courier;;").font_family == "monospace");
|
||||
|
||||
assert(new WebView.EditContext("0,,,12").font_size == 12);
|
||||
assert(new WebView.EditContext("0;;;12;").font_size == 12);
|
||||
|
||||
assert(new WebView.EditContext("0;;;;rgb(0, 0, 0)").font_color == Util.Gtk.rgba(0, 0, 0, 1));
|
||||
assert(new WebView.EditContext("0;;;;rgb(255, 0, 0)").font_color == Util.Gtk.rgba(1, 0, 0, 1));
|
||||
assert(new WebView.EditContext("0;;;;rgb(0, 255, 0)").font_color == Util.Gtk.rgba(0, 1, 0, 1));
|
||||
assert(new WebView.EditContext("0;;;;rgb(0, 0, 255)").font_color == Util.Gtk.rgba(0, 0, 1, 1));
|
||||
}
|
||||
|
||||
public void get_html() throws GLib.Error {
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ class Composer.PageStateTest : Components.WebViewTestCase<Composer.WebView> {
|
|||
Util.JS.to_string(
|
||||
run_javascript(@"new EditContext(document.getElementById('test')).encode()")
|
||||
.get_js_value()
|
||||
).has_prefix("1,url,"));
|
||||
).has_prefix("1;url;"));
|
||||
} catch (Util.JS.Error err) {
|
||||
print("Util.JS.Error: %s\n", err.message);
|
||||
assert_not_reached();
|
||||
|
|
@ -138,7 +138,7 @@ class Composer.PageStateTest : Components.WebViewTestCase<Composer.WebView> {
|
|||
}
|
||||
|
||||
public void edit_context_font() throws Error {
|
||||
string html = "<p id=\"test\" style=\"font-family: Comic Sans; font-size: 144\">para</p>";
|
||||
string html = "<p id=\"test\" style=\"font-family: Comic Sans; font-size: 144; color: #FF7F01\">para</p>";
|
||||
load_body_fixture(html);
|
||||
|
||||
try {
|
||||
|
|
@ -146,7 +146,7 @@ class Composer.PageStateTest : Components.WebViewTestCase<Composer.WebView> {
|
|||
Util.JS.to_string(
|
||||
run_javascript(@"new EditContext(document.getElementById('test')).encode()")
|
||||
.get_js_value()
|
||||
) == "0,,Comic Sans,144");
|
||||
) == "0;;Comic Sans;144;rgb(255, 127, 1)");
|
||||
} catch (Util.JS.Error err) {
|
||||
print("Util.JS.Error: %s\n", err.message);
|
||||
assert_not_reached();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue