[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
eric at webkit.org
eric at webkit.org
Thu Feb 4 21:26:51 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 667d3b57f80515e46f6d227028f15dce48c0155e
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 25 03:26:25 2010 +0000
2010-01-24 Kent Tamura <tkent at chromium.org>
Reviewed by Darin Adler.
Improve portability of listbox-selection-2.html
https://bugs.webkit.org/show_bug.cgi?id=33994
- Convert to dumpAsText().
- Determine the height of an item at runtime
* fast/forms/listbox-selection-2-expected.txt: Added.
* fast/forms/listbox-selection-2.html:
* fast/forms/script-tests/listbox-selection-2.js
* platform/mac/fast/forms/listbox-selection-2-expected.checksum: Removed.
* platform/mac/fast/forms/listbox-selection-2-expected.png: Removed.
* platform/mac/fast/forms/listbox-selection-2-expected.txt: Removed.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8200378..69b8b8b 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -2,6 +2,23 @@
Reviewed by Darin Adler.
+ Improve portability of listbox-selection-2.html
+ https://bugs.webkit.org/show_bug.cgi?id=33994
+
+ - Convert to dumpAsText().
+ - Determine the height of an item at runtime
+
+ * fast/forms/listbox-selection-2-expected.txt: Added.
+ * fast/forms/listbox-selection-2.html:
+ * fast/forms/script-tests/listbox-selection-2.js
+ * platform/mac/fast/forms/listbox-selection-2-expected.checksum: Removed.
+ * platform/mac/fast/forms/listbox-selection-2-expected.png: Removed.
+ * platform/mac/fast/forms/listbox-selection-2-expected.txt: Removed.
+
+2010-01-24 Kent Tamura <tkent at chromium.org>
+
+ Reviewed by Darin Adler.
+
HTMLInputElement::valueAsDate setter support for type=week.
https://bugs.webkit.org/show_bug.cgi?id=33986
diff --git a/LayoutTests/fast/forms/listbox-selection-2-expected.txt b/LayoutTests/fast/forms/listbox-selection-2-expected.txt
new file mode 100644
index 0000000..e73fcd6
--- /dev/null
+++ b/LayoutTests/fast/forms/listbox-selection-2-expected.txt
@@ -0,0 +1,19 @@
+<select> selection test for scrolling.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS selectionPattern("sl1") is "10000000000000000"
+PASS selectionPattern("sl1") is "01000000000000000"
+PASS selectionPattern("sl1") is "00000010000000000"
+PASS selectionPattern("sl1") is "00000001000000000"
+PASS selectionPattern("sl1") is "00000001000000000"
+PASS selectionPattern("sl1") is "01000000000000000"
+PASS selectionPattern("sl1") is "00000000000000001"
+PASS selectionPattern("sl2") is "010"
+PASS selectionPattern("sl2") is "010"
+PASS selectionPattern("sl2") is "001"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/forms/listbox-selection-2.html b/LayoutTests/fast/forms/listbox-selection-2.html
index 7f88bf5..a30a624 100644
--- a/LayoutTests/fast/forms/listbox-selection-2.html
+++ b/LayoutTests/fast/forms/listbox-selection-2.html
@@ -1,123 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
- <head>
- <script>
- function setup() {
- var results = document.createElement('div');
- results.id = "res";
- results.appendChild(document.createTextNode("Results:"));
- document.body.appendChild(results);
- }
- function test() {
- setup();
-
- mouseDownOnSelect("sl1", 0, false, false);
- var expectedSelectionResults = new Array(true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false);
- testResults("sl1", expectedSelectionResults, 1);
-
- mouseDownOnSelect("sl1", 1, false, false);
- expectedSelectionResults = new Array(false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false);
- testResults("sl1", expectedSelectionResults, 2);
-
- mouseDownOnSelect("sl1", 6, false, false);
- expectedSelectionResults = new Array(false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false);
- testResults("sl1", expectedSelectionResults, 3);
-
- mouseDownOnSelect("sl1", 7, false, false);
- expectedSelectionResults = new Array(false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false);
- testResults("sl1", expectedSelectionResults, 4);
-
- mouseDownOnSelect("sl1", 8, false, false);
- expectedSelectionResults = new Array(false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false);
- testResults("sl1", expectedSelectionResults, 5);
-
- mouseDownOnSelect("sl1", 0, false, false);
- expectedSelectionResults = new Array(false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false);
- testResults("sl1", expectedSelectionResults, 6);
-
- for (i = 0; i < 9; i++)
- mouseDownOnSelect("sl1", 7, false, false);
- expectedSelectionResults = new Array(false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true);
- testResults("sl1", expectedSelectionResults, 7);
-
- mouseDownOnSelect("sl2", 1, false, false);
- expectedSelectionResults = new Array(false, true, false);
- testResults("sl2", expectedSelectionResults, 8);
-
- mouseDownOnSelect("sl2", 3, false, false);
- expectedSelectionResults = new Array(false, true, false);
- testResults("sl2", expectedSelectionResults, 9);
-
- mouseDownOnSelect("sl2", 2, false, false);
- expectedSelectionResults = new Array(false, false, true);
- testResults("sl2", expectedSelectionResults, 10);
- }
-
- function mouseDownOnSelect(selId, index, shift, meta) {
- var sl = document.getElementById(selId);
- var itemHeight = 14;
- var borderPaddingTop = 15;
- var borderPaddingLeft = 15;
- var y = index * itemHeight - window.pageYOffset + borderPaddingTop;
- var event = document.createEvent("MouseEvent");
- event.initMouseEvent("mousedown", true, true, document.defaultView, 1, sl.offsetLeft + borderPaddingLeft, sl.offsetTop + y, sl.offsetLeft + borderPaddingLeft, sl.offsetTop + y, false, false, shift, meta, 0, document);
- sl.dispatchEvent(event);
- }
-
- function testResults(selId, expectedArr, testNum) {
- var sl = document.getElementById(selId);
- var res = document.getElementById('res');
- var resultsArr = new Array(sl.options.length);
-
- var i;
- for (i=0; i < sl.options.length; i++) {
- resultsArr[i] = sl.options[i].selected;
- }
- var successString = "Failed";
- var success = false;
- if (expectedArr.join() == resultsArr.join()) {
- success = true;
- successString = "Passed";
- }
-
- log("Test " + testNum + " " + successString);
- if (!success) {
- log("<pre> Expected: " + expectedArr.join() + "<br>" + " Actual: " + resultsArr.join() + "</pre>");
- }
- }
-
- function log(msg) {
- var r = document.getElementById('res');
- r.innerHTML = r.innerHTML + "<br>" + msg;
- }
- </script>
- </head>
- <body onload="test()">
-
- <select id="sl1" multiple style="height: 135px; border: 10px solid; padding: 5px;">
- <option>one</option>
- <option>two</option>
- <option>three</option>
- <option>four</option>
- <option>five</option>
- <option>six</option>
- <option>seven</option>
- <option>eight</option>
- <option>nine</option>
- <option>ten</option>
- <option>eleven</option>
- <option>twelve</option>
- <option>thirteen</option>
- <option>fourteen</option>
- <option>fifteen</option>
- <option>sixteen</option>
- <option>seventeen</option>
- </select>
-
- <select id="sl2" multiple style="height: 135px; border: 10px solid; padding: 5px;">
- <option>one</option>
- <option>two</option>
- <option>three</option>
- </select>
-
- </body>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/listbox-selection-2.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
</html>
diff --git a/LayoutTests/fast/forms/script-tests/listbox-selection-2.js b/LayoutTests/fast/forms/script-tests/listbox-selection-2.js
new file mode 100644
index 0000000..0f046d4
--- /dev/null
+++ b/LayoutTests/fast/forms/script-tests/listbox-selection-2.js
@@ -0,0 +1,89 @@
+description('<select> selection test for scrolling.');
+
+var parent = document.createElement('div');
+parent.innerHTML = '<select id="sl1" multiple size=5>'
+ + '<option>one</option>'
+ + '<option>two</option>'
+ + '<option>three</option>'
+ + '<option>four</option>'
+ + '<option>five</option>'
+ + '<option>six</option>'
+ + '<option>seven</option>'
+ + '<option>eight</option>'
+ + '<option>nine</option>'
+ + '<option>ten</option>'
+ + '<option>eleven</option>'
+ + '<option>twelve</option>'
+ + '<option>thirteen</option>'
+ + '<option>fourteen</option>'
+ + '<option>fifteen</option>'
+ + '<option>sixteen</option>'
+ + '<option>seventeen</option>'
+ + '</select>'
+ + '<select id="sl2" multiple style="height: 135px; border: 10px solid; padding: 5px;">'
+ + '<option>one</option>'
+ + '<option>two</option>'
+ + '<option>three</option>'
+ + '</select>';
+document.body.appendChild(parent);
+
+// Determine the item height.
+var sl1 = document.getElementById('sl1');
+var sl2 = document.getElementById('sl2');
+var itemHeight = Math.floor(sl1.offsetHeight / sl1.size);
+sl1.removeAttribute('size');
+var height = itemHeight * 9 + 9;
+sl1.setAttribute('style', 'height: ' + height + 'px; border: 10px solid; padding: 5px;');
+
+function mouseDownOnSelect(selId, index)
+{
+ var sl = document.getElementById(selId);
+ var borderPaddingTop = 15;
+ var borderPaddingLeft = 15;
+ var y = index * itemHeight + itemHeight / 3 - window.pageYOffset + borderPaddingTop;
+ var event = document.createEvent("MouseEvent");
+ event.initMouseEvent("mousedown", true, true, document.defaultView, 1, sl.offsetLeft + borderPaddingLeft, sl.offsetTop + y, sl.offsetLeft + borderPaddingLeft, sl.offsetTop + y, false, false, false, false, 0, document);
+ sl.dispatchEvent(event);
+}
+
+function selectionPattern(selectId)
+{
+ var select = document.getElementById(selectId);
+ var result = "";
+ for (var i = 0; i < select.options.length; i++)
+ result += select.options[i].selected ? '1' : '0';
+ return result;
+}
+
+mouseDownOnSelect("sl1", 0);
+shouldBe('selectionPattern("sl1")', '"10000000000000000"');
+
+mouseDownOnSelect("sl1", 1);
+shouldBe('selectionPattern("sl1")', '"01000000000000000"');
+
+mouseDownOnSelect("sl1", 6);
+shouldBe('selectionPattern("sl1")', '"00000010000000000"');
+
+mouseDownOnSelect("sl1", 7);
+shouldBe('selectionPattern("sl1")', '"00000001000000000"');
+
+mouseDownOnSelect("sl1", 8);
+shouldBe('selectionPattern("sl1")', '"00000001000000000"');
+
+mouseDownOnSelect("sl1", 0);
+shouldBe('selectionPattern("sl1")', '"01000000000000000"');
+
+for (i = 0; i < 9; i++)
+ mouseDownOnSelect("sl1", 7);
+shouldBe('selectionPattern("sl1")', '"00000000000000001"');
+
+mouseDownOnSelect("sl2", 1);
+shouldBe('selectionPattern("sl2")', '"010"');
+
+mouseDownOnSelect("sl2", 3);
+shouldBe('selectionPattern("sl2")', '"010"');
+
+mouseDownOnSelect("sl2", 2);
+shouldBe('selectionPattern("sl2")', '"001"');
+
+var successfullyParsed = true;
diff --git a/LayoutTests/platform/mac/fast/forms/listbox-selection-2-expected.checksum b/LayoutTests/platform/mac/fast/forms/listbox-selection-2-expected.checksum
deleted file mode 100644
index 1d6e4ff..0000000
--- a/LayoutTests/platform/mac/fast/forms/listbox-selection-2-expected.checksum
+++ /dev/null
@@ -1 +0,0 @@
-f70c1eb3557f2c01ed8a263b1d856b5c
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/forms/listbox-selection-2-expected.png b/LayoutTests/platform/mac/fast/forms/listbox-selection-2-expected.png
deleted file mode 100644
index 6905bf0..0000000
Binary files a/LayoutTests/platform/mac/fast/forms/listbox-selection-2-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/fast/forms/listbox-selection-2-expected.txt b/LayoutTests/platform/mac/fast/forms/listbox-selection-2-expected.txt
deleted file mode 100644
index 35ca331..0000000
--- a/LayoutTests/platform/mac/fast/forms/listbox-selection-2-expected.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
- RenderBlock {HTML} at (0,0) size 800x600
- RenderBody {BODY} at (8,8) size 784x584
- RenderBlock (anonymous) at (0,0) size 784x135
- RenderListBox {SELECT} at (2,0) size 99x135 [bgcolor=#FFFFFF] [border: (10px solid #000000)]
- RenderText {#text} at (103,114) size 4x18
- text run at (103,114) width 4: " "
- RenderListBox {SELECT} at (109,0) size 73x135 [bgcolor=#FFFFFF] [border: (10px solid #000000)]
- RenderText {#text} at (0,0) size 0x0
- RenderText {#text} at (0,0) size 0x0
- RenderText {#text} at (0,0) size 0x0
- RenderBlock {DIV} at (0,135) size 784x198
- RenderText {#text} at (0,0) size 50x18
- text run at (0,0) width 50: "Results:"
- RenderBR {BR} at (50,14) size 0x0
- RenderText {#text} at (0,18) size 86x18
- text run at (0,18) width 86: "Test 1 Passed"
- RenderBR {BR} at (86,32) size 0x0
- RenderText {#text} at (0,36) size 86x18
- text run at (0,36) width 86: "Test 2 Passed"
- RenderBR {BR} at (86,50) size 0x0
- RenderText {#text} at (0,54) size 86x18
- text run at (0,54) width 86: "Test 3 Passed"
- RenderBR {BR} at (86,68) size 0x0
- RenderText {#text} at (0,72) size 86x18
- text run at (0,72) width 86: "Test 4 Passed"
- RenderBR {BR} at (86,86) size 0x0
- RenderText {#text} at (0,90) size 86x18
- text run at (0,90) width 86: "Test 5 Passed"
- RenderBR {BR} at (86,104) size 0x0
- RenderText {#text} at (0,108) size 86x18
- text run at (0,108) width 86: "Test 6 Passed"
- RenderBR {BR} at (86,122) size 0x0
- RenderText {#text} at (0,126) size 86x18
- text run at (0,126) width 86: "Test 7 Passed"
- RenderBR {BR} at (86,140) size 0x0
- RenderText {#text} at (0,144) size 86x18
- text run at (0,144) width 86: "Test 8 Passed"
- RenderBR {BR} at (86,158) size 0x0
- RenderText {#text} at (0,162) size 86x18
- text run at (0,162) width 86: "Test 9 Passed"
- RenderBR {BR} at (86,176) size 0x0
- RenderText {#text} at (0,180) size 94x18
- text run at (0,180) width 94: "Test 10 Passed"
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list