Index: chrome/content/tests/policy.js =================================================================== --- a/chrome/content/tests/policy.js +++ b/chrome/content/tests/policy.js @@ -60,16 +60,18 @@ let publickey = "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALZc50pEXnz9TSRozwM04rryuaXl/wgUFqV9FHq8HDlkdKvRU0hXhb/AKrSpCJ0NCxHtal1l/kHYlHG9e7Ev6+MCAwEAAQ"; /** * Content: * /test\0127.0.0.1:1234\0Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 */ let adblockkey = "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALZc50pEXnz9TSRozwM04rryuaXl/wgUFqV9FHq8HDlkdKvRU0hXhb/AKrSpCJ0NCxHtal1l/kHYlHG9e7Ev6+MCAwEAAQ==_gM4C/j8KkD2byPeP+THXk1GbLTUm5y+5jbdhcMtnzPMgImIfge0dGCtfU9cxLpe8BnqnEGNhTxpuu4pZxjOHYQ=="; + let dispatchReadyEvent = "document.dispatchEvent(new CustomEvent('abp:frameready', {bubbles: true}));"; + let tests = [ [ "HTML image with relative URL", '', "http://127.0.0.1:1234/test.gif", "image", false, false ], [ "HTML image with absolute URL", @@ -97,17 +99,17 @@ '', "http://127.0.0.1:1234/test.gif", "image", false, true ], [ "CSS background-image", '
', @@ -212,29 +214,28 @@ '}' + 'catch(e){}' + '', "http://127.0.0.1:1234/test.xml", "xmlhttprequest", false, false ], [ "Web worker", '', "http://127.0.0.1:1234/test.js", "script", false, true ], ]; if (window.navigator.mimeTypes["application/x-shockwave-flash"] && window.navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) { @@ -304,23 +305,24 @@ defaultMatcher.add(Filter.fromText("@@||127.0.0.1:1234/test|$~document")); if (stage == 5) defaultMatcher.add(Filter.fromText("@@||127.0.0.1:1234/test|$document,sitekey=" + publickey)); if (!explicitEvent) { if (body.indexOf("2000/svg") >= 0) { - // SVG image: add an onload attribute to the document element - body = body.replace(/(