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

Unified Diff: third_party/WebKit/LayoutTests/fast/forms/basic-textareas.html

Issue 1524663002: Move textarea-related tests to fast/forms/textarea/, part 2. (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/basic-textareas.html
diff --git a/third_party/WebKit/LayoutTests/fast/forms/basic-textareas.html b/third_party/WebKit/LayoutTests/fast/forms/basic-textareas.html
deleted file mode 100644
index 9aafd25b4ea00c1b0c4d11479b0f8df76b75b0e5..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/forms/basic-textareas.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<html>
-<body>
-<script>
-var docToAppendTo;
-function addTextarea(properties, opt_innerHTML) {
- var title = docToAppendTo.createTextNode('');
- title.nodeValue = '';
- var wrapper = docToAppendTo.createElement('div');
- wrapper.style.cssText = 'display:inline-block;border:1px solid blue;font-size:12px;';
- var textarea = docToAppendTo.createElement('textarea');
- for (property in properties) {
- var value = properties[property];
- title.nodeValue += property + ': "' + value + '", ';
- if (property == 'wrap')
- textarea.setAttribute(property, value);
- else if (property == 'style')
- textarea.style.cssText = value;
- else
- textarea[property] = value;
- }
- textarea.innerHTML = opt_innerHTML ||
- "Lorem ipsum dolor ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuv";
-
- var span = document.createElement('span');
- span.style.cssText = 'display:inline-block;width:80px;';
- span.appendChild(title);
- wrapper.appendChild(span);
- wrapper.appendChild(document.createElement('br'));
- wrapper.appendChild(textarea)
- docToAppendTo.body.appendChild(wrapper);
-}
-
-function addAllTextareas(iframe, compatMode) {
- iframe.style.cssText = 'width:100%;border:0;'
- docToAppendTo = iframe.contentWindow.document;
-
- docToAppendTo.body.style.cssText = 'margin:0';
-
- if (docToAppendTo.compatMode != compatMode)
- testFailed('This document should be in ' + compatMode + ' mode.');
-
- var compatModeTitle = docToAppendTo.createElement('div');
- compatModeTitle.innerHTML = 'CompatMode: ' + docToAppendTo.compatMode;
- compatModeTitle.style.cssText = 'margin:5px 0;font-weight:bold;';
- docToAppendTo.body.appendChild(compatModeTitle);
-
- addTextarea({}, 'Lorem ipsum dolor');
- addTextarea({disabled: 'true'});
- addTextarea({style: 'padding:10px'});
- addTextarea({style: 'padding:0px'});
- addTextarea({style: 'margin:10px'});
- addTextarea({style: 'margin:0px'});
- addTextarea({style: 'width:60px'});
- addTextarea({style: 'width:60px; padding:20px'});
- addTextarea({style: 'width:60px; padding:0'});
- addTextarea({style: 'height:60px'});
- addTextarea({style: 'width:60px; height:60px'});
- addTextarea({style: 'overflow:hidden'});
- addTextarea({style: 'overflow:scroll'});
- addTextarea({style: 'overflow:hidden; width:60px; height:60px'});
- addTextarea({style: 'overflow:scroll; width:60px; height:60px'});
- addTextarea({cols: 5, style: 'width:60px; height:60px'});
- addTextarea({rows: 4, style: 'width:60px; height:60px'});
- addTextarea({cols: 5, rows: 4, style: 'width:60px; height:60px'});
- addTextarea({cols: 3});
- addTextarea({rows: 3});
- addTextarea({cols: 7});
- addTextarea({rows: 7});
- addTextarea({cols: 5, rows: 4});
- addTextarea({wrap: 'off'});
- addTextarea({wrap: 'hard'});
- addTextarea({wrap: 'soft'});
- addTextarea({style: 'white-space:normal'});
- addTextarea({style: 'white-space:pre'});
- addTextarea({style: 'white-space:prewrap'});
- addTextarea({style: 'white-space:nowrap'});
- addTextarea({style: 'white-space:pre-line'});
- addTextarea({style: 'word-wrap:normal'});
- addTextarea({wrap: 'off', style: 'white-space:pre-wrap'});
-
- iframe.style.height = docToAppendTo.body.offsetHeight + 5 + 'px';
-}
-
-document.body.style.margin = 0;
-
-var standardsIframe = document.createElement('iframe');
-// Reference a page with a doctype so it's standards mode.
-standardsIframe.src = 'resources/basic-textareas-standards.html';
-standardsIframe.onload = function(e) {
- addAllTextareas(e.target, 'CSS1Compat');
-}
-document.body.appendChild(standardsIframe);
-
-var quirksIframe = document.createElement('iframe');
-quirksIframe.onload = function(e) {
- addAllTextareas(e.target, 'BackCompat');
-}
-document.body.appendChild(quirksIframe);
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698