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

Unified Diff: LayoutTests/netinfo/resources/web-worker.js

Issue 299883004: Adds WebWorker support to NetInfo v3. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@netinfo3
Patch Set: Regolding webexposed/ layout tests 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
« no previous file with comments | « no previous file | LayoutTests/netinfo/web-worker.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/netinfo/resources/web-worker.js
diff --git a/LayoutTests/netinfo/resources/web-worker.js b/LayoutTests/netinfo/resources/web-worker.js
new file mode 100644
index 0000000000000000000000000000000000000000..32b8bc40acb7e437ee3f1227f9682163e55144bc
--- /dev/null
+++ b/LayoutTests/netinfo/resources/web-worker.js
@@ -0,0 +1,7 @@
+addEventListener('message', function(e) {
+ self.postMessage(navigator.connection.type);
+}, false);
+
+navigator.connection.addEventListener('typechange', function() {
+ self.postMessage(navigator.connection.type);
+}, false);
« no previous file with comments | « no previous file | LayoutTests/netinfo/web-worker.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698