mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Suppress warning in webview
unit test (#38398)
`webview.focus` return `Result<(),()>`, hence it gives warning if the result is not handled. Signed-off-by: PotatoCP <Kenzie.Raditya.Tirtarahardja@huawei.com>
This commit is contained in:
parent
a8886c1222
commit
c836ed374c
1 changed files with 4 additions and 4 deletions
|
@ -131,13 +131,13 @@ mod test {
|
|||
assert_eq!(webviews.is_focused, false);
|
||||
|
||||
// focus() makes the given webview the latest in focus order.
|
||||
webviews.focus(id(0, 2));
|
||||
let _ = webviews.focus(id(0, 2));
|
||||
assert_eq!(webviews.focus_order, vec![id(0, 2)]);
|
||||
assert_eq!(webviews.is_focused, true);
|
||||
webviews.focus(id(0, 1));
|
||||
let _ = webviews.focus(id(0, 1));
|
||||
assert_eq!(webviews.focus_order, vec![id(0, 2), id(0, 1)]);
|
||||
assert_eq!(webviews.is_focused, true);
|
||||
webviews.focus(id(0, 3));
|
||||
let _ = webviews.focus(id(0, 3));
|
||||
assert_eq!(webviews.focus_order, vec![id(0, 2), id(0, 1), id(0, 3)]);
|
||||
assert_eq!(webviews.is_focused, true);
|
||||
|
||||
|
@ -147,7 +147,7 @@ mod test {
|
|||
assert_eq!(webviews.is_focused, false);
|
||||
|
||||
// focus() avoids duplicates in focus order, when the given webview has been focused before.
|
||||
webviews.focus(id(0, 1));
|
||||
let _ = webviews.focus(id(0, 1));
|
||||
assert_eq!(webviews.focus_order, vec![id(0, 2), id(0, 3), id(0, 1)]);
|
||||
assert_eq!(webviews.is_focused, true);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue