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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/netinfo/netinfo-basics.html

Issue 2908103002: NetInfo external Web LayoutTest (Closed)
Patch Set: foolip comments: merge back to single file Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/external/wpt/netinfo/netinfo-basics.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/netinfo/netinfo-basics.html b/third_party/WebKit/LayoutTests/external/wpt/netinfo/netinfo-basics.html
new file mode 100644
index 0000000000000000000000000000000000000000..e0c584a459ecfb92bb5bc967ac2066832ecacc97
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/netinfo/netinfo-basics.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>NetInfo basic functionality</title>
+<link rel="help" href="https://wicg.github.io/netinfo/">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<script>
+test(function() {
+ assert_in_array(navigator.connection.type, ["bluetooth", "cellular",
+ "ethernet", "mixed", "none", "other", "unknown", "wifi", "wimax"], 'type is unexpected');
+ });
foolip 2017/06/07 10:26:50 This is now live at http://w3c-test.org/netinfo/ne
+
+test(function() {
+ assert_greater_than_equal(navigator.connection.downlinkMax, 0);
+ });
+
+test(function() {
+ assert_in_array(navigator.connection.effectiveType, ["slow-2g", "2g",
+ "3g", "4g"], 'effectiveType is unexpected');
+ });
+
+test(function() {
+ assert_greater_than_equal(navigator.connection.rtt, 0);
+ assert_equals(navigator.connection.rtt % 25, 0,
+ 'rtt must be a multiple of 25 msec');
+ });
+
+test(function() {
+ assert_greater_than_equal(navigator.connection.downlink, 0);
+ var downlink = navigator.connection.downlink ;
+ assert_equals(((downlink - Math.floor(downlink)) *1000) % 25, 0,
+ 'downlink must be a multiple of 25 kbps');
+ });
+</script>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698