dom/browser-element/mochitest/priority/test_Simple.html

Wed, 31 Dec 2014 06:55:46 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:46 +0100
changeset 1
ca08bd8f51b2
permissions
-rw-r--r--

Added tag TORBROWSER_REPLICA for changeset 6474c204b198

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 A simple test of the process priority manager.
     6 https://bugzilla.mozilla.org/show_bug.cgi?id=844323
     8 Note: If you run this test alone (i.e. not as part of the larger mochitest
     9 suite), you may see some IPC assertions, e.g. "Can't allocate graphics
    10 resources."
    12 What appears to be happening is that we close the Firefox window before the
    13 frame we create in this tab finishes starting up.  Then the frame finishes
    14 loading, and it tries to show itself.  But it's too late to show a remote frame
    15 at that point, so we kill the child process.
    17 In other words, I think these errors are nothing to worry about.
    18 -->
    19 <head>
    20   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    21   <script type="application/javascript" src="../browserElementTestHelpers.js"></script>
    22   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    23 </head>
    24 <body>
    26 <script type="application/javascript;version=1.7">
    27 "use strict";
    29 SimpleTest.waitForExplicitFinish();
    30 browserElementTestHelpers.setEnabledPref(true);
    31 browserElementTestHelpers.addPermission();
    32 browserElementTestHelpers.enableProcessPriorityManager();
    34 function runTest() {
    35   var iframe = document.createElement('iframe');
    36   iframe.setAttribute('mozbrowser', true);
    37   iframe.src = browserElementTestHelpers.emptyPage1;
    39   expectProcessCreated().then(function(childID) {
    40     return expectPriorityChange(childID, 'FOREGROUND');
    41   }).then(SimpleTest.finish);
    43   document.body.appendChild(iframe);
    44 }
    46 addEventListener('testready', runTest);
    48 </script>
    49 </body>
    50 </html>

mercurial