[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
simon.fraser at apple.com
simon.fraser at apple.com
Wed Dec 22 13:59:48 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 150d08d30cfe94a9d2ccf9497f052a66ee283510
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 1 03:55:48 2010 +0000
2010-09-30 Simon Fraser <simon.fraser at apple.com>
Add a button to jump to the next untested test.
* CSSTestSuiteHarness/harness/harness.css:
(.test-type):
(.name > button):
* CSSTestSuiteHarness/harness/harness.html:
* CSSTestSuiteHarness/harness/harness.js:
(Chapter.prototype.description):
(Chapter.prototype.untestedCount):
(TestSuite.prototype.testInfoDataLoaded):
(TestSuite.prototype.fillChapterPopup):
(TestSuite.prototype.updateChapterPopup):
(TestSuite.prototype.buildTestListForChapter):
(TestSuite.prototype.goToNextIncompleteTest):
(TestSuite.prototype.firstIncompleteTestIndex):
(TestSuite.prototype.testCompletionStateChanged):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/CSSTestSuiteHarness/harness/harness.css b/WebKitTools/CSSTestSuiteHarness/harness/harness.css
index c6571e4..ce3b583 100644
--- a/WebKitTools/CSSTestSuiteHarness/harness/harness.css
+++ b/WebKitTools/CSSTestSuiteHarness/harness/harness.css
@@ -49,6 +49,15 @@ body {
margin: 4px 0;
}
+.test-type {
+ float: left;
+}
+
+.name > button {
+ margin-top: 20px;
+ float: right;
+}
+
.actions {
margin-left: 320px;
border: 1px solid black;
diff --git a/WebKitTools/CSSTestSuiteHarness/harness/harness.html b/WebKitTools/CSSTestSuiteHarness/harness/harness.html
index 24f256e..ce86a23 100644
--- a/WebKitTools/CSSTestSuiteHarness/harness/harness.html
+++ b/WebKitTools/CSSTestSuiteHarness/harness/harness.html
@@ -63,6 +63,11 @@
{
gTestSuite.passTest();
}
+
+ function goToNextUntested()
+ {
+ gTestSuite.goToNextIncompleteTest();
+ }
function formatChanged()
{
@@ -143,11 +148,12 @@
<div><span id="test-index">1</span> of <span id="chapter-test-count">200</span> unique tests</div>
</div>
<div class="details">
- <div class="name">
+ <div class="name">
<div class="test-type">
<input type="radio" name="format" id="html4" onchange="formatChanged()" checked><label for="html4">HTML4</label><br>
<input type="radio" name="format" id="xhtml1" onchange="formatChanged()"><label for="xhtml1">XHTML1</label>
</div>
+ <button onclick="goToNextUntested()" accesskey="n"><strong>N</strong>ext Untested</button>
</div>
</div>
diff --git a/WebKitTools/CSSTestSuiteHarness/harness/harness.js b/WebKitTools/CSSTestSuiteHarness/harness/harness.js
index d24869a..6ed7f7f 100644
--- a/WebKitTools/CSSTestSuiteHarness/harness/harness.js
+++ b/WebKitTools/CSSTestSuiteHarness/harness/harness.js
@@ -229,7 +229,20 @@ function Chapter(chapterInfo)
Chapter.prototype.description = function()
{
- return this.title + ' (' + this.testCount + ' tests)';
+ return this.title + ' (' + this.testCount + ' tests, ' + this.untestedCount() + ' untested)';
+}
+
+Chapter.prototype.untestedCount = function()
+{
+ var count = 0;
+ for (var i = 0; i < this.sections.length; ++i) {
+ var currSection = this.sections[i];
+ for (var j = 0; j < currSection.tests.length; ++j) {
+ count += currSection.tests[j].completed ? 0 : 1;
+ }
+
+ }
+ return count;
}
// Utils
@@ -277,7 +290,7 @@ TestSuite.prototype.testInfoDataLoaded = function(data, status)
this.testInfoLoaded = true;
- this.fillChapterPopup(document.getElementById('chapters'));
+ this.fillChapterPopup();
this.initializeControls();
@@ -363,8 +376,9 @@ TestSuite.prototype.chapterAtIndex = function(index)
return this.chapters[kChapterData[index].file];
}
-TestSuite.prototype.fillChapterPopup = function(select)
+TestSuite.prototype.fillChapterPopup = function()
{
+ var select = document.getElementById('chapters')
select.innerHTML = ''; // Remove all children.
for (var i = 0; i < kChapterData.length; ++i) {
@@ -379,20 +393,41 @@ TestSuite.prototype.fillChapterPopup = function(select)
}
}
+TestSuite.prototype.updateChapterPopup = function()
+{
+ var select = document.getElementById('chapters')
+ var currOption = select.firstChild;
+
+ for (var i = 0; i < kChapterData.length; ++i) {
+ var chapterData = kChapterData[i];
+ var chapter = this.chapters[chapterData.file];
+
+ currOption.innerText = chapter.description();
+ currOption = currOption.nextSibling;
+ }
+}
+
TestSuite.prototype.buildTestListForChapter = function(chapter)
{
- this.currentChapterTests = [];
+ this.currentChapterTests = this.testListForChapter(chapter);
+}
+
+TestSuite.prototype.testListForChapter = function(chapter)
+{
+ var testList = [];
for (var i in chapter.sections) {
var currSection = chapter.sections[i];
// FIXME: why do I need the assignment?
- this.currentChapterTests = this.currentChapterTests.concat(currSection.tests);
+ testList = testList.concat(currSection.tests);
}
// FIXME: test may occur more than once.
- this.currentChapterTests.sort(function(a, b) {
+ testList.sort(function(a, b) {
return a.id.localeCompare(b.id);
});
+
+ return testList;
}
TestSuite.prototype.initializeControls = function()
@@ -513,6 +548,41 @@ TestSuite.prototype.previousTest = function()
}
}
+TestSuite.prototype.goToNextIncompleteTest = function()
+{
+ // Look to the end of this chapter.
+ for (var i = this.currChapterTestIndex + 1; i < this.currentChapterTests.length; ++i) {
+ if (!this.currentChapterTests[i].completed) {
+ this.goToTestIndex(i);
+ return;
+ }
+ }
+
+ // Start looking through later chapter
+ var currChapterIndex = this.indexOfChapter(this.currentChapter);
+ for (var c = currChapterIndex + 1; c < kChapterData.length; ++c) {
+ var chapterData = this.chapterAtIndex(c);
+
+ var testIndex = this.firstIncompleteTestIndex(chapterData);
+ if (testIndex != -1) {
+ this.goToChapterIndex(c);
+ this.goToTestIndex(testIndex);
+ break;
+ }
+ }
+}
+
+TestSuite.prototype.firstIncompleteTestIndex = function(chapter)
+{
+ var chapterTests = this.testListForChapter(chapter);
+ for (var i = 0; i < chapterTests.length; ++i) {
+ if (!chapterTests[i].completed)
+ return i;
+ }
+
+ return -1;
+}
+
/* ------------------------------------------------------- */
TestSuite.prototype.goToTestIndex = function(index)
@@ -1039,8 +1109,8 @@ TestSuite.prototype.markTestCompleted = function(testID)
TestSuite.prototype.testCompletionStateChanged = function()
{
- // update the test list
this.updateTestList();
+ this.updateChapterPopup();
}
TestSuite.prototype.loadTestStatus = function()
@@ -1054,6 +1124,8 @@ TestSuite.prototype.loadTestStatus = function()
_self.testCompletionStateChanged();
}
);
+
+ this.updateChapterPopup();
}
/* -------------------------------------------------------- */
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 8bc2086..d9befc3 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,22 @@
+2010-09-30 Simon Fraser <simon.fraser at apple.com>
+
+ Add a button to jump to the next untested test.
+
+ * CSSTestSuiteHarness/harness/harness.css:
+ (.test-type):
+ (.name > button):
+ * CSSTestSuiteHarness/harness/harness.html:
+ * CSSTestSuiteHarness/harness/harness.js:
+ (Chapter.prototype.description):
+ (Chapter.prototype.untestedCount):
+ (TestSuite.prototype.testInfoDataLoaded):
+ (TestSuite.prototype.fillChapterPopup):
+ (TestSuite.prototype.updateChapterPopup):
+ (TestSuite.prototype.buildTestListForChapter):
+ (TestSuite.prototype.goToNextIncompleteTest):
+ (TestSuite.prototype.firstIncompleteTestIndex):
+ (TestSuite.prototype.testCompletionStateChanged):
+
2010-09-29 Jon Honeycutt <jhoneycutt at apple.com>
WebKit2 on Windows should use Windows fonts for the various standard
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list