2010-04-02 20:29 UTC Acid3 update for :link/:visited privacy changes
David Baron has proposed a possible solution for the :link/:visited privacy problem. I've changed Acid3 so that it won't fail if you implement his proposal. The following is the diff:
--- index.html.prev 2009-08-14 00:00:00.000000000 +0000 +++ index.html 2010-04-02 20:13:49.000000000 +0000 @@ -129,8 +129,12 @@ /* rules specific to the tests below */ #instructions:last-child { white-space: pre-wrap; white-space: x-bogus; } - #linktest:link { display: block; color: red; text-align: center; text-decoration: none; } - #linktest.pending, #linktest:visited { display: none; } + /* replaced for http://dbaron.org/mozilla/visited-privacy with the three rules after it: + #linktest:link { display: block; color: red; text-align: center; text-decoration: none; } + #linktest.pending, #linktest:visited { display: none; } */ + #linktest { position: absolute; left: 17px; top: 18px; color: red; width: 80px; text-decoration: none; font: 900 small-caps 10px sans-serif; } + #linktest:link { color: red; } + #linktest.pending, #linktest:visited { color: white; } #\ { color: transparent; color: hsla(0, 0, 0, 1); position: fixed; top: 10px; left: 10px; font: 40px Arial, sans-serif; } #\ #result, #\ #score { position: fixed; top: 10%; left: 10%; width: 4em; z-index: 1; color: yellow; font-size: 50px; background: fuchsia; border: solid 1em purple; } </style> @@ -1869,7 +1873,7 @@ var iframe = document.getElementById("selectors"); var number = (new Date()).valueOf(); var a = document.createElement('a'); - a.appendChild(document.createTextNode('LINKTEST FAILED')); + a.appendChild(document.createTextNode('YOU SHOULD NOT SEE THIS AT ALL')); // changed text when fixing http://dbaron.org/mozilla/visited-privacy a.setAttribute('id', 'linktest'); a.setAttribute('class', 'pending'); a.setAttribute('href', iframe.getAttribute('src') + "?" + number); @@ -3106,23 +3110,25 @@ }, function () { // test 80: remove the iframes and the object + // (when fixing the test for http://dbaron.org/mozilla/visited-privacy, + // this section was flipped around so the linktest check is done first; + // this is to prevent the 'retry' from failing the second time since by + // then the kungFuDeathGrip has been nullified, if we do it first) + // first, check that the linktest is loaded + var a = document.links[1]; + assert(!(a == null), "linktest was null"); + assert(a.textContent == "YOU SHOULD NOT SEE THIS AT ALL", "linktest link couldn't be found"); // changed text when fixing http://dbaron.org/mozilla/visited-privacy + if (a.hasAttribute('class')) + return "retry"; // linktest onload didn't fire -- could be a networking issue, check that first assert(!(kungFuDeathGrip == null), "kungFuDeathGrip was null"); assert(!(kungFuDeathGrip.parentNode == null), "kungFuDeathGrip.parentNode was null"); + // ok, now remove the iframes kungFuDeathGrip.parentNode.removeChild(kungFuDeathGrip); kungFuDeathGrip = null; // check that the xhtml files worked right assert(notifications['xhtml.1'], "Script in XHTML didn't execute"); assert(!notifications['xhtml.2'], "XML well-formedness error didn't stop script from executing"); assert(!notifications['xhtml.3'], "Script executed despite having wrong namespace"); - // while we're at it, check that the linktest is loaded - // since the other iframes have forcibly loaded by now, we assume that - // there's no way this can't have loaded by now - // (probably a safe bet) - var a = document.links[1]; - assert(!(a == null), "linktest was null"); - assert(a.textContent == "LINKTEST FAILED", "linktest link couldn't be found"); - if (a.hasAttribute('class')) - return "retry"; // linktest onload didn't fire -- could be a networking issue, check that first return 5; },
A new copy of the Acid3 tarball is now available also.