summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorojan@chromium.org <ojan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-05 02:25:00 +0000
committerojan@chromium.org <ojan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-05 02:25:00 +0000
commit4a89faa5d4e8b7ef84e8a1658359e2bc0dc1f1b1 (patch)
tree5dc529a2c0630663cff3adabb7c932109c4550d1 /webkit
parent38f6ee7da24d9734410b0d0415235b380779ca89 (diff)
downloadchromium_src-4a89faa5d4e8b7ef84e8a1658359e2bc0dc1f1b1.zip
chromium_src-4a89faa5d4e8b7ef84e8a1658359e2bc0dc1f1b1.tar.gz
chromium_src-4a89faa5d4e8b7ef84e8a1658359e2bc0dc1f1b1.tar.bz2
Make the dashboard understand which builder linked to it so that it can use
the right dataset for the v8-latest and webkit.org bots. Review URL: http://codereview.chromium.org/669138 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40706 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/tools/layout_tests/dashboards/dashboard_base.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/webkit/tools/layout_tests/dashboards/dashboard_base.js b/webkit/tools/layout_tests/dashboards/dashboard_base.js
index a98283a..832500e 100644
--- a/webkit/tools/layout_tests/dashboards/dashboard_base.js
+++ b/webkit/tools/layout_tests/dashboards/dashboard_base.js
@@ -68,6 +68,12 @@ function isFailingResult(value) {
return 'FSTOCIZ'.indexOf(value) != -1;
}
+function reloadWindowIfKeyHasNewValue(key) {
+ // Changing certain keys requires reloading the page since it would result
+ // in pulling different JSON files.
+ if (oldState && oldState[key] != currentState[key])
+ window.location.reload();
+}
/**
* Takes a key and a value and sets the currentState[key] = value iff key is
@@ -93,6 +99,21 @@ function handleValidHashParameterWrapper(key, value) {
currentState[key] = value == 'true';
return true;
+ case 'referringBuilder':
+ if (stringContains(value, "(webkit.org)")) {
+ currentState.useWebKitCanary = true;
+ reloadWindowIfKeyHasNewValue('useWebKitCanary');
+ return true;
+ }
+
+ if (stringContains(value, "(V8-Latest)")) {
+ currentState.useV8Canary = true;
+ reloadWindowIfKeyHasNewValue('useV8Canary');
+ return true;
+ }
+
+ return false;
+
case 'buildDir':
currentState['testType'] = 'layout-test-results';
if (value === 'Debug' || value == 'Release') {
@@ -155,6 +176,7 @@ function validateParameter(state, key, value, validateFn) {
* Parses window.location.hash and set the currentState values appropriately.
*/
function parseParameters(parameterStr) {
+ oldState = currentState;
currentState = {};
var params = window.location.hash.substring(1).split('&');
@@ -201,6 +223,10 @@ function appendScript(path) {
// Permalinkable state of the page.
var currentState;
+// Saved value of previous currentState. This is used to detect changing from
+// one set of builders to another, which requires reloading the page.
+var oldState;
+
// Parse cross-dashboard parameters before using them.
parseParameters();