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

Unified Diff: LayoutTests/fast/forms/autofilled.html

Issue 553983012: Turn off autofill highlight when changing option in an autofilled <select> element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add NeedRebaseline for test code. Created 6 years, 3 months 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
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/forms/autofilled-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/autofilled.html
diff --git a/LayoutTests/fast/forms/autofilled.html b/LayoutTests/fast/forms/autofilled.html
index 2d667cf0836d2c97c1dd3550ee0173e22bd7f663..ee322fc5ff620462699924bccd83d063a173c1fb 100644
--- a/LayoutTests/fast/forms/autofilled.html
+++ b/LayoutTests/fast/forms/autofilled.html
@@ -30,6 +30,7 @@ function test() {
textarea2.value = 'autofilled is true';
var select1 = document.getElementById('select1');
select2 = document.getElementById('select2');
+ var select3 = document.getElementById('select3');
shouldBe('foregroundOf(textarea1)', 'originalForeground');
shouldBe('backgroundOf(textarea1)', 'originalBackground');
@@ -40,6 +41,7 @@ function test() {
window.internals.setAutofilled(textarea2, true);
window.internals.setAutofilled(select1, true);
window.internals.setAutofilled(select2, true);
+ window.internals.setAutofilled(select3, true);
shouldBeEqualToString('search.value', 'Search value');
@@ -56,6 +58,8 @@ function test() {
shouldNotBe('backgroundOf(select1)', 'originalBackground');
shouldNotBe('foregroundOf(select2)', 'originalForeground');
shouldNotBe('backgroundOf(select2)', 'originalBackground');
+ shouldNotBe('foregroundOf(select3)', 'originalForeground');
+ shouldNotBe('backgroundOf(select3)', 'originalBackground');
// Remove an unselected option from <select> element. This should not affect the background color for the autofilled <select> element.
shouldBe('select2.options.length', '3');
@@ -88,6 +92,9 @@ function test() {
// Remove selected option for select2 element
select2.removeChild(select2[select2.selectedIndex]);
+ // Change selected option for select3 element
+ select3.selectedIndex = 2;
+
// Colors should be restored.
shouldBe('foregroundOf(field)', 'originalForeground');
shouldBe('backgroundOf(field)', 'originalBackground');
@@ -101,11 +108,13 @@ function test() {
shouldBe('backgroundOf(select1)', 'originalBackground');
shouldBe('foregroundOf(select2)', 'originalForeground');
shouldBe('backgroundOf(select2)', 'originalBackground');
+ shouldBe('foregroundOf(select3)', 'originalForeground');
+ shouldBe('backgroundOf(select3)', 'originalBackground');
}
</script>
<style>
-#field, #search, #textarea1, #textarea2, #select1, #select2 {
+#field, #search, #textarea1, #textarea2, #select1, #select2, #select3 {
color: #FFFFFF;
background-color: #FFFFFF;
}
@@ -124,6 +133,11 @@ function test() {
<option >2</option>
<option>3</option>
</select>
+ <select id="select3">
+ <option selected>1</option>
+ <option >2</option>
+ <option>3</option>
+ </select>
</form>
<div id="console"></div>
</body>
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/forms/autofilled-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698