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

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

Issue 479063003: Minor change - Rename autofill layout test file. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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
Index: LayoutTests/fast/forms/input-autofilled.html
diff --git a/LayoutTests/fast/forms/input-autofilled.html b/LayoutTests/fast/forms/input-autofilled.html
deleted file mode 100644
index b0543e23a7ffd8116b7b8338def20d93f33a777b..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/forms/input-autofilled.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<head>
- <script src="../../resources/js-test.js"></script>
- <script>
- function test() {
- if (window.testRunner) {
- testRunner.dumpAsText();
- }
-
- if (!window.internals) {
- testFailed('This test requires the test harness to run.');
- return;
- }
-
- var field = document.getElementById('field');
- var textarea = document.getElementById('textarea');
- var select = document.getElementById('select');
-
- var computedStyleField = document.defaultView.getComputedStyle(field);
- var computedStyleTextarea = document.defaultView.getComputedStyle(textarea);
- var computedStyleSelect = document.defaultView.getComputedStyle(select);
- var originalForeground = computedStyleField.color;
- var originalBackground = computedStyleField.backgroundColor;
-
- if (originalForeground != computedStyleTextarea.color) {
- testFailed('Unexpected initial foreground color for <textarea> field.');
- return;
- }
- if (originalForeground != computedStyleTextarea.backgroundColor) {
- testFailed('Unexpected initial background color for <textarea> field.');
- return;
- }
-
- if (window.internals) {
- window.internals.setAutofilled(field, true);
- window.internals.setAutofilled(textarea, true);
- window.internals.setAutofilled(select, true);
- }
-
- // Both the foreground and background colors should change.
- computedStyleField = document.defaultView.getComputedStyle(field);
- computedStyleTextarea = document.defaultView.getComputedStyle(textarea);
- computedStyleSelect = document.defaultView.getComputedStyle(select);
- if (computedStyleField.color == originalForeground) {
- testFailed('Foreground color for <input> element did not change when autofilled.');
- return;
- }
- if (computedStyleField.backgroundColor == originalBackground) {
- testFailed('Background color for <input> element did not change when autofilled.');
- return;
- }
- if (computedStyleTextarea.color == originalForeground) {
- testFailed('Foreground color for <textarea> element did not change when autofilled.');
- return;
- }
- if (computedStyleTextarea.backgroundColor == originalBackground) {
- testFailed('Background color for <textarea> element did not change when autofilled.');
- return;
- }
- if (computedStyleSelect.color == originalForeground) {
- testFailed('Foreground color for <select> element did not change when autofilled.');
- return;
- }
- if (computedStyleSelect.backgroundColor == originalBackground) {
- testFailed('Background color for <select> element did not change when autofilled.');
- return;
- }
-
- if (window.internals) {
- window.internals.setAutofilled(field, false);
- window.internals.setAutofilled(textarea, false);
- window.internals.setAutofilled(select, false);
- }
-
- // Colors should be restored.
- computedStyleField = document.defaultView.getComputedStyle(field);
- computedStyleTextarea = document.defaultView.getComputedStyle(textarea);
- computedStyleSelect = document.defaultView.getComputedStyle(select);
- if (computedStyleField.color != originalForeground) {
- testFailed('Foreground color for <input> element did not revert when un-autofilled.');
- return;
- }
- if (computedStyleField.backgroundColor != originalBackground) {
- testFailed('Background color for <input> element did not revert when un-autofilled.');
- return;
- }
- if (computedStyleTextarea.color != originalForeground) {
- testFailed('Foreground color for <textarea> element did not revert when un-autofilled.');
- return;
- }
- if (computedStyleTextarea.backgroundColor != originalBackground) {
- testFailed('Background color for <textarea> element did not revert when un-autofilled.');
- return;
- }
- if (computedStyleSelect.color != originalForeground) {
- testFailed('Foreground color for <select> element did not revert when un-autofilled.');
- return;
- }
- if (computedStyleSelect.backgroundColor != originalBackground) {
- testFailed('Background color for <select> element did not revert when un-autofilled.');
- return;
- }
-
- testPassed('');
- }
- </script>
-
- <style>
- #field, #textarea, #select {
- color: #FFFFFF;
- background-color: #FFFFFF;
- }
- </style>
-</head>
-<body onload="test()">
- This tests that foreground and background colors properly change for autofilled inputs or select options. It can only be run using the test harness.<br>
- <form name="fm">
- <input type="text" id="field" value="Field value">
- <textarea id="textarea"></textarea>
- <select id="select"></select>
- </form>
- <div id="console"></div>
-</body>
« no previous file with comments | « LayoutTests/fast/forms/autofilled-expected.txt ('k') | LayoutTests/fast/forms/input-autofilled-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698