summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorojan@chromium.org <ojan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 23:46:16 +0000
committerojan@chromium.org <ojan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 23:46:16 +0000
commit58ff6522b72da7b04ffe08771b9dc64ede284f58 (patch)
tree964f5a035f554da8ded2b9af31046cd0bc9d2a2e
parentae35ad5d26654508714acb559d31b986ebebb495 (diff)
downloadchromium_src-58ff6522b72da7b04ffe08771b9dc64ede284f58.zip
chromium_src-58ff6522b72da7b04ffe08771b9dc64ede284f58.tar.gz
chromium_src-58ff6522b72da7b04ffe08771b9dc64ede284f58.tar.bz2
Fix expectations logic to deal with a few more edge cases.
RELEASE : foo.html = TEXT DEBUG : foo.html = IMAGE The DEBUG line would clobber the RELEASE line before. Also, clear the processed test state in all cases where we change the number of runs that we show (e.g. when switching from the main view to the individual tests view with the default maxResults value). Review URL: http://codereview.chromium.org/442017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33156 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/tools/layout_tests/flakiness_dashboard.html48
1 files changed, 32 insertions, 16 deletions
diff --git a/webkit/tools/layout_tests/flakiness_dashboard.html b/webkit/tools/layout_tests/flakiness_dashboard.html
index cf409f4..5535fe8 100644
--- a/webkit/tools/layout_tests/flakiness_dashboard.html
+++ b/webkit/tools/layout_tests/flakiness_dashboard.html
@@ -443,11 +443,11 @@
}
function getMaxResults() {
- if (currentState.maxResults)
- return currentState.maxResults;
-
- // In individual tests view, show all the results since it renders faster.
- return currentState.tests || currentState.expectationsUpdate ? 750 : 200;
+ if (currentState.expectationsUpdate ||
+ currentState.tests && !currentState.maxResults) {
+ return 750;
+ }
+ return currentState.maxResults || 200;
}
function getMatchingElement(stringToMatch, elementsMap) {
@@ -694,7 +694,13 @@
}
if (platformObject) {
- return platformObject[buildType] || platformObject[ALL];
+ if (platformObject[buildType])
+ return platformObject[buildType]
+
+ if (testObject[ALL] && testObject[ALL][buildType])
+ return testObject[ALL][buildType]
+
+ return platformObject[ALL];
}
return null;
}
@@ -779,17 +785,26 @@
for (var j = 0; j < expectations.length; j++) {
var modifiers = expectations[j].modifiers.split(' ');
addFallbacks(function(platformKey) {
- // Setting the ALL key overrides any previously seen expectations.
- if (platformKey == ALL || !allExpectations[test])
- allExpectations[test] = {};
-
- var testHolder = allExpectations[test];
- if (!testHolder[platformKey])
- testHolder[platformKey] = {}
-
addFallbacks(function(buildTypeKey) {
// Setting the ALL key overrides any previously seen expectations.
- if (buildTypeKey == ALL || !testHolder[platformKey])
+ if (platformKey == ALL) {
+ for (var i = 0; i < PLATFORMS.length; i++) {
+ if (PLATFORMS[i] in allExpectations[test]) {
+ // Setting the ALL key overrides any previously seen
+ // expectations.
+ if (buildTypeKey == ALL)
+ allExpectations[test][PLATFORMS[i]] = {};
+ }
+ }
+ } else if (buildTypeKey == ALL && allExpectations[test]) {
+ allExpectations[test][platformKey] = {}
+ }
+
+ if (!allExpectations[test])
+ allExpectations[test] = {};
+
+ var testHolder = allExpectations[test];
+ if (!testHolder[platformKey])
testHolder[platformKey] = {}
testHolder[platformKey][buildTypeKey] = expectations[j];
@@ -2055,7 +2070,8 @@
delete currentState.tests;
}
- if (key == 'maxResults') {
+ if (key == 'maxResults' || key == 'expectationsUpdate' ||
+ key == 'tests' && !currentState.maxResults) {
// Processing the test results JSON makes assumptions about the number
// of results to show. This makes changing the number of maxResults slow
// but is considerably easier than refactoring all the other code.