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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-live-pseudo-selectors.html

Issue 1522803002: Move textarea-related tests to fast/forms/textarea/, part 1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@color-uaf
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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <link rel="stylesheet" href="../resources/live-pseudo-selectors.css">
5 <script src="../../../resources/js-test.js"></script>
6 </head>
7 <body>
8 <p id="description"></p>
9 <div id="console"></div>
10 <script>
1 description("This test performs a check that :valid/:invalid CSS psudo selectors are lively applied."); 11 description("This test performs a check that :valid/:invalid CSS psudo selectors are lively applied.");
2 12
3 // Setup for static elements. 13 // Setup for static elements.
4 var form = document.createElement('form'); 14 var form = document.createElement('form');
5 document.body.appendChild(form); 15 document.body.appendChild(form);
6 var nonForm = document.createElement('div'); 16 var nonForm = document.createElement('div');
7 document.body.appendChild(nonForm); 17 document.body.appendChild(nonForm);
8 18
9 function makeInvalid() { 19 function makeInvalid() {
10 var i = document.createElement('textarea'); 20 var i = document.createElement('textarea');
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 el.value = '1234567890'; 104 el.value = '1234567890';
95 shouldBe(elBackground, 'validColor'); 105 shouldBe(elBackground, 'validColor');
96 // Make the value dirty by deleting the last character. 106 // Make the value dirty by deleting the last character.
97 el.focus(); 107 el.focus();
98 el.setSelectionRange(10, 10); 108 el.setSelectionRange(10, 10);
99 eventSender.keyDown('backspace'); 109 eventSender.keyDown('backspace');
100 el.maxLength = 5; 110 el.maxLength = 5;
101 shouldBe(elBackground, 'invalidColor'); 111 shouldBe(elBackground, 'invalidColor');
102 el.maxLength = 10; 112 el.maxLength = 10;
103 shouldBe(elBackground, 'validColor'); 113 shouldBe(elBackground, 'validColor');
114 </script>
115 </body>
116 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698