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

Side by Side Diff: webkit/data/layout_tests/chrome/fast/forms/textarea-metrics.html

Issue 500151: Remove two layout tests under chrome/fast/forms ; they've been obsoleted... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: don't remove FAIL expectation for fast/forms/basic-textareas; the test still fails Created 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!Doctype html>
2 <html>
3 <head>
4 <title>Test for metrics of textareas. Should match IE.</title>
5 <link rel="stylesheet" href="../js/resources/js-test-style.css">
6 <script src="../js/resources/js-test-pre.js"></script>
7 <script src="../js/resources/js-test-post-function.js"></script>
8 <script>
9 if (window.layoutTestController) {
10 layoutTestController.waitUntilDone();
11 layoutTestController.dumpAsText();
12 }
13
14 function test()
15 {
16 description("This test checks that textareas have the right metrics.");
17
18 /*
19 TODO(ojan): These numbers match IE. We match IE in non-layout-test-mode.
20 So, I want to keep the numbers. Unfortunately, that means that our
21 baseline will include the word fail until we get rid of our font-fallback and
22 scrollbar metric hacks. The test is still valid though.
23 */
24
25 shouldBe("document.getElementById('empty-textarea').clientWidth", "94");
26 shouldBe("document.getElementById('empty-textarea').clientHeight", "94");
27 shouldBe("document.getElementById('empty-textarea').offsetWidth", "96");
28 shouldBe("document.getElementById('empty-textarea').offsetHeight", "96");
29 shouldBe("document.getElementById('empty-textarea').scrollWidth", "94");
30 shouldBe("document.getElementById('empty-textarea').scrollHeight", "20");
31
32 shouldBe("document.getElementById('empty-textarea-disabled').clientWidth", " 94");
33 shouldBe("document.getElementById('empty-textarea-disabled').clientHeight", "94");
34 shouldBe("document.getElementById('empty-textarea-disabled').offsetWidth", " 96");
35 shouldBe("document.getElementById('empty-textarea-disabled').offsetHeight", "96");
36 shouldBe("document.getElementById('empty-textarea-disabled').scrollWidth", " 94");
37 shouldBe("document.getElementById('empty-textarea-disabled').scrollHeight", "20");
38
39 shouldBe("document.getElementById('textarea-no-scroll').clientWidth", "94");
40 shouldBe("document.getElementById('textarea-no-scroll').clientHeight", "94") ;
41 shouldBe("document.getElementById('textarea-no-scroll').offsetWidth", "96");
42 shouldBe("document.getElementById('textarea-no-scroll').offsetHeight", "96") ;
43 shouldBe("document.getElementById('textarea-no-scroll').scrollWidth", "94");
44 shouldBe("document.getElementById('textarea-no-scroll').scrollHeight", "20") ;
45
46 shouldBe("document.getElementById('textarea-with-scroll').clientWidth", "77" );
47 shouldBe("document.getElementById('textarea-with-scroll').clientHeight", "94 ");
48 shouldBe("document.getElementById('textarea-with-scroll').offsetWidth", "96" );
49 shouldBe("document.getElementById('textarea-with-scroll').offsetHeight", "96 ");
50 shouldBe("document.getElementById('textarea-with-scroll').scrollWidth", "77" );
51 shouldBe("document.getElementById('textarea-with-scroll').scrollHeight", "13 2");
52
53 shouldBe("document.getElementById('textarea-no-scroll-with-padding').clientW idth", "106");
54 shouldBe("document.getElementById('textarea-no-scroll-with-padding').clientH eight", "106");
55 shouldBe("document.getElementById('textarea-no-scroll-with-padding').offsetW idth", "108");
56 shouldBe("document.getElementById('textarea-no-scroll-with-padding').offsetH eight", "108");
57 shouldBe("document.getElementById('textarea-no-scroll-with-padding').scrollW idth", "106");
58 shouldBe("document.getElementById('textarea-no-scroll-with-padding').scrollH eight", "32");
59
60 shouldBe("document.getElementById('textarea-with-scroll-with-padding').clien tWidth", "89");
61 shouldBe("document.getElementById('textarea-with-scroll-with-padding').clien tHeight", "106");
62 shouldBe("document.getElementById('textarea-with-scroll-with-padding').offse tWidth", "108");
63 shouldBe("document.getElementById('textarea-with-scroll-with-padding').offse tHeight", "108");
64 shouldBe("document.getElementById('textarea-with-scroll-with-padding').scrol lWidth", "89");
65 shouldBe("document.getElementById('textarea-with-scroll-with-padding').scrol lHeight", "144");
66
67 shouldBe("document.getElementById('textarea-no-scroll-fixed-height').clientW idth", "94");
68 shouldBe("document.getElementById('textarea-no-scroll-fixed-height').clientH eight", "54");
69 shouldBe("document.getElementById('textarea-no-scroll-fixed-height').offsetW idth", "96");
70 shouldBe("document.getElementById('textarea-no-scroll-fixed-height').offsetH eight", "56");
71 shouldBe("document.getElementById('textarea-no-scroll-fixed-height').scrollW idth", "94");
72 shouldBe("document.getElementById('textarea-no-scroll-fixed-height').scrollH eight", "20");
73
74 shouldBe("document.getElementById('textarea-with-scroll-fixed-height').clien tWidth", "77");
75 shouldBe("document.getElementById('textarea-with-scroll-fixed-height').clien tHeight", "54");
76 shouldBe("document.getElementById('textarea-with-scroll-fixed-height').offse tWidth", "96");
77 shouldBe("document.getElementById('textarea-with-scroll-fixed-height').offse tHeight", "56");
78 shouldBe("document.getElementById('textarea-with-scroll-fixed-height').scrol lWidth", "77");
79 shouldBe("document.getElementById('textarea-with-scroll-fixed-height').scrol lHeight", "132");
80
81 shouldBe("document.getElementById('textarea-no-scroll-fixed-height-many-rows ').clientWidth", "94");
82 shouldBe("document.getElementById('textarea-no-scroll-fixed-height-many-rows ').clientHeight", "54");
83 shouldBe("document.getElementById('textarea-no-scroll-fixed-height-many-rows ').offsetWidth", "96");
84 shouldBe("document.getElementById('textarea-no-scroll-fixed-height-many-rows ').offsetHeight", "56");
85 shouldBe("document.getElementById('textarea-no-scroll-fixed-height-many-rows ').scrollWidth", "94");
86 shouldBe("document.getElementById('textarea-no-scroll-fixed-height-many-rows ').scrollHeight", "20");
87
88 shouldBe("document.getElementById('textarea-with-scroll-fixed-height-many-ro ws').clientWidth", "77");
89 shouldBe("document.getElementById('textarea-with-scroll-fixed-height-many-ro ws').clientHeight", "54");
90 shouldBe("document.getElementById('textarea-with-scroll-fixed-height-many-ro ws').offsetWidth", "96");
91 shouldBe("document.getElementById('textarea-with-scroll-fixed-height-many-ro ws').offsetHeight", "56");
92 shouldBe("document.getElementById('textarea-with-scroll-fixed-height-many-ro ws').scrollWidth", "77");
93 shouldBe("document.getElementById('textarea-with-scroll-fixed-height-many-ro ws').scrollHeight", "132");
94
95 shouldBe("document.getElementById('textarea-no-scroll-disabled').clientWidth ", "94");
96 shouldBe("document.getElementById('textarea-no-scroll-disabled').clientHeigh t", "94");
97 shouldBe("document.getElementById('textarea-no-scroll-disabled').offsetWidth ", "96");
98 shouldBe("document.getElementById('textarea-no-scroll-disabled').offsetHeigh t", "96");
99 shouldBe("document.getElementById('textarea-no-scroll-disabled').scrollWidth ", "94");
100 shouldBe("document.getElementById('textarea-no-scroll-disabled').scrollHeigh t", "20");
101
102 shouldBe("document.getElementById('textarea-with-scroll-disabled').clientWid th", "77");
103 shouldBe("document.getElementById('textarea-with-scroll-disabled').clientHei ght", "94");
104 shouldBe("document.getElementById('textarea-with-scroll-disabled').offsetWid th", "96");
105 shouldBe("document.getElementById('textarea-with-scroll-disabled').offsetHei ght", "96");
106 shouldBe("document.getElementById('textarea-with-scroll-disabled').scrollWid th", "77");
107 shouldBe("document.getElementById('textarea-with-scroll-disabled').scrollHei ght", "132");
108
109 if (window.layoutTestController) {
110 layoutTestController.notifyDone();
111 }
112 }
113
114 var successfullyParsed = true;
115 </script>
116 <style>
117 textarea { overflow-y:auto; font-family:courier new; font-size:13px; width:90px; height:90px; }
118 </style>
119 </head>
120 <body onload="test()">
121 <textarea id="empty-textarea"></textarea>
122 <textarea id="empty-textarea-disabled" disabled></textarea>
123 <textarea id="textarea-no-scroll">Foo</textarea>
124 <textarea id="textarea-with-scroll">Foo Bar Baz Foo Bar Baz Foo Bar Baz Foo Bar Baz Foo Bar Baz</textarea>
125 <textarea id="textarea-no-scroll-with-padding" style="padding:8px">Foo</textarea >
126 <textarea id="textarea-with-scroll-with-padding" style="padding:8px">Foo Bar Baz Foo Bar Baz Foo Bar Baz Foo Bar Baz Foo Bar Baz</textarea>
127 <textarea id="textarea-no-scroll-fixed-height" style="height:50px">Foo</textarea >
128 <textarea id="textarea-with-scroll-fixed-height" style="height:50px">Foo Bar Baz Foo Bar Baz Foo Bar Baz Foo Bar Baz Foo Bar Baz</textarea>
129 <textarea id="textarea-no-scroll-fixed-height-many-rows" rows=50 style="height:5 0px">Foo</textarea>
130 <textarea id="textarea-with-scroll-fixed-height-many-rows" rows=50 style="height :50px">Foo Bar Baz Foo Bar Baz Foo Bar Baz Foo Bar Baz Foo Bar Baz</textarea>
131 <textarea id="textarea-no-scroll-disabled" disabled>Foo</textarea>
132 <textarea id="textarea-with-scroll-disabled" disabled>Foo Bar Baz Foo Bar Baz Fo o Bar Baz Foo Bar Baz Foo Bar Baz</textarea>
133 <p id="description"></p>
134 <div id="console"></div>
135 </body>
136 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698