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..0390ab1b4ed5583f99886442156bce4c86e4069d |
--- /dev/null |
+++ b/LayoutTests/netinfo/basic-operation.html |
@@ -0,0 +1,26 @@ |
+<html> |
jochen (gone - plz use gerrit)
2014/05/28 11:57:03
<!DOCTYPE html>
jkarlin
2014/05/28 15:34:00
Done.
|
+<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.'); |
+ |
+ |
+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); |
jochen (gone - plz use gerrit)
2014/05/28 11:57:03
check for existence of window.internals before acc
jkarlin
2014/05/28 15:34:00
Done.
|
+ |
+</script> |
+</body> |
+</html> |