ui/composer-web-view.js: Improve keyword detection
Update ComposerPageState.containsKeywords to split on any punctuation, not just spaces, so that text like "see the attachment." will get detected.
This commit is contained in:
parent
5732d23e98
commit
a8ef91f3a8
2 changed files with 52 additions and 23 deletions
|
|
@ -358,6 +358,11 @@ unknown://example6.com
|
|||
).get_js_value()
|
||||
));
|
||||
|
||||
assert(Util.JS.to_bool(run_javascript(
|
||||
@"ComposerPageState.containsKeywords('keyword1.', $complete_keys, $suffix_keys);"
|
||||
).get_js_value()
|
||||
));
|
||||
|
||||
assert(Util.JS.to_bool(run_javascript(
|
||||
@"ComposerPageState.containsKeywords('something.sf1', $complete_keys, $suffix_keys);"
|
||||
).get_js_value()
|
||||
|
|
@ -367,6 +372,12 @@ unknown://example6.com
|
|||
@"ComposerPageState.containsKeywords('something.something.sf2', $complete_keys, $suffix_keys);"
|
||||
).get_js_value()
|
||||
));
|
||||
|
||||
assert(!Util.JS.to_bool(run_javascript(
|
||||
@"ComposerPageState.containsKeywords('http://something/esle.sf2', $complete_keys, $suffix_keys);"
|
||||
).get_js_value()
|
||||
));
|
||||
|
||||
} 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