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

Unified Diff: LayoutTests/netinfo/basic-operation.html

Issue 291203002: Adds NetInfo v3 Web API to Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@netinfo1
Patch Set: Comment typo Created 6 years, 7 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: LayoutTests/netinfo/basic-operation.html
diff --git a/LayoutTests/netinfo/basic-operation.html b/LayoutTests/netinfo/basic-operation.html
new file mode 100644
index 0000000000000000000000000000000000000000..c1171f622fd2bb1fc5bbb56ad16b8bf80016e75c
--- /dev/null
+++ b/LayoutTests/netinfo/basic-operation.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/js-test.js"></script>
+<script src="resources/netinfo_common.js"></script>
+</head>
+<body>
+<script>
+description('Tests the basic operation of NetInfo.');
+
+shouldBe('typeof window.internals.observeGC', '"function"',
+'this test requires window.internals');
+
+shouldBeDefined("navigator.connection");
+shouldBeDefined("navigator.connection.type");
+
+connection.addEventListener('typechange', function(e) {
+ shouldBe("typeof connection.type", '"string"');
+ if (connection.type != newConnectionType)
+ testFailed("The connection type did not change.");
+ finishJSTest();
+});
+
+internals.setNetworkConnectionInfo(newConnectionType);
+
+</script>
+</body>
+</html>
« no previous file with comments | « LayoutTests/fast/dom/navigator-detached-no-crash-expected.txt ('k') | LayoutTests/netinfo/basic-operation-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698