dom/plugins/test/mochitest/test_mixed_case_mime.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <body>
     2 <head>
     3   <title>Test mixed case mimetype for plugins</title>
     4   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     5   <script type="text/javascript" src="utils.js"></script>
     6   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     7 <script>
     8   SimpleTest.expectAssertions(0, 1);
    10   SimpleTest.waitForExplicitFinish();
    11   setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
    13   function frameLoaded() {
    14     var contentDocument = document.getElementById('testframe').contentDocument;
    15     ok(contentDocument.body.innerHTML.length > 0, "Frame content shouldn't be empty.");
    16     ok(contentDocument.plugins.length > 0, "Frame content should have a plugin.");
    17     var plugin = contentDocument.plugins[0];
    18     is(plugin.type.toLowerCase(), "application/x-second-test", "Should have loaded the second test plugin.");
    19     SimpleTest.finish();
    20   }
    21 </script>
    22 </head>
    23 <body>
    24   <p id="display"></p>
    26   <iframe id="testframe" name="testframe" onload="frameLoaded()" src="mixed_case_mime.sjs"></iframe>
    28 </body>
    29 </html>

mercurial