Don't use Element.prototype.classList in TestFailures
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jul 2011 21:49:53 +0000 (21:49 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jul 2011 21:49:53 +0000 (21:49 +0000)
commit469e0e248da18a2233a2204e30a736c2a792fe35
tree52c0b2f518e8e50040dcb53c2959f7ab55e6b4a4
parentc6f97e8bca5432863c1f527879b361cd1b7caf4a
Don't use Element.prototype.classList in TestFailures

Safari 5 doesn't support it.

Fixes <http://webkit.org/b/64550> Can't expand flaky tests on TestFailures page in Safari 5

Reviewed by Daniel Bates.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Utilities.js:
(Element.prototype.hasStyleClass):
(Element.prototype.addStyleClass):
(Element.prototype.removeStyleClass):
(Element.prototype.toggleStyleClass):
Added these helper functions which simulate classList functionality.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Utilities_unittests.js:
Added. Tests for the above.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
(ViewController.prototype._domForPossiblyFlakyTests): Changed to use
toggleStyleClass/hasStyleClass instead of classList.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html:
Added Utilities_unittests.js, and reordered the tested files to be in
roughly dependency order (i.e., the lowest-level files are imported
and tested first).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@91029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Utilities.js
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Utilities_unittests.js [new file with mode: 0644]
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html
Tools/ChangeLog