summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/manual-tests
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-25 19:08:45 +0100
committerSteve Block <steveblock@google.com>2011-06-08 13:51:31 +0100
commit2bde8e466a4451c7319e3a072d118917957d6554 (patch)
tree28f4a1b869a513e565c7760d0e6a06e7cf1fe95a /Source/WebCore/manual-tests
parent6939c99b71d9372d14a0c74a772108052e8c48c8 (diff)
downloadexternal_webkit-2bde8e466a4451c7319e3a072d118917957d6554.zip
external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.gz
external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.bz2
Merge WebKit at r82507: Initial merge by git
Change-Id: I60ce9d780725b58b45e54165733a8ffee23b683e
Diffstat (limited to 'Source/WebCore/manual-tests')
-rw-r--r--Source/WebCore/manual-tests/autocorrection/close-window-when-correction-is-shown.html48
-rw-r--r--Source/WebCore/manual-tests/database-callback-deferred.html17
-rw-r--r--Source/WebCore/manual-tests/input-number-localization.html6
-rw-r--r--Source/WebCore/manual-tests/media-default-playback-rate.html90
-rw-r--r--Source/WebCore/manual-tests/print-after-window-close.html8
-rw-r--r--Source/WebCore/manual-tests/selection-start-after-inserting-line-break-in-textarea.html25
6 files changed, 174 insertions, 20 deletions
diff --git a/Source/WebCore/manual-tests/autocorrection/close-window-when-correction-is-shown.html b/Source/WebCore/manual-tests/autocorrection/close-window-when-correction-is-shown.html
new file mode 100644
index 0000000..5c82a20
--- /dev/null
+++ b/Source/WebCore/manual-tests/autocorrection/close-window-when-correction-is-shown.html
@@ -0,0 +1,48 @@
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+</style>
+<script src=../../../../LayoutTests/editing/editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+function editingTest() {
+ typeCharacterCommand('t');
+ typeCharacterCommand('h');
+ typeCharacterCommand('e');
+ typeCharacterCommand(' ');
+ typeCharacterCommand('m');
+ typeCharacterCommand('e');
+ typeCharacterCommand('s');
+ typeCharacterCommand('a');
+ typeCharacterCommand('e');
+ typeCharacterCommand('g');
+ typeCharacterCommand('e');
+ typeCharacterCommand('e');
+ typeCharacterCommand(' ');
+ execMoveSelectionBackwardByCharacterCommand();
+}
+
+</script>
+
+<title>Testing closing window when correction suggestion is shown</title>
+</head>
+<body>
+<div><p>This test verifies that when correction suggestion is visible, closing window doesn't hang or crash.</p>
+<p>After seeing the panel with multiple candidates, close the window.</p>
+<div contenteditable id="root" class="editing">
+<span id="test"></span>
+</div>
+
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/Source/WebCore/manual-tests/database-callback-deferred.html b/Source/WebCore/manual-tests/database-callback-deferred.html
deleted file mode 100644
index cf3d03a..0000000
--- a/Source/WebCore/manual-tests/database-callback-deferred.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
-<script>
-function test() {
- function transactionCallback()
- {
- document.getElementById("result").innerHTML = "Callback was called. Test passed";
- }
- var db = openDatabase("DatabaseCallbackDeferred", "1.0", "", 1);
- db.transaction(function(tx) { tx.executeSql("CREATE TABLE IF NOT EXISTS CallbackDeferredTest (randomData)", []); }, transactionCallback, transactionCallback);
-
- alert("Wait for a few seconds and close it");
-}
-</script>
-<body onload="test()">
-<p id="result">Wait...</p>
-</body>
-</html>
diff --git a/Source/WebCore/manual-tests/input-number-localization.html b/Source/WebCore/manual-tests/input-number-localization.html
index 4647aa5..294022a 100644
--- a/Source/WebCore/manual-tests/input-number-localization.html
+++ b/Source/WebCore/manual-tests/input-number-localization.html
@@ -12,9 +12,9 @@
<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>Output test: The following text field should have a localized representation for "-1234.5678".
+e.g. "-1,234.5678" for en_US locale, "-1.234,5678" for fr_FR locale.</p>
+<div><input type=number value="-1234.5678" 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>
diff --git a/Source/WebCore/manual-tests/media-default-playback-rate.html b/Source/WebCore/manual-tests/media-default-playback-rate.html
new file mode 100644
index 0000000..b980edc
--- /dev/null
+++ b/Source/WebCore/manual-tests/media-default-playback-rate.html
@@ -0,0 +1,90 @@
+
+<html>
+ <head>
+ <!-- LayoutTests location is hard-coded to avoid duplication of code. -->
+ <script src="http://svn.webkit.org/repository/webkit/trunk/LayoutTests/media/media-file.js"></script>
+ <script src="http://svn.webkit.org/repository/webkit/trunk/LayoutTests/media/video-test.js"></script>
+
+ <script>
+ var expectedRates = { "defaultPlaybackRate" : 1, "playbackRate" : 1};
+ var playingFromScript = false;
+ var changedRate = false;
+
+ function absoluteUrl(url)
+ {
+ var a = document.createElement('a');
+ a.href = url;
+ return a.href;
+ }
+
+ function testRates()
+ {
+ consoleWrite("");
+ var playWithControllerButton = !changedRate && !playingFromScript;
+ testExpected("video.playbackRate", playWithControllerButton ? expectedRates['defaultPlaybackRate'] : expectedRates['playbackRate']);
+ testExpected("video.defaultPlaybackRate", expectedRates['defaultPlaybackRate']);
+ changedRate = false;
+ }
+
+ function playing()
+ {
+ consoleWrite("<br>'playing' event");
+ expectedRates['playbackRate'] = playingFromScript ? video.playbackRate : video.defaultPlaybackRate;
+ testRates();
+ playingFromScript = false;
+ }
+
+ function ratechange()
+ {
+ consoleWrite("<br>'ratechange' event");
+ testRates();
+ }
+
+ function start()
+ {
+ findMediaElement();
+ video.addEventListener('ratechange', ratechange);
+ video.addEventListener('playing', playing);
+
+ // Use the video file from the svn repository to avoid duplicating the file.
+ video.src = absoluteUrl(findMediaFile('video', 'http://svn.webkit.org/repository/webkit/trunk/LayoutTests/media/content/test'));
+ testRates();
+ }
+
+ function play()
+ {
+ playingFromScript = true;
+ video.play();
+ }
+
+ function setRate(which, rate)
+ {
+ changedRate = true;
+ video[which] = rate;
+ expectedRates[which] = rate;
+ }
+
+ </script>
+ </head>
+
+ <body onload="start()">
+
+ <video controls > </video>
+ <ul>
+ <li>The current 'playbackRate' and 'defaultPlaybackRate' should be logged every time either changes.</li>
+ <li>'playbackRate' should be set to 'defaultPlaybackRate' when the Play button in the built-in controls is pressed</li>
+ <li>'playbackRate' should NOT when play() is called from script.</li>
+ </ul>
+ <div>
+ <button id="controls" onclick="setRate('defaultPlaybackRate', 2)">defaultPlaybackRate = 2</button>
+ <button id="controls" onclick="setRate('defaultPlaybackRate', 1)">defaultPlaybackRate = 1</button>
+ <button id="controls" onclick="setRate('playbackRate', 2)">playbackRate = 2</button>
+ <button id="controls" onclick="setRate('playbackRate', 1)">playbackRate = 1</button>
+ </div>
+ <div>
+ <button id="controls" onclick="play()">play()</button>
+ <button id="controls" onclick="video.pause()">pause()</button>
+ </div>
+ <br>
+ </body>
+</html>
diff --git a/Source/WebCore/manual-tests/print-after-window-close.html b/Source/WebCore/manual-tests/print-after-window-close.html
new file mode 100644
index 0000000..f7467e1
--- /dev/null
+++ b/Source/WebCore/manual-tests/print-after-window-close.html
@@ -0,0 +1,8 @@
+<script>
+function crash() {
+ var w = window.open("data:text/html,foo");
+ w.print();
+ w.close();
+}
+</script>
+<button onclick="crash()">Crash</button>
diff --git a/Source/WebCore/manual-tests/selection-start-after-inserting-line-break-in-textarea.html b/Source/WebCore/manual-tests/selection-start-after-inserting-line-break-in-textarea.html
new file mode 100644
index 0000000..0203199
--- /dev/null
+++ b/Source/WebCore/manual-tests/selection-start-after-inserting-line-break-in-textarea.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>This tests selectionStart is updated properly when inserting LF into textarea. To test, press Enter several times inside textarea and click the log button. This bug does not reproduce when new lines are added by execCommand or eventSender.</p>
+<textarea cols="20" rows="20"></textarea>
+<button id="button" onclick="verify()">verify</button>
+<div id="console"></div>
+<script>
+
+function verify() {
+ var console = document.getElementById('console');
+ if (textarea.value.match(/[^\n]/))
+ console.innerHTML = 'textarea contains unexpected character. You can only type LF in this test.';
+ else if (textarea.selectionStart != textarea.value.length)
+ console.innerHTML = 'FAIL: expected ' + textarea.value.length + ' but got ' + textarea.selectionStart;
+ else
+ console.innerHTML = 'PASS: ' + textarea.value.length + ' LFs';
+}
+
+var textarea = document.getElementsByTagName('textarea')[0];
+textarea.focus();
+
+</script>
+</body>
+</html>