|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 A simple test of the process priority manager. |
|
5 |
|
6 https://bugzilla.mozilla.org/show_bug.cgi?id=844323 |
|
7 |
|
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." |
|
11 |
|
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. |
|
16 |
|
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> |
|
25 |
|
26 <script type="application/javascript;version=1.7"> |
|
27 "use strict"; |
|
28 |
|
29 SimpleTest.waitForExplicitFinish(); |
|
30 browserElementTestHelpers.setEnabledPref(true); |
|
31 browserElementTestHelpers.addPermission(); |
|
32 browserElementTestHelpers.enableProcessPriorityManager(); |
|
33 |
|
34 function runTest() { |
|
35 var iframe = document.createElement('iframe'); |
|
36 iframe.setAttribute('mozbrowser', true); |
|
37 iframe.src = browserElementTestHelpers.emptyPage1; |
|
38 |
|
39 expectProcessCreated().then(function(childID) { |
|
40 return expectPriorityChange(childID, 'FOREGROUND'); |
|
41 }).then(SimpleTest.finish); |
|
42 |
|
43 document.body.appendChild(iframe); |
|
44 } |
|
45 |
|
46 addEventListener('testready', runTest); |
|
47 |
|
48 </script> |
|
49 </body> |
|
50 </html> |