summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/manual-tests/input-number-localization.html
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-24 11:24:40 +0100
committerBen Murdoch <benm@google.com>2011-06-02 09:53:15 +0100
commit81bc750723a18f21cd17d1b173cd2a4dda9cea6e (patch)
tree7a9e5ed86ff429fd347a25153107221543909b19 /Source/WebCore/manual-tests/input-number-localization.html
parent94088a6d336c1dd80a1e734af51e96abcbb689a7 (diff)
downloadexternal_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.zip
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.gz
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.bz2
Merge WebKit at r80534: Intial merge by Git
Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
Diffstat (limited to 'Source/WebCore/manual-tests/input-number-localization.html')
-rw-r--r--Source/WebCore/manual-tests/input-number-localization.html30
1 files changed, 30 insertions, 0 deletions
diff --git a/Source/WebCore/manual-tests/input-number-localization.html b/Source/WebCore/manual-tests/input-number-localization.html
new file mode 100644
index 0000000..4647aa5
--- /dev/null
+++ b/Source/WebCore/manual-tests/input-number-localization.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Number type input shows and accepts localized numbers</title>
+<style>
+:invalid {
+ border-color: red;
+ -webkit-box-shadow: 4px 4px 8px #ff8888;
+}
+</style>
+</head>
+<body>
+<div id="console"></div>
+
+<p>Output test: The following text field should have a localized representation for "-1234.56".
+e.g. "-1,234.56" for en_US locale, "-1.234,56" for fr_FR locale.</p>
+<div><input type=number value="-1234.56" step=any></div>
+
+<p>Input test: Type a localized representation of a number into the following text field.
+You'll see an equivalent number in the standard format on the bottom of the text field.</p>
+<div><input type=number id=target step=any oninput="handleInput()"></div>
+<div>Standard format: <output id=output></output></div>
+
+<script>
+function handleInput() {
+ document.getElementById('output').value = document.getElementById('target').value;
+}
+</script>
+</body>
+</html>