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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <title>NetInfo basic functionality</title>
4 <link rel="help" href="https://wicg.github.io/netinfo/">
5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script>
7
8 <script>
9 test(function() {
10 assert_in_array(navigator.connection.type, ["bluetooth", "cellular",
11 "ethernet", "mixed", "none", "other", "unknown", "wifi", "wimax"], 'type is unexpected');
12 });
foolip 2017/06/07 10:26:50 This is now live at http://w3c-test.org/netinfo/ne
13
14 test(function() {
15 assert_greater_than_equal(navigator.connection.downlinkMax, 0);
16 });
17
18 test(function() {
19 assert_in_array(navigator.connection.effectiveType, ["slow-2g", "2g",
20 "3g", "4g"], 'effectiveType is unexpected');
21 });
22
23 test(function() {
24 assert_greater_than_equal(navigator.connection.rtt, 0);
25 assert_equals(navigator.connection.rtt % 25, 0,
26 'rtt must be a multiple of 25 msec');
27 });
28
29 test(function() {
30 assert_greater_than_equal(navigator.connection.downlink, 0);
31 var downlink = navigator.connection.downlink ;
32 assert_equals(((downlink - Math.floor(downlink)) *1000) % 25, 0,
33 'downlink must be a multiple of 25 kbps');
34 });
35 </script>
OLDNEW
« 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