зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1638711 - Allow test_frameNavigation to use the error event to detect when a load was blocked. r=ckerschb
The current state is that we fire error events for content blocking if the error happens synchronously and src was set when the iframe was in-document, or if the error happens asynchronously (from the parent process). This test is currently setting src before appending the iframe to the document, and thus was expecting no error event to be fired. We have other content security tests that do rely on the error event being fired. Since we're doing security checks in the parent, the error event now fires, and this changes the test to report success in that case. Differential Revision: https://phabricator.services.mozilla.com/D75722
This commit is contained in:
Родитель
a5f7dd9b01
Коммит
b9ceacc239
|
@ -26,7 +26,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=840388
|
|||
iframe_test1.setAttribute("id", "test1");
|
||||
iframe_test1.src = baseUrl + "?securePage_navigate_child";
|
||||
iframe_test1.onerror = function() {
|
||||
parent.postMessage({"test": "securePage_navigate_child", "msg": "got an onerror event when loading or navigating testing iframe"}, "http://mochi.test:8888");
|
||||
parent.postMessage({"test": "securePage_navigate_child", "msg": "navigating to insecure iframe blocked on secure page"}, "http://mochi.test:8888");
|
||||
};
|
||||
testContent.appendChild(iframe_test1);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче