dom/xslt/tests/mochitest/test_bug667315.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 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=667315
     5 -->
     6 <head>
     7   <title>Test for Bug 667315</title>
     8   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    10 </head>
    11 <body>
    12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=667315">Mozilla Bug 667315</a>
    13 <p id="display"></p>
    14 <div id="content" style="display: none">
    16 </div>
    17 <pre id="test">
    18 <script type="application/javascript">
    20 /** Test for Bug 667315 **/
    22 var style =
    23   '<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ' +
    24                   'version="1.0">' +
    25     '<xsl:variable name="var">' +
    26       '<html><p>a</p></html>' +
    27     '</xsl:variable>' +
    28     '<xsl:template match="/">' +
    29       '<xsl:copy-of select="$var" />' +
    30     '</xsl:template>' +
    31   '</xsl:stylesheet>';
    32 var styleDoc = new DOMParser().parseFromString (style, "text/xml");
    34 var data = '<root/>';
    35 var originalDoc = new DOMParser().parseFromString(data, "text/xml");
    37 var processor = new XSLTProcessor();
    38 processor.importStylesheet(styleDoc);
    40 var doc = processor.transformToDocument(originalDoc);
    41 ok(doc instanceof HTMLDocument, "should have switched to html output method");
    43 </script>
    44 </pre>
    45 </body>
    46 </html>

mercurial