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 2926103002: Add test names for NetInfo tests (Closed)
Patch Set: 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <meta charset="utf-8"> 2 <meta charset="utf-8">
3 <title>NetInfo basic functionality</title> 3 <title>NetInfo basic functionality</title>
4 <link rel="help" href="https://wicg.github.io/netinfo/"> 4 <link rel="help" href="https://wicg.github.io/netinfo/">
5 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script> 6 <script src="/resources/testharnessreport.js"></script>
7 7
8 <script> 8 <script>
9 test(function() { 9 test(function() {
10 assert_in_array(navigator.connection.type, ["bluetooth", "cellular", 10 assert_in_array(navigator.connection.type, ["bluetooth", "cellular",
11 "ethernet", "mixed", "none", "other", "unknown", "wifi", "wimax"], 'type is unexpected'); 11 "ethernet", "mixed", "none", "other", "unknown", "wifi", "wimax"], 'type is unexpected');
12 }); 12 }, "type attribute");
13 13
14 test(function() { 14 test(function() {
15 assert_greater_than_equal(navigator.connection.downlinkMax, 0); 15 assert_greater_than_equal(navigator.connection.downlinkMax, 0);
16 }); 16 }, "downlinkMax attribute");
17 17
18 test(function() { 18 test(function() {
19 assert_in_array(navigator.connection.effectiveType, ["slow-2g", "2g", 19 assert_in_array(navigator.connection.effectiveType, ["slow-2g", "2g",
20 "3g", "4g"], 'effectiveType is unexpected'); 20 "3g", "4g"], 'effectiveType is unexpected');
21 }); 21 }, "effectiveType attribute");
22 22
23 test(function() { 23 test(function() {
24 assert_greater_than_equal(navigator.connection.rtt, 0); 24 assert_greater_than_equal(navigator.connection.rtt, 0);
25 assert_equals(navigator.connection.rtt % 25, 0, 25 assert_equals(navigator.connection.rtt % 25, 0,
26 'rtt must be a multiple of 25 msec'); 26 'rtt must be a multiple of 25 msec');
27 }); 27 }, "rtt attribute");
28 28
29 test(function() { 29 test(function() {
30 assert_greater_than_equal(navigator.connection.downlink, 0); 30 assert_greater_than_equal(navigator.connection.downlink, 0);
31 var downlink = navigator.connection.downlink ; 31 var downlink = navigator.connection.downlink ;
32 assert_equals(((downlink - Math.floor(downlink)) *1000) % 25, 0, 32 assert_equals(((downlink - Math.floor(downlink)) *1000) % 25, 0,
33 'downlink must be a multiple of 25 kbps'); 33 'downlink must be a multiple of 25 kbps');
34 }); 34 }, "downlink attribute");
35 </script> 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