diff options
author | jparent@chromium.org <jparent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-11 01:42:03 +0000 |
---|---|---|
committer | jparent@chromium.org <jparent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-11 01:42:03 +0000 |
commit | 6024ce656f291da0954ad450dcd22570ac119c1b (patch) | |
tree | 2c48b5c273ef72ceb010f7daafcb8d5a9bbee637 /webkit/tools/layout_tests/dashboards | |
parent | 9dbeadb1ed4f28a358a20de556dc5cb4ea51e343 (diff) | |
download | chromium_src-6024ce656f291da0954ad450dcd22570ac119c1b.zip chromium_src-6024ce656f291da0954ad450dcd22570ac119c1b.tar.gz chromium_src-6024ce656f291da0954ad450dcd22570ac119c1b.tar.bz2 |
Make flakiness dashboard "auto"-update expectations feature way less annoying -
switch from using confirms to just html with buttons.
This allows you to switch away from the tab at any time, and allows you to
exit out of updating at any time.
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/486026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34320 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/layout_tests/dashboards')
-rw-r--r-- | webkit/tools/layout_tests/dashboards/dashboard_base.js | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/webkit/tools/layout_tests/dashboards/dashboard_base.js b/webkit/tools/layout_tests/dashboards/dashboard_base.js index 5a1404a8b..a98283a 100644 --- a/webkit/tools/layout_tests/dashboards/dashboard_base.js +++ b/webkit/tools/layout_tests/dashboards/dashboard_base.js @@ -319,11 +319,15 @@ function setQueryParameter(var_args) { for (var i = 0; i < arguments.length; i += 2) { currentState[arguments[i]] = arguments[i + 1]; } - window.location.replace(getPermaLinkURL()); + // Note: We use window.location.hash rather that window.location.replace + // because of bugs in Chrome where extra entries were getting created + // when back button was pressed and full page navigation was occuring. + // TODO: file those bugs. + window.location.hash = getPermaLinkURLHash(); } -function getPermaLinkURL() { - return window.location.pathname + '#' + joinParameters(currentState); +function getPermaLinkURLHash() { + return '#' + joinParameters(currentState); } function joinParameters(stateObject) { @@ -372,6 +376,41 @@ function showPopup(e, html) { popup.style.top = y + document.body.scrollTop + 'px'; } +/** + * Create a new function with some of its arguements + * pre-filled. + * Taken from goog.partial in the Closure library. + * @param {Function} fn A function to partially apply. + * @param {...*} var_args Additional arguments that are partially + * applied to fn. + * @return {!Function} A partially-applied form of the function bind() was + * invoked as a method of. + */ +function partial(fn, var_args) { + var args = Array.prototype.slice.call(arguments, 1); + return function() { + // Prepend the bound arguments to the current arguments. + var newArgs = Array.prototype.slice.call(arguments); + newArgs.unshift.apply(newArgs, args); + return fn.apply(this, newArgs); + }; +}; + +/** + * Returns the keys of the object/map/hash. + * Taken from goog.object.getKeys in the Closure library. + * + * @param {Object} obj The object from which to get the keys. + * @return {!Array.<string>} Array of property keys. + */ +function getKeys(obj) { + var res = []; + for (var key in obj) { + res.push(key); + } + return res; +} + appendJSONScriptElements(); document.addEventListener('mousedown', function(e) { |