gecko-dev/browser/devtools/netmonitor/test/html_json-custom-mime-test-page.html
Felix Crux ac294187f9 Bug 905226 - Identify custom JSON MIME-types as text. r=vporof
MIME types that can't be identified as textual are base64 encoded before
being shown in the Network Monitor tab of the developer tools. This text
detection wasn't identifying "custom" JSON MIME-types like
"application/x-bigcorp-api-json" as being JSON, and consequently they were
shown in a rather unhelpful base64 form.

This patch extends and liberalizes the isTextMimeType method to identify
these forms correctly.
2013-09-20 10:20:44 -04:00

36 lines
784 B
HTML

<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>Network Monitor test page</title>
</head>
<body>
<p>JSONP test</p>
<script type="text/javascript">
function get(aAddress, aCallback) {
var xhr = new XMLHttpRequest();
xhr.open("GET", aAddress, true);
xhr.onreadystatechange = function() {
if (this.readyState == this.DONE) {
aCallback();
}
};
xhr.send(null);
}
function performRequests() {
get("sjs_content-type-test-server.sjs?fmt=json-custom-mime", function() {
// Done.
});
}
</script>
</body>
</html>