mirror of
https://github.com/servo/servo.git
synced 2025-08-22 05:45:33 +01:00
Add ability to WPT-test file uploads and fetches, fixes #12322
This commit is contained in:
parent
c2a22bd05e
commit
5e051c08f6
9 changed files with 168 additions and 71 deletions
|
@ -40,7 +40,7 @@ fn test_filemanager() {
|
|||
{
|
||||
// Try to select a dummy file "tests/unit/net/test.txt"
|
||||
let (tx, rx) = ipc::channel().unwrap();
|
||||
chan.send(FileManagerThreadMsg::SelectFile(patterns.clone(), tx, origin.clone())).unwrap();
|
||||
chan.send(FileManagerThreadMsg::SelectFile(patterns.clone(), tx, origin.clone(), None)).unwrap();
|
||||
let selected = rx.recv().expect("Broken channel")
|
||||
.expect("The file manager failed to find test.txt");
|
||||
|
||||
|
@ -88,7 +88,7 @@ fn test_filemanager() {
|
|||
|
||||
{
|
||||
let (tx, rx) = ipc::channel().unwrap();
|
||||
let _ = chan.send(FileManagerThreadMsg::SelectFile(patterns.clone(), tx, origin.clone()));
|
||||
let _ = chan.send(FileManagerThreadMsg::SelectFile(patterns.clone(), tx, origin.clone(), None));
|
||||
|
||||
assert!(rx.try_recv().is_err(), "The thread should not respond normally after exited");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue