dom/plugins/test/crashtests/540114-1.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 class="reftest-wait">
     3 <head>
     4 <script type="text/javascript">
     5 function crashplugin() {
     6   var plugin = document.getElementById('removeme');
     7   var flush_reflow = plugin.offsetHeight; // this may not be necessary
     8   document.body.removeChild(plugin);
     9   // Give the plugin time to crash
    10   setTimeout(function() { document.documentElement.removeAttribute('class') },
    11              1000);
    12 }
    14 function getTestCases() {
    15   return [
    16     { testPassed:
    17       (function () {
    18         // Assuming the same process is used for removeme and checkme
    19         var plugin = document.getElementById('checkme');
    20         try {
    21           plugin.getPaintCount();
    22           return true;
    23         } catch (e) {
    24           return false;
    25         }
    26       }),
    27       testDescription:
    28       (function () {
    29         return "plugin should not crash";
    30       })
    31     }
    32   ];
    33 }
    34 </script>
    35 </head>
    36 <body onload="crashplugin();">
    37 <embed id="checkme" type="application/x-test"/>
    38 <embed id="removeme" type="application/x-test" wmode="window" cleanupwidget="false"/>
    39 </body>
    40 </html>

mercurial