dom/plugins/test/mochitest/test_mixed_case_mime.html

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     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