dom/plugins/test/mochitest/test_mixed_case_mime.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/plugins/test/mochitest/test_mixed_case_mime.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,29 @@
     1.4 +<body>
     1.5 +<head>
     1.6 +  <title>Test mixed case mimetype for plugins</title>
     1.7 +  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     1.8 +  <script type="text/javascript" src="utils.js"></script>
     1.9 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    1.10 +<script>
    1.11 +  SimpleTest.expectAssertions(0, 1);
    1.12 +
    1.13 +  SimpleTest.waitForExplicitFinish();
    1.14 +  setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
    1.15 +
    1.16 +  function frameLoaded() {
    1.17 +    var contentDocument = document.getElementById('testframe').contentDocument;
    1.18 +    ok(contentDocument.body.innerHTML.length > 0, "Frame content shouldn't be empty.");
    1.19 +    ok(contentDocument.plugins.length > 0, "Frame content should have a plugin.");
    1.20 +    var plugin = contentDocument.plugins[0];
    1.21 +    is(plugin.type.toLowerCase(), "application/x-second-test", "Should have loaded the second test plugin.");
    1.22 +    SimpleTest.finish();
    1.23 +  }
    1.24 +</script>
    1.25 +</head>
    1.26 +<body>
    1.27 +  <p id="display"></p>
    1.28 +
    1.29 +  <iframe id="testframe" name="testframe" onload="frameLoaded()" src="mixed_case_mime.sjs"></iframe>
    1.30 +
    1.31 +</body>
    1.32 +</html>

mercurial