Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(553)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/webusb-origin-trial-interfaces.html

Issue 2712843005: Use asserts in origin trials layout tests (Closed)
Patch Set: Address more comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/webusb-origin-trial-interfaces.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/webusb-origin-trial-interfaces.html b/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/webusb-origin-trial-interfaces.html
index ba7bd5e45ba8038b3eaf8b8e7a40fe4bd30f8d06..68a9358b16d9e8e682b5d7217ab172c518372c00 100644
--- a/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/webusb-origin-trial-interfaces.html
+++ b/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/webusb-origin-trial-interfaces.html
@@ -1,10 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8">
<!-- Generate token with the command:
-generate_token.py http://127.0.0.1:8000 WebUSB --expire-timestamp=2000000000
--->
-<meta http-equiv="origin-trial" content="Ak+Acw9/y+acA5hzmO0vOifI2G0n6g1+CiHBlyMOjjspFsPlTfvvI0nQBLCUlDkXkMQzSXzB97JmRaNNjpSyVQ0AAABOeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiV2ViVVNCIiwgImV4cGlyeSI6IDIwMDAwMDAwMDB9" />
-<!-- Generate token with the command:
generate_token.py http://127.0.0.1:8000 WebUSB2 --expire-timestamp=2000000000
-->
<meta http-equiv="origin-trial" content="AmgWWAL+v07ElzPwp9oXvY1ldvKTbMlEUFopboMutESil7WUfQNVdYFUzfai6GRq5MndTa+ln+w1gLlRw8VshwAAAABPeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiV2ViVVNCMiIsICJleHBpcnkiOiAyMDAwMDAwMDAwfQ==" />
@@ -14,22 +10,22 @@ generate_token.py http://127.0.0.1:8000 WebUSB2 --expire-timestamp=2000000000
<script src="../../resources/origin-trials-helper.js"></script>
<script>
test(t => {
- var interfaces =
- OriginTrialsHelper.get_interface_names(this,
- ['Navigator',
- 'USBAlternateInterface',
- 'USBConfiguration',
- 'USBConnectionEvent',
- 'USBDevice',
- 'USBEndpoint',
- 'USBInTransferResult',
- 'USBInterface',
- 'USBIsochronousInTransferPacket',
- 'USBIsochronousInTransferResult',
- 'USBIsochronousOutTransferPacket',
- 'USBIsochronousOutTransferResult',
- 'USBOutTransferResult'],
- {'Navigator': ['usb']});
- console.log('Interfaces in document\n' + interfaces);
+ OriginTrialsHelper.check_properties(this, {'Navigator': ['usb']});
+}, "WebUSB related properties on interfaces in Origin-Trial enabled document.");
+
+test(t => {
+ OriginTrialsHelper.check_interfaces(this,
+ ['USBAlternateInterface',
+ 'USBConfiguration',
+ 'USBConnectionEvent',
+ 'USBDevice',
+ 'USBEndpoint',
+ 'USBInTransferResult',
+ 'USBInterface',
+ 'USBIsochronousInTransferPacket',
+ 'USBIsochronousInTransferResult',
+ 'USBIsochronousOutTransferPacket',
+ 'USBIsochronousOutTransferResult',
+ 'USBOutTransferResult']);
}, "WebUSB related interfaces in Origin-Trial enabled document.");
</script>

Powered by Google App Engine
This is Rietveld 408576698