mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1588232 - Add OOP iframes to tresize test r=stephendonner,perftest-reviewers,mconley
In brief, this just includes two out-of-process iframes in the tresize test page, so that when we are resizing the main window, we will also be resizing in each of the other fission processes. The current tresize test is registered at a chrome:// URL, so I had to make it an http URL to have OOP http iframes, which meant I had to adjust a bit of the framescriptery to account for this. Differential Revision: https://phabricator.services.mozilla.com/D55572 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
63935c0afe
commit
98bb4e5040
@ -8,28 +8,12 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
Services: "resource://gre/modules/Services.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
this,
|
||||
"aomStartup",
|
||||
"@mozilla.org/addons/addon-manager-startup;1",
|
||||
"amIAddonManagerStartup"
|
||||
);
|
||||
|
||||
/* globals ExtensionAPI */
|
||||
|
||||
const PREFIX = "tresize@mozilla.org";
|
||||
|
||||
this.tresize = class extends ExtensionAPI {
|
||||
onStartup() {
|
||||
const manifestURI = Services.io.newURI(
|
||||
"manifest.json",
|
||||
null,
|
||||
this.extension.rootURI
|
||||
);
|
||||
this.chromeHandle = aomStartup.registerChrome(manifestURI, [
|
||||
["content", "tresize", "chrome/"],
|
||||
]);
|
||||
|
||||
let { baseURI } = this.extension;
|
||||
|
||||
this.listener = function listener({ target, data }) {
|
||||
@ -67,6 +51,5 @@ this.tresize = class extends ExtensionAPI {
|
||||
`${PREFIX}:chrome-run-message`,
|
||||
this.listener
|
||||
);
|
||||
this.chromeHandle.destruct();
|
||||
}
|
||||
};
|
||||
|
@ -13,24 +13,12 @@ function runTest() {
|
||||
);
|
||||
}
|
||||
|
||||
function logResults(data) {
|
||||
let error = data.error;
|
||||
if (data.average) {
|
||||
if (window.tpRecordTime) {
|
||||
window.tpRecordTime(data.average);
|
||||
}
|
||||
} else {
|
||||
error = "data.average and/or window.tpRecordTime is missing!";
|
||||
}
|
||||
|
||||
if (error) {
|
||||
dump(`TRESIZE ERROR: ${error}\n`);
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body id="body" onload="runTest();">
|
||||
<div style="text-align:center; margin-left:auto; margin-right:auto; background-color:Silver; width:100px; height:100%;">RESIZE</div>
|
||||
<iframe src="http://fakedomain1.talos/tests/tresize/tresize-iframe.html" style="position: absolute; top: 0px; width: 25%; height: 25%;"></iframe>
|
||||
<iframe src="http://fakedomain2.talos/tests/tresize/tresize-iframe.html" style="position: absolute; top: 0px; right: 0px; width: 25%; height: 25%;"></iframe>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -16,7 +16,7 @@
|
||||
) {
|
||||
if (reply.data.id == uniqueMessageId) {
|
||||
removeMessageListener(TRESIZE_PREFIX + "chrome-run-reply", done);
|
||||
content.wrappedJSObject.logResults(reply.data.result);
|
||||
content.wrappedJSObject.tpRecordTime(reply.data.result.average);
|
||||
}
|
||||
});
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
locationSearch: e.detail.locationSearch,
|
||||
});
|
||||
},
|
||||
false
|
||||
false,
|
||||
true
|
||||
);
|
||||
})();
|
||||
|
11
testing/talos/talos/tests/tresize/tresize-iframe.html
Normal file
11
testing/talos/talos/tests/tresize/tresize-iframe.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body id="body">
|
||||
<div style="text-align:center; margin-left:auto; margin-right:auto; background-color:green; width:50px; height:100%;">IFRAME</div>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,2 +1 @@
|
||||
% chrome://tresize/content/tresize-test.html
|
||||
|
||||
% http://fakedomain/tests/tresize/addon/chrome/tresize-test.html
|
||||
|
Loading…
Reference in New Issue
Block a user