Skip to content

Commit

Permalink
Combine two event style tests
Browse files Browse the repository at this point in the history
Two tests where similar, so other was delete.
  • Loading branch information
JuhaVainio committed Feb 23, 2024
1 parent 23376d3 commit a5ae206
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions device-posture/device-posture.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
}, name, properties);
}

// REFERENCE https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/http/tests/inspector-protocol/device-posture/device-posture-change-event.js
device_posture_test(async (t) => {
const watcher = new EventWatcher(t, navigator.devicePosture, ['change']);
const postures = ['folded', 'continuous', 'folded'];
Expand All @@ -26,23 +27,6 @@
assert_equals(posture, navigator.devicePosture.type);
});
}
}, 'Device posture test.');





// REFERENCE https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/http/tests/inspector-protocol/device-posture/device-posture-change-event.js
device_posture_test(async (t) => {
assert_equals(navigator.devicePosture.type, 'continuous');

const promise = new Promise(resolve => {
navigator.devicePosture.onchange = function() {
resolve(navigator.devicePosture.type);
}
});
test_driver.set_device_posture('folded');
assert_equals(await promise, 'folded')
}, 'Device posture test: device-posture-change-event.js.');

// REFERENCE https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/http/tests/inspector-protocol/device-posture/device-posture-default.js
Expand Down

0 comments on commit a5ae206

Please sign in to comment.