Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: third_party/WebKit/LayoutTests/fast/forms/select-clientheight-large-size.html

Issue 1509853008: Move select/option/optgroup-related tests in fast/forms to fast/forms/select. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/forms/select-clientheight-large-size.html
diff --git a/third_party/WebKit/LayoutTests/fast/forms/select-clientheight-large-size.html b/third_party/WebKit/LayoutTests/fast/forms/select-clientheight-large-size.html
deleted file mode 100644
index fb10adb7e0b8aeb93cc4a9f17a07bf246f8357a4..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/forms/select-clientheight-large-size.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<script src="../../resources/js-test.js"></script>
-<div id="output"></div>
-<script>
- description("Tests that select elements cap their size to the size attribute and to 4 when no size is specified.");
-
- function getElemById(elemId) {
- return document.getElementById(elemId);
- }
-
- function clientHeight(elemId) {
- return getElemById(elemId).clientHeight;
- }
-
- function multipleOfElement(elemId, multiple) {
- return clientHeight(elemId) * multiple;
- }
-
- function addSelect(id, numOptions)
- {
- var select = document.createElement("select2");
- var html = '<select multiple id="' + id + '">';
- for (var i = 0; i <= numOptions; i++)
- html += '<option value="' + i + '">' + i + '</option>';
- getElemById('output').innerHTML += html + '</select>';
- }
-
- addSelect('select1', 10);
- addSelect('select2', 16);
-
- shouldBe("clientHeight('select2')", "clientHeight('select1')");
- shouldBeTrue("getElemById('select2').setAttribute('size', '4'); clientHeight('select2') == clientHeight('select1')");
- shouldBeTrue("getElemById('select2').setAttribute('size', '5'); clientHeight('select2') > clientHeight('select1')");
- shouldBeCloseTo("getElemById('select2').setAttribute('size', '8'); clientHeight('select2')", multipleOfElement('select1', 2), 1);
- shouldBeCloseTo("getElemById('select2').setAttribute('size', '12'); clientHeight('select2')", multipleOfElement('select1', 3), 1);
- shouldBeCloseTo("getElemById('select2').setAttribute('size', '16'); clientHeight('select2')", multipleOfElement('select1', 4), 1);
-</script>

Powered by Google App Engine
This is Rietveld 408576698