dom/events/test/test_bug299673-2.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 <html>
     2 <!--
     3 https://bugzilla.mozilla.org/show_bug.cgi?id=299673
     4 -->
     5 <head>
     6   <title>Test #2 for Bug 299673</title>
     7   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     8   <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
     9   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    10 </head>
    11 <body id="Body">
    12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=299673">Mozilla Bug 299673</a>
    13 <p id="display">
    15 		<SELECT id="Select1" onchange="log(event); OpenWindow()" onfocus="log(event); " onblur="log(event)">
    16 			<OPTION selected>option1</OPTION>
    17 			<OPTION>option2</OPTION>
    18 			<OPTION>option3</OPTION>
    19 		</SELECT>
    21 		<INPUT id="Text1" type="text" onfocus="log(event)" onblur="log(event)">
    22 		<INPUT id="Text2" type="text" onfocus="log(event)" onblur="log(event)">
    24 </p>
    25 <div id="content" style="display: none">
    27 </div>
    29 <pre id="test">
    31 <script src="bug299673.js"></script>
    33 <script class="testbody" type="text/javascript">
    35 /** Test #2 for Bug 299673 **/
    36 function doTest(expectedEventLog) {
    37   var eventLogForNewTab = '\
    38  :  Test with browser.link.open_newwindow = 3\n\
    39 : focus top-doc\n\
    40 SELECT(Select1): focus \n\
    41 SELECT(Select1): change \n\
    42  :  >>> OpenWindow\n\
    43 : blur top-doc\n\
    44 INPUT(popupText1): focus \n\
    45  :  <<< OpenWindow\n\
    46 SELECT(Select1): blur \n\
    47 INPUT(popupText1): blur \n\
    48 : blur popup-doc\n\
    49 : focus top-doc\n\
    50 '
    51   setPrefAndDoTest(eventLogForNewTab,'Body',3);  // 3 = open new window as tab
    53 }
    55 todo(false, "Please write a test for bug 299673 that actually works");
    57 </script>
    58 </pre>
    59 </body>
    60 </html>

mercurial