зеркало из https://github.com/mozilla/gecko-dev.git
Bug 841402 - Remove last piece of EnablePrivilege usage from CSP tests. r=bholley
This commit is contained in:
Родитель
45c0af14f9
Коммит
559e7d3de8
|
@ -21,13 +21,10 @@ function handleRequest(request, response)
|
|||
if (query['scriptedreport']) {
|
||||
// spit back a script that records that the page loaded
|
||||
response.setHeader("Content-Type", "text/javascript", false);
|
||||
response.write('netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");');
|
||||
if (query['double'])
|
||||
response.write('window.parent.parent.parent.frameLoaded("' + query['scriptedreport'] + '", ' +
|
||||
'window.location.toString());');
|
||||
response.write('window.parent.parent.parent.postMessage({call: "frameLoaded", testname: "' + query['scriptedreport'] + '", uri: "window.location.toString()"}, "*");');
|
||||
else
|
||||
response.write('window.parent.parent.frameLoaded("' + query['scriptedreport'] + '", ' +
|
||||
'window.location.toString());');
|
||||
response.write('window.parent.parent.postMessage({call: "frameLoaded", testname: "' + query['scriptedreport'] + '", uri: "window.location.toString()"}, "*");');
|
||||
} else if (query['internalframe']) {
|
||||
// spit back an internal iframe (one that might be blocked)
|
||||
response.setHeader("Content-Type", "text/html", false);
|
||||
|
|
|
@ -21,13 +21,10 @@ function handleRequest(request, response)
|
|||
if (query['scriptedreport']) {
|
||||
// spit back a script that records that the page loaded
|
||||
response.setHeader("Content-Type", "text/javascript", false);
|
||||
response.write('netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");');
|
||||
if (query['double'])
|
||||
response.write('window.parent.parent.parent.frameLoaded("' + query['scriptedreport'] + '", ' +
|
||||
'window.location.toString());');
|
||||
response.write('window.parent.parent.parent.postMessage({call: "frameLoaded", testname: "' + query['scriptedreport'] + '", uri: "window.location.toString()"}, "*");');
|
||||
else
|
||||
response.write('window.parent.parent.frameLoaded("' + query['scriptedreport'] + '", ' +
|
||||
'window.location.toString());');
|
||||
response.write('window.parent.parent.postMessage({call: "frameLoaded", testname: "' + query['scriptedreport'] + '", uri: "window.location.toString()"}, "*");');
|
||||
} else if (query['internalframe']) {
|
||||
// spit back an internal iframe (one that might be blocked)
|
||||
response.setHeader("Content-Type", "text/html", false);
|
||||
|
|
|
@ -113,6 +113,13 @@ var checkTestResults = function() {
|
|||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
window.addEventListener("message", receiveMessage, false);
|
||||
|
||||
function receiveMessage(event) {
|
||||
if (event.data.call && event.data.call == 'frameLoaded')
|
||||
frameLoaded(event.data.testname, event.data.uri);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// set up and go
|
||||
window.examiner = new examiner();
|
||||
|
|
Загрузка…
Ссылка в новой задаче