Bug 1126911 - Fix rest of test suite. r=gabor

This commit is contained in:
Bobby Holley 2015-02-05 11:07:40 -08:00
parent 22c2498925
commit e7bd96ca2d
5 changed files with 10 additions and 9 deletions

View File

@ -19,7 +19,7 @@
<script type="application/javascript;version=1.8">
function postResults(message) {
window.realParent.postMessage(JSON.stringify(message), "*");
doPostMessage(JSON.stringify(message), "*");
}
onmessage = function(event) {

View File

@ -20,7 +20,7 @@
<script type="application/javascript;version=1.8">
function postResults(message) {
window.realParent.postMessage(JSON.stringify(message), "*");
doPostMessage(JSON.stringify(message), "*");
}
onmessage = function(event) {

View File

@ -224,8 +224,8 @@ function runTest() {
"Iframe's document.nodePrincipal has expected appStatus");
// Because the <iframe mozapp> can't parent its way back to us, we
// provide this handle to our window so it can postMessage to us.
iframe.contentWindow.wrappedJSObject.realParent = window;
// provide this handle it can use to postMessage to us.
Components.utils.exportFunction(window.postMessage.bind(window), iframe.contentWindow, {defineAs: 'doPostMessage'});
// Test what we want to test, viz. whether or not the app can request
// an assertion with an audience the same as or different from its

View File

@ -176,8 +176,9 @@ function runTest() {
);
// Because the <iframe mozapp> can't parent its way back to us, we
// provide this handle to our window so it can postMessage to us.
iframe.contentWindow.wrappedJSObject.realParent = window;
// provide this handle it can use to postMessage to us.
Components.utils.exportFunction(window.postMessage.bind(window), iframe.contentWindow, {defineAs: 'doPostMessage'});
iframe.contentWindow.postMessage({
wantIssuer: app.wantIssuer,
appIndex: _index

View File

@ -331,7 +331,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=933681
iwin.eval(`(function() {
var o = new Object({
primitiveProp: 42, objectProp: { foo: 2 },
xoProp: top.location, hasOwnProperty: 10,
xoProp: top, hasOwnProperty: 10,
get getterProp() { return 2; },
set setterProp(x) { },
get getterSetterProp() { return 3; },
@ -365,7 +365,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=933681
iwin.eval(`var trickyArray = [];
trickyArray.primitiveProp = 42;
trickyArray.objectProp = { foo: 2 };
trickyArray.xoProp = top.location;
trickyArray.xoProp = top;
trickyArray.hasOwnProperty = 10;
Object.defineProperty(trickyArray, 'getterProp', { get: function() { return 2; }});
Object.defineProperty(trickyArray, 'setterProp', { set: function(x) {}});
@ -405,7 +405,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=933681
// Make sure it looks right under the hood.
is(trickyObject.wrappedJSObject.getterProp, 2, "Underlying object has getter");
is(Cu.unwaiveXrays(trickyObject.wrappedJSObject.xoProp), top.location, "Underlying object has xo property");
is(Cu.unwaiveXrays(trickyObject.wrappedJSObject.xoProp), top, "Underlying object has xo property");
// Test getOwnPropertyNames.
var expectedNames = ['objectProp', 'primitiveProp'];