WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-90813-20120709124324.patch (text/plain), 24.27 KB, created by
Vincent Scheib
on 2012-07-09 12:43:24 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Vincent Scheib
Created:
2012-07-09 12:43:24 PDT
Size:
24.27 KB
patch
obsolete
>Subversion Revision: 122095 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 5226089aa61914c03cbcb6da52597ab8967ed1e1..f67a36b8d8328faeca932dacc82bff53a2cb6b71 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,33 @@ >+2012-07-09 Vincent Scheib <scheib@chromium.org> >+ >+ Refactor common Pointer Lock test code to a harness. >+ https://bugs.webkit.org/show_bug.cgi?id=90813 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * pointer-lock/bug90391-move-then-window-open-crash-expected.txt: >+ * pointer-lock/bug90391-move-then-window-open-crash.html: >+ * pointer-lock/lock-already-locked-expected.txt: >+ * pointer-lock/lock-already-locked.html: >+ * pointer-lock/lock-fail-responses-expected.txt: >+ * pointer-lock/lock-fail-responses.html: >+ * pointer-lock/mouse-event-delivery-expected.txt: >+ * pointer-lock/mouse-event-delivery.html: >+ * pointer-lock/pointer-lock-api-expected.txt: >+ * pointer-lock/pointer-lock-api.html: >+ * pointer-lock/pointerlockchange-pointerlockerror-events-expected.txt: >+ * pointer-lock/pointerlockchange-pointerlockerror-events.html: >+ * pointer-lock/pointerlocklost-event-expected.txt: >+ * pointer-lock/pointerlocklost-event.html: >+ * pointer-lock/resources/pointer-lock-test-harness.js: Added. >+ (doNextStep.else): >+ (doNextStepWithUserGesture): >+ (eventExpected.targetHanderNode.eventHandlerName): >+ (eventExpected): >+ (expectOnlyChangeEvent): >+ (expectOnlyErrorEvent): >+ (expectNoEvents): >+ > 2012-07-09 Kristóf Kosztyó <kkristof@inf.u-szeged.hu> > > [Qt] Unreviewed gardening. Skip the failing test. >diff --git a/LayoutTests/pointer-lock/bug90391-move-then-window-open-crash-expected.txt b/LayoutTests/pointer-lock/bug90391-move-then-window-open-crash-expected.txt >index 0d1035c4a2523e6d6b9f6778337900d1d5a817d3..8c8c23990754ed3f1ed60a460e80b57699aa8578 100644 >--- a/LayoutTests/pointer-lock/bug90391-move-then-window-open-crash-expected.txt >+++ b/LayoutTests/pointer-lock/bug90391-move-then-window-open-crash-expected.txt >@@ -3,6 +3,7 @@ bug 90391: pointer lock mouse move events then window.open should not crash. > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > > >+doNextStep button for manual testing. Use keyboard to select and press (TAB, then SPACE) when pointer locked. > Locking targetdiv1. > PASS document.onwebkitpointerlockchange event received. > Sending mouse move events. >@@ -11,5 +12,4 @@ PASS Didn't crash > PASS successfullyParsed is true > > TEST COMPLETE >-doNextStep for manual testing > >diff --git a/LayoutTests/pointer-lock/bug90391-move-then-window-open-crash.html b/LayoutTests/pointer-lock/bug90391-move-then-window-open-crash.html >index ccf4131aecf6f5379508a3d6c63ced8fc4cecca0..5fbf5b3d11706bf177c800ac3179a9fe6bee8d1f 100644 >--- a/LayoutTests/pointer-lock/bug90391-move-then-window-open-crash.html >+++ b/LayoutTests/pointer-lock/bug90391-move-then-window-open-crash.html >@@ -2,10 +2,10 @@ > <html> > <head> > <script src="../fast/js/resources/js-test-pre.js"></script> >+<script src="resources/pointer-lock-test-harness.js"></script> > </head> > <body> > <div> >- <button onclick="doNextStep('manual');">doNextStep for manual testing</button> > <div id="target1"></div> > </div> > <script> >@@ -14,16 +14,6 @@ > > targetdiv1 = document.getElementById("target1"); > >- currentStep = 0; >- function doNextStep(manual) >- { >- if (!window.layoutTestController && !manual) >- return; >- if (currentStep < todo.length) >- setTimeout(function () { todo[currentStep++](); }, 0); >- else if (currentStep++ == todo.length) >- setTimeout(function () { finishJSTest(); }, 0); >- } > todo = [ > function () { > debug(" Locking targetdiv1.") >@@ -31,7 +21,7 @@ > document.onwebkitpointerlockchange = function () { > document.onwebkitpointerlockchange = null; > testPassed("document.onwebkitpointerlockchange event received."); >- doNextStep('manual'); >+ doNextStep(); > }; > }, > function () { >@@ -40,7 +30,7 @@ > targetdiv1.onmousemove = function () { > if (++mouseMoveEvents == 2) { > targetdiv1.onmousemove = null; >- doNextStep('manual'); >+ doNextStep(); > } > } > if (window.eventSender) { >@@ -54,10 +44,10 @@ > window.open(); > testPassed("Didn't crash"); > document.webkitExitPointerLock(); >- doNextStep('manual'); >+ doNextStep(); > }, > ]; >- doNextStep(); >+ doNextStepWithUserGesture(); > </script> > <script src="../fast/js/resources/js-test-post.js"></script> > </body> >diff --git a/LayoutTests/pointer-lock/lock-already-locked-expected.txt b/LayoutTests/pointer-lock/lock-already-locked-expected.txt >index f65fc3895ba5e6c9b710862103e06bcfa7def027..ffe4e97104c1cedc15883415eeb630a65dfbeb99 100644 >--- a/LayoutTests/pointer-lock/lock-already-locked-expected.txt >+++ b/LayoutTests/pointer-lock/lock-already-locked-expected.txt >@@ -3,6 +3,7 @@ Test calling lock when already in a locked state. > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > > >+doNextStep button for manual testing. Use keyboard to select and press (TAB, then SPACE) when pointer locked. > PASS document.webkitPointerLockElement is null > Locking targetdiv1. > PASS document.onwebkitpointerlockchange event received. >@@ -31,5 +32,4 @@ PASS document.webkitPointerLockElement is targetdiv2 > PASS successfullyParsed is true > > TEST COMPLETE >-doNextStep for manual testing > >diff --git a/LayoutTests/pointer-lock/lock-already-locked.html b/LayoutTests/pointer-lock/lock-already-locked.html >index ec024f6c1376b1d2493a597489f25936721d5b73..9f4d57461643c6bfa42ff83bbcdede52f87edda9 100644 >--- a/LayoutTests/pointer-lock/lock-already-locked.html >+++ b/LayoutTests/pointer-lock/lock-already-locked.html >@@ -2,10 +2,10 @@ > <html> > <head> > <script src="../fast/js/resources/js-test-pre.js"></script> >+<script src="resources/pointer-lock-test-harness.js"></script> > </head> > <body> > <div> >- <button onclick="doNextStep('manual');">doNextStep for manual testing</button> > <div id="target1"></div> > <div id="target2"></div> > </div> >@@ -22,7 +22,7 @@ > { > testPassed("document.onwebkitpointerlockchange event received."); > shouldBe("document.webkitPointerLockElement", expectedTargetToBeLockedString); >- doNextStep(); >+ doNextStepWithUserGesture(); > }; > document.onwebkitpointerlockerror = > function () { testFailed("document.onwebkitpointerlockerror event received."); finishJSTest(); }; >@@ -35,16 +35,6 @@ > targetdiv2.addEventListener("webkitpointerlocklost", > function () { shouldBe("expectTarget2Unlock", "true"); }); > >- currentStep = 0; >- function doNextStep(manual) >- { >- if (!window.layoutTestController && !manual) >- return; >- if (currentStep < todo.length) >- setTimeout(function () { todo[currentStep++](); }, 0); >- else if (currentStep++ == todo.length) >- setTimeout(function () { finishJSTest(); }, 0); >- } > todo = [ > function () { > shouldBe("document.webkitPointerLockElement", "null"); >@@ -110,7 +100,7 @@ > expectedTargetToBeLockedString = "targetdiv2"; > }, > ]; >- doNextStep(); >+ doNextStepWithUserGesture(); > </script> > <script src="../fast/js/resources/js-test-post.js"></script> > </body> >diff --git a/LayoutTests/pointer-lock/lock-fail-responses-expected.txt b/LayoutTests/pointer-lock/lock-fail-responses-expected.txt >index 8538d690d75ae09c02d824244c42bc138ed40a26..dabf816afa59d7d5eb048872871729b05a095be9 100644 >--- a/LayoutTests/pointer-lock/lock-fail-responses-expected.txt >+++ b/LayoutTests/pointer-lock/lock-fail-responses-expected.txt >@@ -3,6 +3,7 @@ Test asynchronous results of calling lock. > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > > >+doNextStep button for manual testing. Use keyboard to select and press (TAB, then SPACE) when pointer locked. > PASS window.testRunner is defined. > PASS Lock failed (after we called testRunner.setPointerLockWillFailSynchronously) > PASS Lock failed (after we called testRunner.setPointerLockWillFailAsynchronously) >diff --git a/LayoutTests/pointer-lock/lock-fail-responses.html b/LayoutTests/pointer-lock/lock-fail-responses.html >index cdf5c636d4e734b7e8eccd1571592ff85085f23f..d8c2977052487e5550fb4db65688002ae49545c9 100644 >--- a/LayoutTests/pointer-lock/lock-fail-responses.html >+++ b/LayoutTests/pointer-lock/lock-fail-responses.html >@@ -2,6 +2,7 @@ > <html> > <head> > <script src="../fast/js/resources/js-test-pre.js"></script> >+<script src="resources/pointer-lock-test-harness.js"></script> > </head> > <body> > <script> >@@ -9,10 +10,6 @@ > window.jsTestIsAsync = true; > shouldBeDefined("window.testRunner"); > >- currentStep = 0; >- function doNextStep() { >- todo[currentStep++](); >- } > todo = [ > function () { > testRunner.setPointerLockWillFailSynchronously(); >@@ -23,7 +20,7 @@ > }, > function () { > testPassed("Lock failed (after we called testRunner.setPointerLockWillFailSynchronously)"); >- doNextStep(); >+ doNextStepWithUserGesture(); > }); > }, > function () { >@@ -38,9 +35,8 @@ > doNextStep(); > }); > }, >- finishJSTest > ]; >- doNextStep(); >+ doNextStepWithUserGesture(); > </script> > <script src="../fast/js/resources/js-test-post.js"></script> > </body> >diff --git a/LayoutTests/pointer-lock/mouse-event-delivery-expected.txt b/LayoutTests/pointer-lock/mouse-event-delivery-expected.txt >index a2cfae4fee1c1c1db32aed9e2ff64e5431de2d58..76b115575034f079e53b855e67b5185c4aa02a9f 100644 >--- a/LayoutTests/pointer-lock/mouse-event-delivery-expected.txt >+++ b/LayoutTests/pointer-lock/mouse-event-delivery-expected.txt >@@ -3,6 +3,7 @@ Test mouse events are routed to lock target. > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > > >+doNextStep button for manual testing. Use keyboard to select and press (TAB, then SPACE) when pointer locked. > PASS document.onwebkitpointerlockchange event received. > PASS document.webkitPointerLockElement is targetdiv1 > With a lock in place send a click. >@@ -32,5 +33,4 @@ PASS event type: click, target: target2, received on: target2 > PASS successfullyParsed is true > > TEST COMPLETE >-doNextStep for manual testing > >diff --git a/LayoutTests/pointer-lock/mouse-event-delivery.html b/LayoutTests/pointer-lock/mouse-event-delivery.html >index 8d07a0af765cbb880e5933936d42bbf3899aa6cc..e2f0410413de14107a5a9249f44e24837ffc84f7 100644 >--- a/LayoutTests/pointer-lock/mouse-event-delivery.html >+++ b/LayoutTests/pointer-lock/mouse-event-delivery.html >@@ -2,10 +2,10 @@ > <html> > <head> > <script src="../fast/js/resources/js-test-pre.js"></script> >+<script src="resources/pointer-lock-test-harness.js"></script> > </head> > <body id="body"> > <div> >- <button onclick="doNextStep('manual');">doNextStep for manual testing</button> > <div id="target1"></div> > <div id="target2"></div> > </div> >@@ -22,7 +22,7 @@ > { > testPassed("document.onwebkitpointerlockchange event received."); > shouldBe("document.webkitPointerLockElement", expectedTargetToBeLockedString); >- doNextStep('manual'); >+ doNextStep(); > }; > document.onwebkitpointerlockerror = > function () { testFailed("document.onwebkitpointerlockerror event received."); finishJSTest(); }; >@@ -35,16 +35,6 @@ > testPassed("event type: " + e.type + ", target: " + e.target.id + ", received on: " + e.currentTarget.id); > } > >- currentStep = 0; >- function doNextStep(manual) >- { >- if (!window.layoutTestController && !manual) >- return; >- if (currentStep < todo.length) >- setTimeout(function () { todo[currentStep++](); }, 0); >- else if (currentStep++ == todo.length) >- setTimeout(function () { finishJSTest(); }, 0); >- } > todo = [ > function () { > targetdiv1.webkitRequestPointerLock(); >@@ -61,7 +51,7 @@ > window.eventSender.mouseDown(); > window.eventSender.mouseUp(); > } >- doNextStep(); >+ doNextStepWithUserGesture(); > }, > function () { > targetdiv2.webkitRequestPointerLock(); >@@ -78,7 +68,7 @@ > window.eventSender.mouseDown(); > window.eventSender.mouseUp(); > } >- doNextStep(); >+ doNextStepWithUserGesture(); > }, > function () { > debug(" Ensure double clicks work as expected, sending 4 clicks.") >@@ -103,10 +93,10 @@ > window.eventSender.mouseDown(); > window.eventSender.mouseUp(); > } >- doNextStep(); >+ doNextStepWithUserGesture(); > }, > ]; >- doNextStep(); >+ doNextStepWithUserGesture(); > </script> > <script src="../fast/js/resources/js-test-post.js"></script> > </body> >diff --git a/LayoutTests/pointer-lock/pointer-lock-api-expected.txt b/LayoutTests/pointer-lock/pointer-lock-api-expected.txt >index add2aaaffa0cd287a9c7e80a20d6e5dc9a182c7d..bfde3a93579207a68aa2e6bedf4a19ef7603a8aa 100644 >--- a/LayoutTests/pointer-lock/pointer-lock-api-expected.txt >+++ b/LayoutTests/pointer-lock/pointer-lock-api-expected.txt >@@ -3,6 +3,7 @@ Basic API existence test for Pointer Lock. > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > > >+doNextStep button for manual testing. Use keyboard to select and press (TAB, then SPACE) when pointer locked. > PASS navigator.webkitPointer is defined. > PASS typeof navigator.webkitPointer.isLocked is 'boolean' > PASS navigator.webkitPointer.isLocked is false >@@ -17,4 +18,4 @@ PASS element.webkitRequestPointerLock is defined. > PASS successfullyParsed is true > > TEST COMPLETE >-doNextStep for manual testing >+ >diff --git a/LayoutTests/pointer-lock/pointer-lock-api.html b/LayoutTests/pointer-lock/pointer-lock-api.html >index fb14dc49e7eb96721a264a127c88701ad7b25803..ce12db4d0dea89181ecd3ed9c00d7453eab4c91c 100644 >--- a/LayoutTests/pointer-lock/pointer-lock-api.html >+++ b/LayoutTests/pointer-lock/pointer-lock-api.html >@@ -2,23 +2,13 @@ > <html> > <head> > <script src="../fast/js/resources/js-test-pre.js"></script> >+<script src="resources/pointer-lock-test-harness.js"></script> > </head> > <body> >-<button onclick="doNextStep('manual');">doNextStep for manual testing</button> > <script> > description("Basic API existence test for Pointer Lock.") > window.jsTestIsAsync = true; > >- currentStep = 0; >- function doNextStep(manual) >- { >- if (!window.testRunner && !manual) >- return; >- if (currentStep < todo.length) >- setTimeout(function () { todo[currentStep++](); }, 0); >- else if (currentStep++ == todo.length) >- setTimeout(function () { finishJSTest(); }, 0); >- } > todo = [ > function () { > shouldBeDefined("navigator.webkitPointer"); >@@ -43,7 +33,7 @@ > doNextStep(); > }, > ]; >- doNextStep(); >+ doNextStepWithUserGesture(); > </script> > <script src="../fast/js/resources/js-test-post.js"></script> > </body> >diff --git a/LayoutTests/pointer-lock/pointerlockchange-pointerlockerror-events-expected.txt b/LayoutTests/pointer-lock/pointerlockchange-pointerlockerror-events-expected.txt >index 69c663360993b5d81d05aab74751ea8510a2a391..e329214ed94769a4ac1fc195bf335251a70cb912 100644 >--- a/LayoutTests/pointer-lock/pointerlockchange-pointerlockerror-events-expected.txt >+++ b/LayoutTests/pointer-lock/pointerlockchange-pointerlockerror-events-expected.txt >@@ -3,6 +3,7 @@ Test expected pointerlockchange and pointerlockerror events. > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > > >+doNextStep button for manual testing. Use keyboard to select and press (TAB, then SPACE) when pointer locked. > Unlock. > Lock targetDiv1. > PASS onwebkitpointerlockchange received after: Lock targetDiv1. >@@ -36,5 +37,4 @@ PASS onwebkitpointerlockerror received after: Lock with asynchronous failure. > PASS successfullyParsed is true > > TEST COMPLETE >-doNextStep for manual testing > >diff --git a/LayoutTests/pointer-lock/pointerlockchange-pointerlockerror-events.html b/LayoutTests/pointer-lock/pointerlockchange-pointerlockerror-events.html >index 20c13b5cd6da22290219525e3eb0a7e6c639ce6d..9a101c4e492262745b15df7a0a6f10d39b5175dd 100644 >--- a/LayoutTests/pointer-lock/pointerlockchange-pointerlockerror-events.html >+++ b/LayoutTests/pointer-lock/pointerlockchange-pointerlockerror-events.html >@@ -2,10 +2,10 @@ > <html> > <head> > <script src="../fast/js/resources/js-test-pre.js"></script> >+<script src="resources/pointer-lock-test-harness.js"></script> > </head> > <body> > <div> >- <button onclick="doNextStep('manual');">doNextStep for manual testing</button> > <div id="target1"></div> > <div id="target2"></div> > <iframe id="iframe1"></iframe> >@@ -20,59 +20,11 @@ > targetIframe1 = document.getElementById("iframe1"); > targetIframe2 = document.getElementById("iframe2"); > >- function eventExpected(eventHandlerName, message, expectedCalls, targetHanderNode) >- { >- targetHanderNode[eventHandlerName] = function () >- { >- switch (expectedCalls--) { >- case 0: >- testFailed(eventHandlerName + " received after: " + message); >- finishJSTest(); >- break; >- case 1: >- doNextStep(); >- default: >- testPassed(eventHandlerName + " received after: " + message); >- }; >- }; >- }; >- >- function expectOnlyChangeEvent(message, targetDocument) { >- debug(" " + message); >- targetDocument = targetDocument !== undefined ? targetDocument : document; >- eventExpected("onwebkitpointerlockchange", message, 1, targetDocument); >- eventExpected("onwebkitpointerlockerror", message, 0, targetDocument); >- }; >- >- function expectOnlyErrorEvent(message, targetDocument) { >- debug(" " + message); >- targetDocument = targetDocument !== undefined ? targetDocument : document; >- eventExpected("onwebkitpointerlockchange", message, 0, targetDocument); >- eventExpected("onwebkitpointerlockerror", message, 1, targetDocument); >- }; >- >- function expectNoEvents(message, targetDocument) { >- debug(" " + message); >- targetDocument = targetDocument !== undefined ? targetDocument : document; >- eventExpected("onwebkitpointerlockchange", message, 0, targetDocument); >- eventExpected("onwebkitpointerlockerror", message, 0, targetDocument); >- }; >- >- currentStep = 0; >- function doNextStep(manual) >- { >- if (!window.testRunner && !manual) >- return; >- if (currentStep < todo.length) >- setTimeout(function () { todo[currentStep++](); }, 0); >- else if (currentStep++ == todo.length) >- setTimeout(function () { finishJSTest(); }, 0); >- } > todo = [ > function () { > expectNoEvents("Unlock."); > document.webkitExitPointerLock(); >- doNextStep(); >+ doNextStepWithUserGesture(); > }, > function () { > expectOnlyChangeEvent("Lock targetDiv1."); >diff --git a/LayoutTests/pointer-lock/pointerlocklost-event-expected.txt b/LayoutTests/pointer-lock/pointerlocklost-event-expected.txt >index aef0adc9ee9c2c013b2c5fda136d405534ffded2..7bc3047445054b0c35abcb5ff80b2f57f74f7249 100644 >--- a/LayoutTests/pointer-lock/pointerlocklost-event-expected.txt >+++ b/LayoutTests/pointer-lock/pointerlocklost-event-expected.txt >@@ -3,6 +3,7 @@ Test that pointerlocklost event is dispatched. > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > > >+doNextStep button for manual testing. Use keyboard to select and press (TAB, then SPACE) when pointer locked. > PASS window.testRunner is defined. > PASS navigator.webkitPointer.isLocked is true > PASS document.webkitPointerLockElement is targetdiv >diff --git a/LayoutTests/pointer-lock/pointerlocklost-event.html b/LayoutTests/pointer-lock/pointerlocklost-event.html >index 2adc1b7ddd432e2d7dc38a80ed229b18be3c9b4a..3bc316f4a4ad16a42284897d0f7ea6806eaa4d93 100644 >--- a/LayoutTests/pointer-lock/pointerlocklost-event.html >+++ b/LayoutTests/pointer-lock/pointerlocklost-event.html >@@ -2,6 +2,7 @@ > <html> > <head> > <script src="../fast/js/resources/js-test-pre.js"></script> >+<script src="resources/pointer-lock-test-harness.js"></script> > </head> > <body> > <div> >@@ -48,10 +49,6 @@ > } > } > >- currentStep = 0; >- function doNextStep() { >- setTimeout(function () { todo[currentStep++](); }, 0); >- } > todo = [ > function () { > navigator.webkitPointer.lock(targetdiv, >@@ -74,7 +71,7 @@ > // locklostHandler will catch unlocks and call doNextStep to bring us here. > shouldBe("document.webkitPointerLockElement", "null"); > shouldBe("navigator.webkitPointer.isLocked", "false"); >- doNextStep(); >+ doNextStepWithUserGesture(); > }, > function () { > navigator.webkitPointer.lock(targetdiv, >@@ -100,9 +97,8 @@ > shouldBe("document.webkitPointerLockElement", "null"); > doNextStep(); > }, >- finishJSTest > ]; >- doNextStep(); >+ doNextStepWithUserGesture(); > </script> > <script src="../fast/js/resources/js-test-post.js"></script> > </body> >diff --git a/LayoutTests/pointer-lock/resources/pointer-lock-test-harness.js b/LayoutTests/pointer-lock/resources/pointer-lock-test-harness.js >new file mode 100644 >index 0000000000000000000000000000000000000000..ec7d96f4fc1ae4f3ef90f65e3119d895ebfad6d1 >--- /dev/null >+++ b/LayoutTests/pointer-lock/resources/pointer-lock-test-harness.js >@@ -0,0 +1,62 @@ >+// Automatically add doNextStepButton to document. >+setTimeout(function () { >+ doNextStepButton = document.body.insertBefore(document.createElement("button"), document.getElementById("description").nextSibling); >+ doNextStepButton.onclick = doNextStep; >+ doNextStepButton.innerText = "doNextStep button for manual testing. Use keyboard to select and press (TAB, then SPACE) when pointer locked."; >+}, 0); >+ >+function doNextStep() >+{ >+ if (typeof(currentStep) == "undefined") >+ currentStep = 0; >+ >+ if (currentStep < todo.length) >+ setTimeout(function () { todo[currentStep++](); }, 0); >+ else if (currentStep++ == todo.length) >+ setTimeout(function () { finishJSTest(); }, 0); >+} >+ >+function doNextStepWithUserGesture() >+{ >+ if (!window.testRunner) >+ return; // Wait for human to press doNextStep button. >+ doNextStep(); >+} >+ >+function eventExpected(eventHandlerName, message, expectedCalls, targetHanderNode) >+{ >+ targetHanderNode[eventHandlerName] = function () { >+ switch (expectedCalls--) { >+ case 0: >+ testFailed(eventHandlerName + " received after: " + message); >+ finishJSTest(); >+ break; >+ case 1: >+ doNextStepWithUserGesture(); >+ default: >+ testPassed(eventHandlerName + " received after: " + message); >+ }; >+ }; >+}; >+ >+function expectOnlyChangeEvent(message, targetDocument) { >+ debug(" " + message); >+ targetDocument = targetDocument !== undefined ? targetDocument : document; >+ eventExpected("onwebkitpointerlockchange", message, 1, targetDocument); >+ eventExpected("onwebkitpointerlockerror", message, 0, targetDocument); >+}; >+ >+function expectOnlyErrorEvent(message, targetDocument) { >+ debug(" " + message); >+ targetDocument = targetDocument !== undefined ? targetDocument : document; >+ eventExpected("onwebkitpointerlockchange", message, 0, targetDocument); >+ eventExpected("onwebkitpointerlockerror", message, 1, targetDocument); >+}; >+ >+function expectNoEvents(message, targetDocument) { >+ debug(" " + message); >+ targetDocument = targetDocument !== undefined ? targetDocument : document; >+ eventExpected("onwebkitpointerlockchange", message, 0, targetDocument); >+ eventExpected("onwebkitpointerlockerror", message, 0, targetDocument); >+}; >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 90813
:
151301
|
151311