mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 480619 - Firefox does not load CSS and images when loading a secure (SSL, https) page for the first time (or after â€کclear private data’) and requires refresh to load properly (test); r=biesi,kaie
This commit is contained in:
parent
5375b192d3
commit
bbafe35620
@ -53,6 +53,7 @@ _TEST_FILES = \
|
||||
|
||||
_CHROME_FILES = \
|
||||
test_bug413909.html \
|
||||
test_bug480619.html \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(_TEST_FILES)
|
||||
|
@ -0,0 +1,66 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test bug 480619</title>
|
||||
<script type="text/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var currentThread = Cc["@mozilla.org/thread-manager;1"].
|
||||
getService(Ci.nsIThreadManager).
|
||||
currentThread;
|
||||
var socketTransportService = Cc["@mozilla.org/network/socket-transport-service;1"].
|
||||
getService(Ci.nsISocketTransportService);
|
||||
|
||||
var tearDown = false;
|
||||
|
||||
var reader = {
|
||||
onInputStreamReady: function(stream) {
|
||||
try {
|
||||
stream.available();
|
||||
SimpleTest.ok(false, "Stream should be in an error state");
|
||||
}
|
||||
catch (e) {
|
||||
SimpleTest.is(e.result, Components.results.NS_ERROR_FAILURE,
|
||||
"The stream should be inside an error state");
|
||||
SimpleTest.ok(tearDown, "The stream should be closed after a teardown of secure decoder ring");
|
||||
}
|
||||
SimpleTest.finish();
|
||||
}
|
||||
};
|
||||
|
||||
var sink = {
|
||||
onTransportStatus: function(transport, status, progress, progressmax) {
|
||||
if (status == Ci.nsISocketTransport.STATUS_CONNECTED_TO) {
|
||||
// Try to logout and tear down the secure decoder ring.
|
||||
// This should close and stream and notify the reader.
|
||||
// The test will time out if this fails.
|
||||
tearDown = true;
|
||||
Cc["@mozilla.org/security/sdr;1"].
|
||||
getService(Ci.nsISecretDecoderRing).
|
||||
logoutAndTeardown();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var transport = socketTransportService.createTransport(["ssl"], 1, "localhost", 4443, null);
|
||||
|
||||
transport.setEventSink(sink, currentThread);
|
||||
|
||||
var inStream = transport.openInputStream(0, 0, 0)
|
||||
.QueryInterface(Ci.nsIAsyncInputStream);
|
||||
|
||||
inStream.asyncWait(reader, Ci.nsIAsyncInputStream.WAIT_CLOSURE_ONLY, 0, currentThread);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user