Changeset 246753 in webkit
- Timestamp:
- Jun 24, 2019 12:02:40 PM (5 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r246752 r246753 1 2019-06-24 Antoine Quint <graouts@apple.com> 2 3 [Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html 4 https://bugs.webkit.org/show_bug.cgi?id=197007 5 6 Reviewed by Dean Jackson. 7 8 This test now works reliably, even if it fails the actual assertions. 9 10 * platform/mac/TestExpectations: 11 1 12 2019-06-24 Antoine Quint <graouts@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/ChangeLog
r246752 r246753 1 2019-06-24 Antoine Quint <graouts@apple.com> 2 3 [Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html 4 https://bugs.webkit.org/show_bug.cgi?id=197007 5 6 Reviewed by Dean Jackson. 7 8 Update the test from the Web Platform Tests repository following the fix for https://github.com/web-platform-tests/wpt/issues/16406. 9 10 * web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked-expected.txt: Added. 11 * web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html: 12 1 13 2019-06-24 Antoine Quint <graouts@apple.com> 2 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html
r244393 r246753 4 4 <title>Pointer Events pointer lock tests</title> 5 5 <meta name="viewport" content="width=device-width"> 6 <link rel="stylesheet" type="text/css" href=" /external/wpt/pointerevents/pointerevent_styles.css">6 <link rel="stylesheet" type="text/css" href="../pointerevent_styles.css"> 7 7 <script src="/resources/testharness.js"></script> 8 8 <script src="/resources/testharnessreport.js"></script> … … 37 37 var div1 = document.getElementById("target"); 38 38 39 on_event(div1, ' pointerdown', function(event) {39 on_event(div1, 'click', function(event) { 40 40 if (test_state == kStateInit) 41 41 div1.requestPointerLock(); 42 }); 43 on_event(div1, 'pointerup', function(event) { 44 if (test_state == kStateLocked) 42 else if (test_state == kStateLocked) 45 43 document.exitPointerLock(); 46 44 }); … … 48 46 if (test_state == kStateLocked) { 49 47 test_pointerEvent.step(function() { 50 assert_equals( last_pointer_client_pos['x'], event.clientX)51 assert_equals( last_pointer_client_pos['y'], event.clientY)52 assert_equals( last_pointer_screen_pos['x'], event.screenX)53 assert_equals( last_pointer_screen_pos['y'], event.screenY)48 assert_equals(event.clientX, last_pointer_client_pos['x'], 'clientX') 49 assert_equals(event.clientY, last_pointer_client_pos['y'], 'clientY') 50 assert_equals(event.screenX, last_pointer_screen_pos['x'], 'screenX') 51 assert_equals(event.screenY, last_pointer_screen_pos['y'], 'screenY') 54 52 }); 55 53 } else { … … 64 62 assert_equals(document.pointerLockElement, div1, "document.pointerLockElement should be div1."); 65 63 }); 64 65 var actions = new test_driver.Actions(); 66 pos_x = div1.offsetWidth / 2; 67 pos_y = div1.offsetHeight / 2; 68 for (var i = 0; i < 10; i++) { 69 // Move left and up. 70 pos_x += 10; 71 pos_y -= 10; 72 actions.pointerMove(pos_x, pos_y, {origin: div1}); 73 } 74 actions.pointerDown().pointerUp().send(); 66 75 } else if (test_state == kStateLocked) { 67 76 test_state = kStateUnlocked; … … 73 82 }); 74 83 75 var actions = new test_driver.Actions(); 76 actions.pointerMove(/* x = */ 0, /* y = */ 0, {origin: div1}).pointerDown(); 77 78 pos_x = div1.offsetWidth / 2; 79 pos_y = div1.offsetHeight / 2; 80 for (var i = 0; i < 10; i++) { 81 // Alternatively move left/right and up/down. 82 pos_x += ((-1)**i) * i * 10; 83 pos_y -= ((-1)**i) * i * 10; 84 actions.pointerMove(pos_x, pos_y, {origin: div1}); 85 } 86 actions.pointerUp().send(); 84 new test_driver.Actions().pointerMove(/* x = */ 0, /* y = */ 0, {origin: div1}).pointerDown().pointerUp().send(); 87 85 } 88 86 </script> … … 94 92 Test Description: This test checks the pointer event coordinates stays unchanged when pointer is locked. 95 93 <ol> 96 <li> Press left button down on the green rectangle and hold it.</li>97 <li>Move the mouse inside the green rectangle.</li>98 <li> Release mouse button. </li>94 <li>Click left mouse button on the green rectangle.</li> 95 <li>Move the mouse around.</li> 96 <li>Click left mouse button again. </li> 99 97 </ol> 100 98 </ol> … … 103 101 </h4> 104 102 <div id="testContainer"> 105 <div id="target" style="width: 800px;height:250px;background:green"></div>103 <div id="target" style="width:200px;height:200px;background:green"></div> 106 104 </div> 107 105 <div class="spacer"></div> -
trunk/LayoutTests/platform/mac/TestExpectations
r246752 r246753 1886 1886 imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_pointermove_on_chorded_mouse_button_when_locked-manual.html [ Skip ] 1887 1887 1888 webkit.org/b/197007 imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html [ Skip ]1889 1890 1888 webkit.org/b/192501 [ Debug ] animations/play-state-in-shorthand.html [ Pass Failure ] 1891 1889
Note: See TracChangeset
for help on using the changeset viewer.