content/xul/templates/tests/chrome/test_tmpl_xmlquerywithassign.xul

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 <?xml version="1.0"?>
     2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
     3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
     5 <!--
     6   xml query with assign
     7 -->
     9 <window title="XUL Template Tests" width="500" height="600"
    10         onload="test_template();"
    11         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    12   <script type="application/javascript"
    13           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    15   <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
    17   <data id="output">
    18     <hbox id="chrome://mochitests/content/chrome/content/xul/templates/tests/chrome/animals.xml#Chamaeleo-chamaelon">
    19       <button label="Chameleon"/>
    20       <label value="9"/>
    21     </hbox>
    22     <hbox id="chrome://mochitests/content/chrome/content/xul/templates/tests/chrome/animals.xml#Dromaius-novaehollandiae">
    23       <button label="Emu"/>
    24       <label value="3"/>
    25     </hbox>
    26     <hbox id="chrome://mochitests/content/chrome/content/xul/templates/tests/chrome/animals.xml#Tyto-alba">
    27       <button label="Barn Owl"/>
    28       <label value="8"/>
    29     </hbox>
    30     <hbox id="chrome://mochitests/content/chrome/content/xul/templates/tests/chrome/animals.xml#Corvus-corax">
    31       <button label="Raven"/>
    32       <label value="5"/>
    33     </hbox>
    34   </data>
    36 <script src="templates_shared.js"/>
    38 <script>
    39 <![CDATA[
    40 SimpleTest.waitForExplicitFinish();
    42 var testid ="xml query with assign";
    43 var queryType = "xml";
    44 var isTreeBuilder = false;
    45 var needsOpen = false;
    46 var notWorkingYet = false;
    47 var notWorkingYetDynamic = false;
    48 var expectedOutput = document.getElementById("output");
    50 var changes = [];
    51 ]]>
    52 </script>
    54 <vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root" datasources="animals.xml" querytype="xml" ref=".">
    55 <template>
    56 <query expr="class/species">
    57 <assign var="?length" expr="string-length(@name)"/>
    58 </query>
    59 <action>
    60 <hbox uri="?">
    61 <button label="?name"/>
    62 <label value="?length"/>
    63 </hbox>
    64 </action>
    65 </template>
    66 </vbox>
    68 </window>

mercurial