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

Side by Side Diff: LayoutTests/fast/forms/url-with-line-break-and-whitespace.html

Issue 836113002: Input type url with line break and leading-trailing whitespace should be stripped. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update 1 : Used testharness.js for LayoutTests. Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/html/forms/URLInputType.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <input type="url" id="input1" value=" homepage " />
5 <input type="url" id="input2" value="home&#x000D;&#x000A;page" />
6 <script>
7 test(function()
8 {
9 var input = document.getElementById("input1");
10 assert_equals(input.value, "homepage");
11 input.value = " home page ";
12 assert_equals(input.value, "home page");
13 input.value = "home\u000Apage";
14 assert_equals(input.value, "homepage");
15 input.value = "home\u000Dpage";
16 assert_equals(input.value, "homepage");
17 input.value = "home\u000D\u000Apage";
18 assert_equals(input.value, "homepage");
19 input = document.getElementById("input2");
20 assert_equals(input.value, "homepage");
21 }, "Input type url with line break and leading-trailing whitespace should be str ipped");
22 </script>
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/forms/URLInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698