From 7ec9ee2d66fa72443584d8ef42c3082a5cbebb7c Mon Sep 17 00:00:00 2001 From: David Fugate Date: Sat, 13 Nov 2010 15:22:20 -0800 Subject: [PATCH] Four or five IE Test Center test cases (ES5 Chapter 10) were corrupted due to a bug in the Test262 XML conversion tool. These have been manually updated, and a bug needs to be filed on the tool when bugs.ecmascript.org comes back online. Fixed an issue involving the Back button on the results page. --- website/default.html | 2 +- website/resources/scripts/global/helper.js | 9 ++++++++- website/resources/scripts/testcases/chapter10.xml | 12 ++++++------ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/website/default.html b/website/default.html index f2d8b19bb2..8593870825 100644 --- a/website/default.html +++ b/website/default.html @@ -119,7 +119,7 @@
Total Tests:
diff --git a/website/resources/scripts/global/helper.js b/website/resources/scripts/global/helper.js index d8b36f74bd..c0e339314a 100644 --- a/website/resources/scripts/global/helper.js +++ b/website/resources/scripts/global/helper.js @@ -93,7 +93,7 @@ function Presenter() { var current = currentSection; // Walk backwards until we reach the global section. - while(current !== globalSection) { + while(current !== globalSection && current.parentSection !== globalSection) { sectionChain.push(current); current = current.parentSection; } @@ -185,6 +185,7 @@ function Presenter() { e.preventDefault(); currentSection = getSectionById(e.target.href.match(/#(.+)$/)[1]); renderCurrentSection(); + table.attr("scrollTop", 0); } /* Go back to the previous section */ @@ -195,6 +196,12 @@ function Presenter() { return; currentSection = currentSection.parentSection; + + // Since users click directly on sub-chapters of the main chapters, don't go back to main + // chapters. + if(currentSection.parentSection === globalSection) + currentSection = globalSection; + renderCurrentSection(); } diff --git a/website/resources/scripts/testcases/chapter10.xml b/website/resources/scripts/testcases/chapter10.xml index fc295d3357..b8ed21a2c7 100644 --- a/website/resources/scripts/testcases/chapter10.xml +++ b/website/resources/scripts/testcases/chapter10.xml @@ -3,11 +3,11 @@
- - - - - + + + + + @@ -19,4 +19,4 @@
- \ No newline at end of file +