summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/manual-tests
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-06-08 08:26:01 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-06-08 08:26:01 -0700
commit3742ac093d35d923c81693096ab6671e9b147700 (patch)
treec2add9100f789dad45ef1ec5328bddde02c47a4c /Source/WebCore/manual-tests
parent901401d90459bc22580842455d4588b9a697514d (diff)
parente5926f4a0d6adc9ad4a75824129f117181953560 (diff)
downloadexternal_webkit-3742ac093d35d923c81693096ab6671e9b147700.zip
external_webkit-3742ac093d35d923c81693096ab6671e9b147700.tar.gz
external_webkit-3742ac093d35d923c81693096ab6671e9b147700.tar.bz2
Merge changes I55c6d71a,Ifb3277d4,Ia1b847a2,I7ba9cf3f,Ida2b2a8a,I1280ec90,I72f818d5,I2e3b588b,I9a4e6289,Ia724c78b,Icd8612c8,Ie31b15d7,Ie125edae,I77941a88,I89dae78b,I3516e5ca,I1a4c17b5,I2c4ecc1a,I9c8e6537,Ifac13115,Ie1f80e09,Ia541ed77,I60ce9d78
* changes: Merge WebKit at r82507: Update ThirdPartyProject.prop Merge WebKit at r82507: Cherry-pick change r88166 to add INSPECTOR guards to ScriptProfiler Merge WebKit at r82507: Work around a V8 bug Merge WebKit at r82507: JNIType renamed to JavaType Merge WebKit at r82507: IconDatabaseClient interface expanded Merge WebKit at r82507: Don't use new loss-free code path in HTMLCanvasElement::toDataURL() Merge WebKit at r82507: IcondDatabaseBase::iconForPageURL() renamed Merge WebKit at r82507: IconDatabaseBase::Open() signature changed Merge WebKit at r82507: Node::isContentEditable() renamed Merge WebKit at r82507: Use icon database through IconDatabaseBase Merge WebKit at r82507: toInputElement() is now a member of Node Merge WebKit at r82507: FrameLoaderClient::objectContentType() signature changed Merge WebKit at r82507: StringImpl::computeHash() removed Merge WebKit at r82507: Stub out FontPlatformData::setOrientation() Merge WebKit at r82507: Path::strokeBoundingRect() is now const Merge WebKit at r82507: Add missing UnusedParam.h include in ApplicationCacheGroup.cpp Merge WebKit at r82507: Continue to use Android's version of FontPlatformData.h Merge WebKit at r82507: Update signature of FontCustomPlatformData::fontPlatformData() Merge WebKit at r82507: Fix conflicts due to JNI refactoring Merge WebKit at r82507: Fix conflicts due to new StorageTracker Merge WebKit at r82507: Fix conflicts Merge WebKit at r82507: Fix makefiles Merge WebKit at r82507: Initial merge by git
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>