[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
eric at webkit.org
eric at webkit.org
Tue Jan 5 23:58:37 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit d997f5ed11593486c3f93302fc618b9e4b80df0c
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 22 21:44:00 2009 +0000
2009-12-22 Dirk Pranke <dpranke at chromium.org>
Reviewed by Eric Seidel.
Add platform-specific chromium test.
https://bugs.webkit.org/show_bug.cgi?id=32741
* platform/chromium/fast/dom/interval-expected.txt: Added.
* platform/chromium/fast/dom/interval.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52498 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c0e1714..c01999b 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,5 +1,15 @@
2009-12-22 Dirk Pranke <dpranke at chromium.org>
+ Reviewed by Eric Seidel.
+
+ Add platform-specific chromium test.
+ https://bugs.webkit.org/show_bug.cgi?id=32741
+
+ * platform/chromium/fast/dom/interval-expected.txt: Added.
+ * platform/chromium/fast/dom/interval.html: Added.
+
+2009-12-22 Dirk Pranke <dpranke at chromium.org>
+
Reviewed by Adam Barth.
Attempting to upstream xss-inactive-closure test from the Chromium
diff --git a/LayoutTests/platform/chromium/fast/dom/interval-expected.txt b/LayoutTests/platform/chromium/fast/dom/interval-expected.txt
new file mode 100644
index 0000000..f69fc7f
--- /dev/null
+++ b/LayoutTests/platform/chromium/fast/dom/interval-expected.txt
@@ -0,0 +1,9 @@
+This tests that the chromium.Interval functionality works correctly.
+
+PASS - initial zero
+PASS - start
+PASS - restart
+PASS - initial stop
+PASS - stop
+PASS - stopped
+PASS - re-stopped
diff --git a/LayoutTests/platform/chromium/fast/dom/interval.html b/LayoutTests/platform/chromium/fast/dom/interval.html
new file mode 100644
index 0000000..b05036d
--- /dev/null
+++ b/LayoutTests/platform/chromium/fast/dom/interval.html
@@ -0,0 +1,76 @@
+<html>
+<body onload="test()">
+<div id="result">
+<p>
+This tests that the chromium.Interval functionality works correctly.
+</p>
+</div>
+<script>
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+}
+
+var resultDiv = document.getElementById("result");
+
+function check(name, passed, debug_output) {
+ if (passed) {
+ resultDiv.innerHTML += "PASS - " + name + "<br>";
+ } else {
+ resultDiv.innerHTML += "FAIL - " + name + ", debug_output: " + debug_output + "<br>";
+ }
+}
+
+// Spin loop for a short time
+function pause(millisecs) {
+ var start = new Date();
+ while ((new Date() - start) < millisecs);
+}
+
+
+function test() {
+ var interval = new chromium.Interval();
+
+ // Verify initialization.
+ var ms = interval.microseconds();
+ check("initial zero", ms == 0, "[ms: " + ms + "]");
+
+ // Verify that starting the timer works.
+ interval.start();
+ pause(50);
+ ms = interval.microseconds();
+ // Due to clock skew and granularity, we see sporadic failures if we check for
+ // ms >= 50000, so add a bit of buffer.
+ check("start", ms >= 49000, "[ms: " + ms + "]");
+
+ // Verify that restarting the interval should reset the beginning time
+ interval.start();
+ pause(1);
+ ms = interval.microseconds();
+ check("restart", ms > 0 && ms < 50000, "[ms: " + ms + "]");
+
+ // Verify that calling stop() before start() has no effect.
+ var interval = new chromium.Interval();
+ interval.stop();
+ ms = interval.microseconds();
+ check("initial stop", ms == 0, "[ms: " + ms + "]");
+
+ // Verify a start/stop sequence.
+ interval.start();
+ pause(50);
+ interval.stop();
+ ms = interval.microseconds();
+ check("stop", ms > 0 && ms < 100000, "[ms: " + ms + "]");
+
+ // Verify that the timer is really stopped.
+ var ms2 = interval.microseconds();
+ check("stopped", ms == ms2, "[ms: " + ms + "]" + "[ms2: " + ms2 + "]");
+
+ // Verify that re-stopping the timer works.
+ pause(50);
+ interval.stop();
+ ms2 = interval.microseconds();
+ check("re-stopped", ms2 > ms, "[ms: " + ms + "]" + "[ms2: " + ms2 + "]");
+}
+</script>
+</body>
+</html>
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list