summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/fast')
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/add-listener-from-callback-expected.txt18
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/add-listener-from-callback.html (renamed from LayoutTests/fast/dom/StyleSheet/script-tests/TEMPLATE.html)3
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/multiple-frames-expected.txt15
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/multiple-frames.html (renamed from LayoutTests/fast/dom/StyleSheet/css-medialist-item.html)3
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/no-synchronous-events-expected.txt10
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/no-synchronous-events.html (renamed from LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname.html)3
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/null-values-expected.txt21
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/null-values.html12
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/script-tests/add-listener-from-callback.js46
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/script-tests/basic-operation.js4
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event.js2
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/script-tests/multiple-frames.js43
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/script-tests/no-synchronous-events.js16
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/script-tests/null-values.js56
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/script-tests/optional-event-properties.js2
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/script-tests/updates.js37
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/script-tests/window-property.js6
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/updates-expected.txt15
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/updates.html12
-rw-r--r--LayoutTests/fast/dom/StyleSheet/css-medialist-item-expected.txt14
-rw-r--r--LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname-expected.txt10
-rw-r--r--LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-2-expected.txt3
-rw-r--r--LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-2.html37
-rw-r--r--LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-expected.txt3
-rw-r--r--LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime.html33
-rw-r--r--LayoutTests/fast/dom/StyleSheet/script-tests/css-medialist-item.js16
-rw-r--r--LayoutTests/fast/dom/StyleSheet/script-tests/get-stylesheet-byname.js8
-rw-r--r--LayoutTests/fast/events/touch/script-tests/send-oncancel-event.js18
28 files changed, 321 insertions, 145 deletions
diff --git a/LayoutTests/fast/dom/DeviceOrientation/add-listener-from-callback-expected.txt b/LayoutTests/fast/dom/DeviceOrientation/add-listener-from-callback-expected.txt
new file mode 100644
index 0000000..1d2ac5a
--- /dev/null
+++ b/LayoutTests/fast/dom/DeviceOrientation/add-listener-from-callback-expected.txt
@@ -0,0 +1,18 @@
+Tests that adding a new event listener from a callback works as expected.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS deviceOrientationEvent.alpha is mockAlpha
+PASS deviceOrientationEvent.beta is mockBeta
+PASS deviceOrientationEvent.gamma is mockGamma
+PASS deviceOrientationEvent.alpha is mockAlpha
+PASS deviceOrientationEvent.beta is mockBeta
+PASS deviceOrientationEvent.gamma is mockGamma
+PASS deviceOrientationEvent.alpha is mockAlpha
+PASS deviceOrientationEvent.beta is mockBeta
+PASS deviceOrientationEvent.gamma is mockGamma
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/StyleSheet/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/DeviceOrientation/add-listener-from-callback.html
index 1951c43..fa338f5 100644
--- a/LayoutTests/fast/dom/StyleSheet/script-tests/TEMPLATE.html
+++ b/LayoutTests/fast/dom/DeviceOrientation/add-listener-from-callback.html
@@ -1,4 +1,3 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="../../js/resources/js-test-style.css">
@@ -7,7 +6,7 @@
<body>
<p id="description"></p>
<div id="console"></div>
-<script src="YOUR_JS_FILE_HERE"></script>
+<script src="script-tests/add-listener-from-callback.js"></script>
<script src="../../js/resources/js-test-post.js"></script>
</body>
</html>
diff --git a/LayoutTests/fast/dom/DeviceOrientation/multiple-frames-expected.txt b/LayoutTests/fast/dom/DeviceOrientation/multiple-frames-expected.txt
new file mode 100644
index 0000000..5f24e38
--- /dev/null
+++ b/LayoutTests/fast/dom/DeviceOrientation/multiple-frames-expected.txt
@@ -0,0 +1,15 @@
+Tests using DeviceOrientation from multiple frames.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS deviceOrientationEvent.alpha is mockEvent.alpha
+PASS deviceOrientationEvent.beta is mockEvent.beta
+PASS deviceOrientationEvent.gamma is mockEvent.gamma
+PASS deviceOrientationEvent.alpha is mockEvent.alpha
+PASS deviceOrientationEvent.beta is mockEvent.beta
+PASS deviceOrientationEvent.gamma is mockEvent.gamma
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/StyleSheet/css-medialist-item.html b/LayoutTests/fast/dom/DeviceOrientation/multiple-frames.html
index 4d0c598..f0e1e89 100644
--- a/LayoutTests/fast/dom/StyleSheet/css-medialist-item.html
+++ b/LayoutTests/fast/dom/DeviceOrientation/multiple-frames.html
@@ -1,4 +1,3 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="../../js/resources/js-test-style.css">
@@ -7,7 +6,7 @@
<body>
<p id="description"></p>
<div id="console"></div>
-<script src="script-tests/css-medialist-item.js"></script>
+<script src="script-tests/multiple-frames.js"></script>
<script src="../../js/resources/js-test-post.js"></script>
</body>
</html>
diff --git a/LayoutTests/fast/dom/DeviceOrientation/no-synchronous-events-expected.txt b/LayoutTests/fast/dom/DeviceOrientation/no-synchronous-events-expected.txt
new file mode 100644
index 0000000..0d95dee
--- /dev/null
+++ b/LayoutTests/fast/dom/DeviceOrientation/no-synchronous-events-expected.txt
@@ -0,0 +1,10 @@
+Tests that events are never fired sycnhronously from a call to window.addEventListener().
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS hasAddEventListenerReturned is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname.html b/LayoutTests/fast/dom/DeviceOrientation/no-synchronous-events.html
index ed23080..23ce6b2 100644
--- a/LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname.html
+++ b/LayoutTests/fast/dom/DeviceOrientation/no-synchronous-events.html
@@ -1,4 +1,3 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="../../js/resources/js-test-style.css">
@@ -7,7 +6,7 @@
<body>
<p id="description"></p>
<div id="console"></div>
-<script src="script-tests/get-stylesheet-byname.js"></script>
+<script src="script-tests/no-synchronous-events.js"></script>
<script src="../../js/resources/js-test-post.js"></script>
</body>
</html>
diff --git a/LayoutTests/fast/dom/DeviceOrientation/null-values-expected.txt b/LayoutTests/fast/dom/DeviceOrientation/null-values-expected.txt
new file mode 100644
index 0000000..cb739ae
--- /dev/null
+++ b/LayoutTests/fast/dom/DeviceOrientation/null-values-expected.txt
@@ -0,0 +1,21 @@
+Tests using null values for some of the event properties.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS deviceOrientationEvent.alpha is mockEvent.alpha
+PASS deviceOrientationEvent.beta is mockEvent.beta
+PASS deviceOrientationEvent.gamma is mockEvent.gamma
+PASS deviceOrientationEvent.alpha is mockEvent.alpha
+PASS deviceOrientationEvent.beta is mockEvent.beta
+PASS deviceOrientationEvent.gamma is mockEvent.gamma
+PASS deviceOrientationEvent.alpha is mockEvent.alpha
+PASS deviceOrientationEvent.beta is mockEvent.beta
+PASS deviceOrientationEvent.gamma is mockEvent.gamma
+PASS deviceOrientationEvent.alpha is mockEvent.alpha
+PASS deviceOrientationEvent.beta is mockEvent.beta
+PASS deviceOrientationEvent.gamma is mockEvent.gamma
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/DeviceOrientation/null-values.html b/LayoutTests/fast/dom/DeviceOrientation/null-values.html
new file mode 100644
index 0000000..d21463c
--- /dev/null
+++ b/LayoutTests/fast/dom/DeviceOrientation/null-values.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/null-values.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/dom/DeviceOrientation/script-tests/add-listener-from-callback.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/add-listener-from-callback.js
new file mode 100644
index 0000000..c9c6ac9
--- /dev/null
+++ b/LayoutTests/fast/dom/DeviceOrientation/script-tests/add-listener-from-callback.js
@@ -0,0 +1,46 @@
+description('Tests that adding a new event listener from a callback works as expected.');
+
+var mockAlpha = 1.1;
+var mockBeta = 2.2;
+var mockGamma = 3.3;
+
+if (window.layoutTestController)
+ layoutTestController.setMockDeviceOrientation(true, mockAlpha, true, mockBeta, true, mockGamma);
+else
+ debug('This test can not be run without the LayoutTestController');
+
+var deviceOrientationEvent;
+function checkOrientation(event) {
+ deviceOrientationEvent = event;
+ shouldBe('deviceOrientationEvent.alpha', 'mockAlpha');
+ shouldBe('deviceOrientationEvent.beta', 'mockBeta');
+ shouldBe('deviceOrientationEvent.gamma', 'mockGamma');
+}
+
+var firstListenerEvents = 0;
+function firstListener(event) {
+ checkOrientation(event);
+ if (++firstListenerEvents == 1)
+ window.addEventListener('deviceorientation', secondListener);
+ else if (firstListenerEvents > 2)
+ testFailed('Too many events for first listener.');
+ maybeFinishTest();
+}
+
+var secondListenerEvents = 0;
+function secondListener(event) {
+ checkOrientation(event);
+ if (++secondListenerEvents > 1)
+ testFailed('Too many events for second listener.');
+ maybeFinishTest();
+}
+
+function maybeFinishTest() {
+ if (firstListenerEvents == 2 && secondListenerEvents == 1)
+ finishJSTest();
+}
+
+window.addEventListener('deviceorientation', firstListener);
+
+window.jsTestIsAsync = true;
+window.successfullyParsed = true;
diff --git a/LayoutTests/fast/dom/DeviceOrientation/script-tests/basic-operation.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/basic-operation.js
index 6e68b06..b5ff5ba 100644
--- a/LayoutTests/fast/dom/DeviceOrientation/script-tests/basic-operation.js
+++ b/LayoutTests/fast/dom/DeviceOrientation/script-tests/basic-operation.js
@@ -1,4 +1,4 @@
-description("Tests the basic operation of DeviceOrientation using the mock.");
+description('Tests the basic operation of DeviceOrientation using the mock.');
var mockAlpha = 1.1;
var mockBeta = 2.2;
@@ -10,7 +10,7 @@ else
debug('This test can not be run without the LayoutTestController');
var deviceOrientationEvent;
-window.addEventListener("deviceorientation", function(e) {
+window.addEventListener('deviceorientation', function(e) {
deviceOrientationEvent = e;
shouldBe('deviceOrientationEvent.alpha', 'mockAlpha');
shouldBe('deviceOrientationEvent.beta', 'mockBeta');
diff --git a/LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event.js
index 0fe8774..706de70 100644
--- a/LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event.js
+++ b/LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event.js
@@ -1,4 +1,4 @@
-description("Tests that document.createEvent() works with DeviceOrientationEvent.");
+description('Tests that document.createEvent() works with DeviceOrientationEvent.');
var event = document.createEvent('DeviceOrientationEvent');
diff --git a/LayoutTests/fast/dom/DeviceOrientation/script-tests/multiple-frames.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/multiple-frames.js
new file mode 100644
index 0000000..f8b8fb9
--- /dev/null
+++ b/LayoutTests/fast/dom/DeviceOrientation/script-tests/multiple-frames.js
@@ -0,0 +1,43 @@
+description('Tests using DeviceOrientation from multiple frames.');
+
+var deviceOrientationEvent;
+function checkOrientation(event) {
+ deviceOrientationEvent = event;
+ shouldBe('deviceOrientationEvent.alpha', 'mockEvent.alpha');
+ shouldBe('deviceOrientationEvent.beta', 'mockEvent.beta');
+ shouldBe('deviceOrientationEvent.gamma', 'mockEvent.gamma');
+}
+
+var hasMainFrameEventFired = false;
+function mainFrameListener(event) {
+ checkOrientation(event);
+ hasMainFrameEventFired = true;
+ maybeFinishTest();
+}
+
+var hasChildFrameEventFired = false;
+function childFrameListener(event) {
+ checkOrientation(event);
+ hasChildFrameEventFired = true;
+ maybeFinishTest();
+}
+
+function maybeFinishTest() {
+ if (hasMainFrameEventFired && hasChildFrameEventFired)
+ finishJSTest();
+}
+
+var mockEvent = {alpha: 1.1, beta: 2.2, gamma: 3.3};
+if (window.layoutTestController)
+ layoutTestController.setMockDeviceOrientation(true, mockEvent.alpha, true, mockEvent.beta, true, mockEvent.gamma);
+else
+ debug('This test can not be run without the LayoutTestController');
+
+var childFrame = document.createElement('iframe');
+document.body.appendChild(childFrame);
+childFrame.contentWindow.addEventListener('deviceorientation', childFrameListener);
+
+window.addEventListener('deviceorientation', mainFrameListener);
+
+window.jsTestIsAsync = true;
+window.successfullyParsed = true;
diff --git a/LayoutTests/fast/dom/DeviceOrientation/script-tests/no-synchronous-events.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/no-synchronous-events.js
new file mode 100644
index 0000000..0f4bc51
--- /dev/null
+++ b/LayoutTests/fast/dom/DeviceOrientation/script-tests/no-synchronous-events.js
@@ -0,0 +1,16 @@
+description('Tests that events are never fired sycnhronously from a call to window.addEventListener().');
+
+if (window.layoutTestController)
+ layoutTestController.setMockDeviceOrientation(true, 1.1, true, 2.2, true, 3.3);
+else
+ debug('This test can not be run without the LayoutTestController');
+
+var hasAddEventListenerReturned = false;
+window.addEventListener('deviceorientation', function() {
+ shouldBeTrue('hasAddEventListenerReturned');
+ finishJSTest();
+});
+hasAddEventListenerReturned = true;
+
+window.jsTestIsAsync = true;
+window.successfullyParsed = true;
diff --git a/LayoutTests/fast/dom/DeviceOrientation/script-tests/null-values.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/null-values.js
new file mode 100644
index 0000000..ccde66a
--- /dev/null
+++ b/LayoutTests/fast/dom/DeviceOrientation/script-tests/null-values.js
@@ -0,0 +1,56 @@
+description('Tests using null values for some of the event properties.');
+
+var mockEvent;
+function setMockOrientation(alpha, beta, gamma) {
+ mockEvent = {alpha: alpha, beta: beta, gamma: gamma};
+ if (window.layoutTestController)
+ layoutTestController.setMockDeviceOrientation(
+ null != mockEvent.alpha, null == mockEvent.alpha ? 0 : mockEvent.alpha,
+ null != mockEvent.beta, null == mockEvent.beta ? 0 : mockEvent.beta,
+ null != mockEvent.gamma, null == mockEvent.gamma ? 0 : mockEvent.gamma);
+ else
+ debug('This test can not be run without the LayoutTestController');
+}
+
+var deviceOrientationEvent;
+function checkOrientation(event) {
+ deviceOrientationEvent = event;
+ shouldBe('deviceOrientationEvent.alpha', 'mockEvent.alpha');
+ shouldBe('deviceOrientationEvent.beta', 'mockEvent.beta');
+ shouldBe('deviceOrientationEvent.gamma', 'mockEvent.gamma');
+}
+
+function firstListener(event) {
+ checkOrientation(event);
+ window.removeEventListener('deviceorientation', firstListener);
+
+ setMockOrientation(1.1, null, null);
+ window.addEventListener('deviceorientation', secondListener);
+}
+
+function secondListener(event) {
+ checkOrientation(event);
+ window.removeEventListener('deviceorientation', secondListener);
+
+ setMockOrientation(null, 2.2, null);
+ window.addEventListener('deviceorientation', thirdListener);
+}
+
+function thirdListener(event) {
+ checkOrientation(event);
+ window.removeEventListener('deviceorientation', thirdListener);
+
+ setMockOrientation(null, null, 3.3);
+ window.addEventListener('deviceorientation', fourthListener);
+}
+
+function fourthListener(event) {
+ checkOrientation(event);
+ finishJSTest();
+}
+
+setMockOrientation(null, null, null);
+window.addEventListener('deviceorientation', firstListener);
+
+window.jsTestIsAsync = true;
+window.successfullyParsed = true;
diff --git a/LayoutTests/fast/dom/DeviceOrientation/script-tests/optional-event-properties.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/optional-event-properties.js
index 2936e72..900c94b 100644
--- a/LayoutTests/fast/dom/DeviceOrientation/script-tests/optional-event-properties.js
+++ b/LayoutTests/fast/dom/DeviceOrientation/script-tests/optional-event-properties.js
@@ -1,4 +1,4 @@
-description("Tests the optional properties of DeviceOrientationEvent. Each property should be null if not set, or set to null or undefined.");
+description('Tests the optional properties of DeviceOrientationEvent. Each property should be null if not set, or set to null or undefined.');
var event;
diff --git a/LayoutTests/fast/dom/DeviceOrientation/script-tests/updates.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/updates.js
new file mode 100644
index 0000000..f5ec029
--- /dev/null
+++ b/LayoutTests/fast/dom/DeviceOrientation/script-tests/updates.js
@@ -0,0 +1,37 @@
+description('Tests that updates to the orientation causes new events to fire.');
+
+var mockEvent;
+function setMockOrientation(alpha, beta, gamma) {
+ mockEvent = {alpha: alpha, beta: beta, gamma: gamma};
+ if (window.layoutTestController)
+ layoutTestController.setMockDeviceOrientation(true, mockEvent.alpha, true, mockEvent.beta, true, mockEvent.gamma);
+ else
+ debug('This test can not be run without the LayoutTestController');
+}
+
+var deviceOrientationEvent;
+function checkOrientation(event) {
+ deviceOrientationEvent = event;
+ shouldBe('deviceOrientationEvent.alpha', 'mockEvent.alpha');
+ shouldBe('deviceOrientationEvent.beta', 'mockEvent.beta');
+ shouldBe('deviceOrientationEvent.gamma', 'mockEvent.gamma');
+}
+
+function firstListener(event) {
+ checkOrientation(event);
+ window.removeEventListener('deviceorientation', firstListener);
+
+ setMockOrientation(11.1, 22.2, 33.3);
+ window.addEventListener('deviceorientation', updateListener);
+}
+
+function updateListener(event) {
+ checkOrientation(event);
+ finishJSTest();
+}
+
+setMockOrientation(1.1, 2.2, 3.3);
+window.addEventListener('deviceorientation', firstListener);
+
+window.jsTestIsAsync = true;
+window.successfullyParsed = true;
diff --git a/LayoutTests/fast/dom/DeviceOrientation/script-tests/window-property.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/window-property.js
index 8e65059..885932b 100644
--- a/LayoutTests/fast/dom/DeviceOrientation/script-tests/window-property.js
+++ b/LayoutTests/fast/dom/DeviceOrientation/script-tests/window-property.js
@@ -1,9 +1,9 @@
-description("Tests that the window.DeviceOrientationEvent and window.ondeviceorientation properties are present.");
+description('Tests that the window.DeviceOrientationEvent and window.ondeviceorientation properties are present.');
function hasDeviceOrientationEventProperty()
{
for (var property in window) {
- if (property == "DeviceOrientationEvent")
+ if (property == 'DeviceOrientationEvent')
return true;
}
return false;
@@ -18,7 +18,7 @@ shouldBeTrue("window.hasOwnProperty('DeviceOrientationEvent')");
function hasOnDeviceOrientationProperty()
{
for (var property in window) {
- if (property == "ondeviceorientation")
+ if (property == 'ondeviceorientation')
return true;
}
return false;
diff --git a/LayoutTests/fast/dom/DeviceOrientation/updates-expected.txt b/LayoutTests/fast/dom/DeviceOrientation/updates-expected.txt
new file mode 100644
index 0000000..6e54f16
--- /dev/null
+++ b/LayoutTests/fast/dom/DeviceOrientation/updates-expected.txt
@@ -0,0 +1,15 @@
+Tests that updates to the orientation causes new events to fire.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS deviceOrientationEvent.alpha is mockEvent.alpha
+PASS deviceOrientationEvent.beta is mockEvent.beta
+PASS deviceOrientationEvent.gamma is mockEvent.gamma
+PASS deviceOrientationEvent.alpha is mockEvent.alpha
+PASS deviceOrientationEvent.beta is mockEvent.beta
+PASS deviceOrientationEvent.gamma is mockEvent.gamma
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/DeviceOrientation/updates.html b/LayoutTests/fast/dom/DeviceOrientation/updates.html
new file mode 100644
index 0000000..5f2ac3c
--- /dev/null
+++ b/LayoutTests/fast/dom/DeviceOrientation/updates.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/updates.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/dom/StyleSheet/css-medialist-item-expected.txt b/LayoutTests/fast/dom/StyleSheet/css-medialist-item-expected.txt
deleted file mode 100644
index 1468f1b..0000000
--- a/LayoutTests/fast/dom/StyleSheet/css-medialist-item-expected.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-This tests indexing outside the range of the media list object.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS mediaList.length is 2
-PASS mediaList[0] is "screen"
-PASS mediaList[1] is "print"
-PASS mediaList[2] is null
-PASS mediaList[-1] is undefined.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname-expected.txt b/LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname-expected.txt
deleted file mode 100644
index 31fb4c8..0000000
--- a/LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname-expected.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-This test verifies that a StyleSheet object will be returned instead of a HTMLStyleElement when calling document.styleSheets named property getter.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS document.styleSheets["test"] is styleElement.sheet
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-2-expected.txt b/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-2-expected.txt
deleted file mode 100644
index 5e51726..0000000
--- a/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-2-expected.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-This test verifies that style sheet do not outlive their elements. Since you can get back to the element with the ownerNode attribute, it's important to keep the element alive.
-
-Test passed.
diff --git a/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-2.html b/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-2.html
deleted file mode 100644
index ca6fa16..0000000
--- a/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-2.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<html>
-<link rel="stylesheet" type="text/css" href="theme.css"/>
-
-<script>
-function runTest() {
- if (window.layoutTestController)
- layoutTestController.dumpAsText();
-
- var linkElement = document.getElementsByTagName('link')[0];
- var styleSheet = linkElement.sheet;
-
- // delete link element
- linkElement.parentNode.removeChild(linkElement);
- linkElement = null;
-
- if (window.gc) {
- window.gc();
- } else if (GCController) {
- GCController.collect();
- } else {
- for (var i = 0; i < 10000; i++)
- new Object();
- }
- styleSheet.ownerNode.cloneNode();
-
- document.getElementById("result").innerHTML = "Test passed.";
-}
-</script>
-<body onload="runTest()">
-<p>
-This test verifies that style sheet do not outlive their elements.
-Since you can get back to the element with the ownerNode attribute,
-it's important to keep the element alive.
-</p>
-<p id="result">TEST HAS NOT RUN YET.</p>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-expected.txt b/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-expected.txt
deleted file mode 100644
index d92e2d7..0000000
--- a/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-expected.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-This test verifies that style sheets do not outlive their elements. Since you can get back to the element with the ownerNode attribute, it's important to keep the element alive.
-
-Test passed.
diff --git a/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime.html b/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime.html
deleted file mode 100644
index 54b1ac4..0000000
--- a/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<head>
-<script>
-function runTest()
-{
- if (window.layoutTestController)
- layoutTestController.dumpAsText();
-
- var styleElement = document.createElement('style');
- var styleSheet = styleElement.sheet;
- styleElement = null;
-
- // create lots of objects to force a garbage collection
- var i = 0;
- var s;
- while (i < 5000) {
- i = i+1.11;
- s = s + " ";
- }
-
- styleSheet.ownerNode.cloneNode();
-
- document.getElementById("result").innerHTML = "Test passed.";
-}
-</script>
-</head>
-<body onload="runTest()">
-<p>
-This test verifies that style sheets do not outlive their elements.
-Since you can get back to the element with the ownerNode attribute,
-it's important to keep the element alive.
-</p>
-<p id="result">TEST HAS NOT RUN YET.</p>
-</body>
diff --git a/LayoutTests/fast/dom/StyleSheet/script-tests/css-medialist-item.js b/LayoutTests/fast/dom/StyleSheet/script-tests/css-medialist-item.js
deleted file mode 100644
index 22974e7..0000000
--- a/LayoutTests/fast/dom/StyleSheet/script-tests/css-medialist-item.js
+++ /dev/null
@@ -1,16 +0,0 @@
-description("This tests indexing outside the range of the media list object.");
-
-var styleElement = document.createElement('style');
-styleElement.setAttribute('media', 'screen, print');
-document.documentElement.appendChild(styleElement)
-var mediaList = document.styleSheets[document.styleSheets.length - 1].media;
-
-shouldEvaluateTo('mediaList.length', 2);
-shouldBeEqualToString('mediaList[0]', 'screen');
-shouldBeEqualToString('mediaList[1]', 'print');
-shouldBeNull('mediaList[2]');
-shouldBeUndefined('mediaList[-1]')
-
-document.documentElement.removeChild(styleElement);
-
-successfullyParsed = true;
diff --git a/LayoutTests/fast/dom/StyleSheet/script-tests/get-stylesheet-byname.js b/LayoutTests/fast/dom/StyleSheet/script-tests/get-stylesheet-byname.js
deleted file mode 100644
index 793ed65..0000000
--- a/LayoutTests/fast/dom/StyleSheet/script-tests/get-stylesheet-byname.js
+++ /dev/null
@@ -1,8 +0,0 @@
-description("This test verifies that a StyleSheet object will be returned instead of a HTMLStyleElement when calling document.styleSheets named property getter.");
-
-var styleElement = document.createElement("style");
-styleElement.setAttribute("id", "test");
-document.head.appendChild(styleElement);
-shouldBe('document.styleSheets["test"]', 'styleElement.sheet');
-
-var successfullyParsed = true;
diff --git a/LayoutTests/fast/events/touch/script-tests/send-oncancel-event.js b/LayoutTests/fast/events/touch/script-tests/send-oncancel-event.js
index c83daa4..af5275d 100644
--- a/LayoutTests/fast/events/touch/script-tests/send-oncancel-event.js
+++ b/LayoutTests/fast/events/touch/script-tests/send-oncancel-event.js
@@ -20,13 +20,15 @@ function touchcancelHandler() {
if (window.layoutTestController)
window.layoutTestController.waitUntilDone();
-if (window.eventSender) {
- document.addEventListener("touchcancel", touchcancelHandler, false);
- eventSender.addTouchPoint(touchX, touchY);
- eventSender.touchStart();
- eventSender.cancelTouchPoint(0);
- eventSender.touchCancel();
-} else
- debug("This test requires DumpRenderTree.");
+window.onload = function() {
+ if (window.eventSender) {
+ document.addEventListener("touchcancel", touchcancelHandler, false);
+ eventSender.addTouchPoint(touchX, touchY);
+ eventSender.touchStart();
+ eventSender.cancelTouchPoint(0);
+ eventSender.touchCancel();
+ } else
+ debug("This test requires DumpRenderTree.");
+}
var successfullyParsed = true;