Bug 873661 - Wait both browserloadend and process-created event. r=fabrice

This commit is contained in:
"Kan-Ru Chen (陳侃如)" 2014-02-19 10:55:25 +08:00
Родитель 965184d55f
Коммит a5ec2bb44c
1 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -49,13 +49,13 @@ function runTest() {
// Note that this is the process corresponding to the /inner/ iframe. The
// outer iframe runs in-process (because it has remote=false).
var childID = null;
expectOnlyOneProcessCreated().then(function(chid) {
childID = chid;
return Promise.all(
[expectPriorityChange(childID, 'FOREGROUND'),
expectMozbrowserEvent(iframe, 'loadend')]
);
}).then(function() {
Promise.all(
[expectOnlyOneProcessCreated().then(function(child) {
childID = child;
return expectPriorityChange(childID, 'FOREGROUND');
}),
expectMozbrowserEvent(iframe, 'loadend')]
).then(function() {
// Send the outer iframe into the background. This should change the
// priority of the inner frame's process to BACKGROUND.
var p = expectPriorityChange(childID, 'BACKGROUND');