Bug 1564710 [wpt PR 17614] - Move a pointercapture pointer test to non-wpt pointerevent tests., a=testonly

Automatic update from web-platform-tests
Move a pointercapture pointer test to non-wpt pointerevent tests.

This test initially added to wpt but the behavior is not clearly defined
in spec. So move to non-wpt pointerevents test.
See discussion in https://github.com/w3c/pointerevents/issues/291

TBR=nzolghadr@chromium.org

Change-Id: Ic871c57526681d790d6e68081f5a4bf8316e8494
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1684464
Reviewed-by: Ella Ge <eirage@chromium.org>
Commit-Queue: Ella Ge <eirage@chromium.org>
Cr-Commit-Position: refs/heads/master@{#674191}

--

wpt-commits: 060265cb71f8cbe6e9a042e245232a0fabb07048
wpt-pr: 17614
This commit is contained in:
Ella Ge 2019-07-19 19:40:26 +00:00 коммит произвёл James Graham
Родитель 3e747bcb80
Коммит 976ba3ee6a
2 изменённых файлов: 0 добавлений и 65 удалений

Просмотреть файл

@ -1,55 +0,0 @@
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<style>
iframe {
width: 300px;
height: 300px;
top: 100px;
left: 50px;
border: 0;
position: absolute;
background: green;
}
#outerFrame {
width: 500px;
height: 500px;
background: blue;
}
</style>
<body onload="run()">
<div id='outerFrame'>
<iframe id='innerFrameElement' src="resources/pointerevent_mouse_pointercapture_inactivate_pointer-iframe.html"></iframe>
</div>
</body>
<script type="text/javascript">
var test_pointerEvent = async_test("setPointerCapture: outer frame capture pointer active in inner frame");
document.addEventListener("gotpointercapture", function(){
test_pointerEvent.step(function() {
assert_unreached("It should not be possible to capture mouse pointer when it's activate in inner frame");
});
})
function captureMousePointer(event) {
outerFrame.setPointerCapture(event.pointerId);
}
function finishTest() {
test_pointerEvent.done();
}
function run() {
new test_driver.Actions()
.pointerMove(200, 200)
.pointerDown()
.pointerMove(250, 250)
.pointerUp()
.send();
}
</script>
</html>

Просмотреть файл

@ -1,10 +0,0 @@
<body id='innerFrame' style='height:500px; width: 500px; padding: 0; margin: 0;'>
<script>
document.addEventListener('pointerdown', function(event) {
top.captureMousePointer(event);
});
document.addEventListener('pointerup', function(event) {
top.finishTest();
});
</script>
</body>