mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
381812 improved testcase for storage stream behaviour when the stream hasn't been written to r=bsmedberg
This commit is contained in:
parent
e450a4c000
commit
af888adb39
@ -60,6 +60,21 @@ function test1()
|
||||
|
||||
var out = ss.getOutputStream(0);
|
||||
var inp2 = ss.newInputStream(0);
|
||||
do_check_eq(inp2.available(), 0);
|
||||
do_check_true(inp2.isNonBlocking());
|
||||
|
||||
var sis =
|
||||
Cc["@mozilla.org/scriptableinputstream;1"]
|
||||
.createInstance(Ci.nsIScriptableInputStream);
|
||||
sis.init(inp2);
|
||||
|
||||
var threw = false;
|
||||
try {
|
||||
sis.read(1);
|
||||
} catch (ex if ex.result == Cr.NS_BASE_STREAM_WOULD_BLOCK) {
|
||||
threw = true;
|
||||
}
|
||||
do_check_true(threw);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user