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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-input-element/password.html

Issue 1984023002: Move web-platform-tests to wpt (part 1 of 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-input-element/password.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-input-element/password.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-input-element/password.html
deleted file mode 100644
index 79d9f1910038ecba9a8c6bf7daf99cae010074c6..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-input-element/password.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE html>
-<meta charset=utf-8>
-<title>Password input element</title>
-<link rel="author" title="Denis Ah-Kang" href="mailto:denis@w3.org">
-<link rel="help" href="https://html.spec.whatwg.org/multipage/#password-state-%28type=password%29">
-<script src="../../../../../../resources/testharness.js"></script>
-<script src="../../../../../../resources/testharnessreport.js"></script>
-<div id="log"></div>
-<div style="display: none">
-<input id="password" type="password" />
-<input id=password2 type=password value="password">
-<input id="password_with_value" type="password" value="foobar" />
-</div>
-<script type="text/javascript">
- setup(function() {
- window.password = document.getElementById("password");
- });
-
- test(function() {
- assert_equals(password.value, "");
- assert_equals(document.getElementById("password_with_value").value, "foobar");
- }, "Value returns the current value for password");
-
- test(function() {
- password.value = "A";
- assert_equals(password.value, "A");
- assert_equals(password.getAttribute("value"), null);
- password.value = "B";
- assert_equals(password.value, "B");
- assert_equals(password.getAttribute("value"), null);
- }, "Setting value changes the current value for password, but not the value content attribute");
-
- test(function() {
- // Any LF (\n) must be stripped.
- password.value = "\nAB";
- assert_equals(password.value, "AB");
- password.value = "A\nB";
- assert_equals(password.value, "AB");
- password.value = "AB\n";
- assert_equals(password.value, "AB");
-
- // Any CR (\r) must be stripped.
- password.value = "\rAB";
- assert_equals(password.value, "AB");
- password.value = "A\rB";
- assert_equals(password.value, "AB");
- password.value = "AB\r";
- assert_equals(password.value, "AB");
-
- // Any combinations of LF CR must be stripped.
- password.value = "\r\nAB";
- assert_equals(password.value, "AB");
- password.value = "A\r\nB";
- assert_equals(password.value, "AB");
- password.value = "AB\r\n";
- assert_equals(password.value, "AB");
- password.value = "\r\nA\n\rB\r\n";
- assert_equals(password.value, "AB");
- }, "Value sanitization algorithm should strip line breaks for password");
-
- var pass = document.getElementById('password2');
-
- test(function(){
- assert_equals(pass.value, "password");
- pass.value = " pass word ";
- assert_equals(pass.value, " pass word ");
- }, "sanitization algorithm doesn't strip leading and trailing whitespaces");
-
- test(function(){
- pass.value = "pass\u000Aword";
- assert_equals(pass.value, "password");
- pass.value = "\u000Apassword\u000A";
- assert_equals(pass.value, "password");
- pass.value = "pass\u000Dword";
- assert_equals(pass.value, "password");
- pass.value = "\u000Dpassword\u000D";
- assert_equals(pass.value, "password");
- }, "sanitization algorithm strips line breaks");
-</script>

Powered by Google App Engine
This is Rietveld 408576698