merge b2g-inbound to mozilla-central a=merge
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 10 Jul 2014 14:40:40 +0200
changeset 193185 41e1a83bd7f7d31fde5c9f52dc707a086f003b84
parent 193136 cb75d6cfb004622e48a0b1b976c5cd2f124c0fe9 (current diff)
parent 193184 043616495f5d263267e4d8acff7c0b752be4578f (diff)
child 193272 6e9f72bdd32ed5533d1f90b75b39ac6dafaf2bb8
push id27111
push usercbook@mozilla.com
push dateThu, 10 Jul 2014 12:41:20 +0000
treeherdermozilla-central@41e1a83bd7f7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
merge b2g-inbound to mozilla-central a=merge
dom/network/interfaces/nsIEthernetManager.idl
dom/network/src/EthernetManager.js
dom/network/src/EthernetManager.manifest
dom/network/tests/marionette/head.js
dom/network/tests/marionette/manifest.ini
dom/network/tests/marionette/test_ethernet_add_interface.js
dom/network/tests/marionette/test_ethernet_connect_with_dhcp.js
dom/network/tests/marionette/test_ethernet_connect_with_static_ip.js
dom/network/tests/marionette/test_ethernet_disable.js
dom/network/tests/marionette/test_ethernet_disconnect.js
dom/network/tests/marionette/test_ethernet_enable.js
dom/network/tests/marionette/test_ethernet_ip_mode_change.js
dom/network/tests/marionette/test_ethernet_reconnect_with_dhcp.js
dom/network/tests/marionette/test_ethernet_reconnect_with_static_ip.js
dom/network/tests/marionette/test_ethernet_remove_interface.js
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="0d616942c300d9fb142483210f1dda9096c9a9fc">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="4e4e579b4b1e35f863ed43ef6ba840f49bfd761c"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="09642e74e250fbc62db860c808ef188628fca55d"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="230f11aff069d90d20fc2dc63b48e9ae3d4bdcd1"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="bf9aaf39dd5a6491925a022db167c460f8207d34"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="dc5ca96695cab87b4c2fcd7c9f046ae3415a70a5"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="ee6e7320bb83409ebd4685fbd87a8ae033704182"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="cc67f31dc638c0b7edba3cf7e3d87cadf0ed52bf">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="4e4e579b4b1e35f863ed43ef6ba840f49bfd761c"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="09642e74e250fbc62db860c808ef188628fca55d"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="230f11aff069d90d20fc2dc63b48e9ae3d4bdcd1"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="dc5ca96695cab87b4c2fcd7c9f046ae3415a70a5"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="ee6e7320bb83409ebd4685fbd87a8ae033704182"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="276ce45e78b09c4a4ee643646f691d22804754c1">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="4e4e579b4b1e35f863ed43ef6ba840f49bfd761c"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="09642e74e250fbc62db860c808ef188628fca55d"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="230f11aff069d90d20fc2dc63b48e9ae3d4bdcd1"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="dc5ca96695cab87b4c2fcd7c9f046ae3415a70a5"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="ee6e7320bb83409ebd4685fbd87a8ae033704182"/>
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="0d616942c300d9fb142483210f1dda9096c9a9fc">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="4e4e579b4b1e35f863ed43ef6ba840f49bfd761c"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="09642e74e250fbc62db860c808ef188628fca55d"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="230f11aff069d90d20fc2dc63b48e9ae3d4bdcd1"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="bf9aaf39dd5a6491925a022db167c460f8207d34"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="dc5ca96695cab87b4c2fcd7c9f046ae3415a70a5"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="ee6e7320bb83409ebd4685fbd87a8ae033704182"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/flame/sources.xml
+++ b/b2g/config/flame/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="cc67f31dc638c0b7edba3cf7e3d87cadf0ed52bf">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="4e4e579b4b1e35f863ed43ef6ba840f49bfd761c"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="09642e74e250fbc62db860c808ef188628fca55d"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="230f11aff069d90d20fc2dc63b48e9ae3d4bdcd1"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="dc5ca96695cab87b4c2fcd7c9f046ae3415a70a5"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="ee6e7320bb83409ebd4685fbd87a8ae033704182"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="e95b4ce22c825da44d14299e1190ea39a5260bde"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="471afab478649078ad7c75ec6b252481a59e19b8"/>
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,9 +1,9 @@
 {
     "git": {
         "git_revision": "", 
         "remote": "", 
         "branch": ""
     }, 
-    "revision": "158fb07e2e4939dddee026a33a05d65e38bb0e67", 
+    "revision": "056dbe15b2aac2b252a119c211a85cb14165aa81", 
     "repo_path": "/integration/gaia-central"
 }
--- a/b2g/config/hamachi/sources.xml
+++ b/b2g/config/hamachi/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="b2g/ics_strawberry" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="0d616942c300d9fb142483210f1dda9096c9a9fc">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="4e4e579b4b1e35f863ed43ef6ba840f49bfd761c"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="09642e74e250fbc62db860c808ef188628fca55d"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="230f11aff069d90d20fc2dc63b48e9ae3d4bdcd1"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="dc5ca96695cab87b4c2fcd7c9f046ae3415a70a5"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="ee6e7320bb83409ebd4685fbd87a8ae033704182"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
   <project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
--- a/b2g/config/helix/sources.xml
+++ b/b2g/config/helix/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <default remote="caf" revision="b2g/ics_strawberry" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="0d616942c300d9fb142483210f1dda9096c9a9fc">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="4e4e579b4b1e35f863ed43ef6ba840f49bfd761c"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="09642e74e250fbc62db860c808ef188628fca55d"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="230f11aff069d90d20fc2dc63b48e9ae3d4bdcd1"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="dc5ca96695cab87b4c2fcd7c9f046ae3415a70a5"/>
   <project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
   <project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
--- a/b2g/config/nexus-4/sources.xml
+++ b/b2g/config/nexus-4/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="cc67f31dc638c0b7edba3cf7e3d87cadf0ed52bf">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="4e4e579b4b1e35f863ed43ef6ba840f49bfd761c"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="09642e74e250fbc62db860c808ef188628fca55d"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="230f11aff069d90d20fc2dc63b48e9ae3d4bdcd1"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="dc5ca96695cab87b4c2fcd7c9f046ae3415a70a5"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="ee6e7320bb83409ebd4685fbd87a8ae033704182"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
--- a/b2g/config/wasabi/sources.xml
+++ b/b2g/config/wasabi/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="ics_chocolate_rb4.2" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="0d616942c300d9fb142483210f1dda9096c9a9fc">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="4e4e579b4b1e35f863ed43ef6ba840f49bfd761c"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="09642e74e250fbc62db860c808ef188628fca55d"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="230f11aff069d90d20fc2dc63b48e9ae3d4bdcd1"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="dc5ca96695cab87b4c2fcd7c9f046ae3415a70a5"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="ee6e7320bb83409ebd4685fbd87a8ae033704182"/>
   <project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -400,18 +400,16 @@
 @BINPATH@/components/nsSidebar.js
 
 ; WiFi, NetworkManager, NetworkStats
 #ifdef MOZ_WIDGET_GONK
 @BINPATH@/components/DOMWifiManager.js
 @BINPATH@/components/DOMWifiManager.manifest
 @BINPATH@/components/DOMWifiP2pManager.js
 @BINPATH@/components/DOMWifiP2pManager.manifest
-@BINPATH@/components/EthernetManager.js
-@BINPATH@/components/EthernetManager.manifest
 @BINPATH@/components/NetworkInterfaceListService.js
 @BINPATH@/components/NetworkInterfaceListService.manifest
 @BINPATH@/components/NetworkManager.js
 @BINPATH@/components/NetworkManager.manifest
 @BINPATH@/components/NetworkService.js
 @BINPATH@/components/NetworkService.manifest
 @BINPATH@/components/NetworkStatsManager.js
 @BINPATH@/components/NetworkStatsManager.manifest
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1510,16 +1510,35 @@ Navigator::GetFeature(const nsAString& a
       mozilla::dom::ContentChild* cc =
         mozilla::dom::ContentChild::GetSingleton();
       nsRefPtr<Promise> ipcRef(p);
       cc->SendGetSystemMemory(reinterpret_cast<uint64_t>(ipcRef.forget().take()));
     }
     return p.forget();
   } // hardware.memory
 #endif
+
+  // Hardcoded manifest features. Some are still b2g specific.
+  const char manifestFeatures[][64] = {
+    "manifest.origin"
+  , "manifest.redirects"
+#ifdef MOZ_B2G
+  , "manifest.chrome.navigation"
+  , "manifest.precompile"
+#endif
+  };
+
+  nsAutoCString feature = NS_ConvertUTF16toUTF8(aName);
+  for (uint32_t i = 0; i < MOZ_ARRAY_LENGTH(manifestFeatures); i++) {
+    if (feature.Equals(manifestFeatures[i])) {
+      p->MaybeResolve(true);
+      return p.forget();
+    }
+  }
+
   // resolve with <undefined> because the feature name is not supported
   p->MaybeResolve(JS::UndefinedHandleValue);
 
   return p.forget();
 }
 
 
 PowerManager*
--- a/dom/base/test/test_getFeature_with_perm.html
+++ b/dom/base/test/test_getFeature_with_perm.html
@@ -33,38 +33,77 @@ function testSupported() {
 
     if (isLinux || isAndroid || isB2G) {
       ok(typeof mem === 'number' && (mem) % 1 === 0, "We should receive an integer on this platform");
       ok(mem > 0, "hardware.memory is supported on this platform. mem=" + mem + "MiB");
     } else {
       ok(typeof mem === 'undefined', "hardware.memory is not support on this platform");
     }
 
-    SimpleTest.finish();
+    runNextTest();
 
   },function(mem) {
     ok(false, "The Promise should not be rejected");
   });
 }
 
 function testNotSupported() {
   var tv;
   navigator.getFeature("hardware.tv").then(function(tv) {
     ok(typeof tv === 'undefined', "Resolve the Promise with undefined value (hardware.tv)");
-    testSupported();
+    runNextTest();
   },function(tv) {
     ok(false, "The Promise should not be rejected")
   });
 }
 
+function createManifestTest(aFeature) {
+  return function() {
+    var res;
+    navigator.getFeature(aFeature).then(function(res) {
+      ok(res === true, "Resolve the Promise with 'true' for " + aFeature);
+      runNextTest();
+    },function(tv) {
+      ok(false, "The Promise should not be rejected")
+    });
+  }
+}
+
+var currentTest = -1;
+var tests = [
+  testNotSupported,
+  testSupported,
+  createManifestTest("manifest.origin"),
+  createManifestTest("manifest.redirects")
+];
+
+function runNextTest() {
+  currentTest++;
+  if (currentTest < tests.length) {
+    tests[currentTest]();
+  } else {
+    SimpleTest.finish();
+  }
+}
+
+info("About to run " + tests.length + " tests");
+
 SpecialPowers.pushPermissions([
   {type: "feature-detection", allow: 1, context: document}
 ], function() {
   ok('getFeature' in navigator, "navigator.getFeature should exist");
-  testNotSupported();
+  // B2G specific manifest features.
+  // Touching navigator before pushPermissions makes it fail.
+  if (!navigator.userAgent.contains("Android") &&
+        /Mobile|Tablet/.test(navigator.userAgent)) {
+    info("Adding B2G specific tests");
+    tests.push(createManifestTest("manifest.chrome.navigation"));
+    tests.push(createManifestTest("manifest.precompile"));
+  }
+  runNextTest();
   ok(true, "Test DONE");
 });
 
 SimpleTest.waitForExplicitFinish();
 
 </script>
 </body>
 </html>
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -168,16 +168,20 @@ DOMInterfaces = {
 'BluetoothManager': {
     'nativeType': 'mozilla::dom::bluetooth::BluetoothManager',
 },
 
 'BluetoothDiscoveryHandle': {
     'nativeType': 'mozilla::dom::bluetooth::BluetoothDiscoveryHandle',
 },
 
+'BluetoothClassOfDevice': {
+    'nativeType': 'mozilla::dom::bluetooth::BluetoothClassOfDevice',
+},
+
 'CameraCapabilities': {
     'nativeType': 'mozilla::dom::CameraCapabilities',
     'headerFile': 'DOMCameraCapabilities.h'
 },
 
 'CameraControl': {
     'nativeType': 'mozilla::nsDOMCameraControl',
     'headerFile': 'DOMCameraControl.h',
new file mode 100644
--- /dev/null
+++ b/dom/bluetooth2/BluetoothClassOfDevice.cpp
@@ -0,0 +1,105 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim:set ts=2 sw=2 sts=2 et cindent: */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "BluetoothClassOfDevice.h"
+
+#include "mozilla/dom/BluetoothClassOfDeviceBinding.h"
+#include "nsThreadUtils.h"
+
+USING_BLUETOOTH_NAMESPACE
+
+NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(BluetoothClassOfDevice, mOwnerWindow)
+NS_IMPL_CYCLE_COLLECTING_ADDREF(BluetoothClassOfDevice)
+NS_IMPL_CYCLE_COLLECTING_RELEASE(BluetoothClassOfDevice)
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(BluetoothClassOfDevice)
+  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
+  NS_INTERFACE_MAP_ENTRY(nsISupports)
+NS_INTERFACE_MAP_END
+
+/*
+ * Class of Device(CoD): 32-bit unsigned integer
+ *
+ *  31   24  23    13 12     8 7      2 1 0
+ * |       | Major   | Major  | Minor  |   |
+ * |       | service | device | device |   |
+ * |       | class   | class  | class  |   |
+ * |       |<- 11  ->|<- 5  ->|<- 6  ->|   |
+ *
+ * https://www.bluetooth.org/en-us/specification/assigned-numbers/baseband
+ */
+
+// Bit 23 ~ Bit 13: Major service class
+#define GET_MAJOR_SERVICE_CLASS(cod) (((cod) & 0xffe000) >> 13)
+
+// Bit 12 ~ Bit 8: Major device class
+#define GET_MAJOR_DEVICE_CLASS(cod)  (((cod) & 0x1f00) >> 8)
+
+// Bit 7 ~ Bit 2: Minor device class
+#define GET_MINOR_DEVICE_CLASS(cod)  (((cod) & 0xfc) >> 2)
+
+BluetoothClassOfDevice::BluetoothClassOfDevice(nsPIDOMWindow* aOwner)
+  : mOwnerWindow(aOwner)
+{
+  MOZ_ASSERT(aOwner);
+  SetIsDOMBinding();
+
+  Reset();
+}
+
+BluetoothClassOfDevice::~BluetoothClassOfDevice()
+{}
+
+void
+BluetoothClassOfDevice::Reset()
+{
+  mMajorServiceClass = 0x1; // LIMITED_DISCOVERABILITY
+  mMajorDeviceClass = 0x1F; // UNCATEGORIZED
+  mMinorDeviceClass = 0;
+}
+
+bool
+BluetoothClassOfDevice::Equals(const uint32_t aValue)
+{
+  return (mMajorServiceClass == GET_MAJOR_SERVICE_CLASS(aValue) &&
+          mMajorDeviceClass == GET_MAJOR_DEVICE_CLASS(aValue) &&
+          mMinorDeviceClass == GET_MINOR_DEVICE_CLASS(aValue));
+}
+
+uint32_t
+BluetoothClassOfDevice::ToUint32()
+{
+  return (mMajorServiceClass & 0x7ff) << 13 |
+         (mMajorDeviceClass & 0x1f) << 8 |
+         (mMinorDeviceClass & 0x3f) << 2;
+}
+
+void
+BluetoothClassOfDevice::Update(const uint32_t aValue)
+{
+  mMajorServiceClass = GET_MAJOR_SERVICE_CLASS(aValue);
+  mMajorDeviceClass = GET_MAJOR_DEVICE_CLASS(aValue);
+  mMinorDeviceClass = GET_MINOR_DEVICE_CLASS(aValue);
+
+  BT_API2_LOGR("aValue %x => majorService %x majorDevice %x minorDevice %x",
+  	aValue, mMajorServiceClass, mMajorDeviceClass, mMinorDeviceClass);
+}
+
+// static
+already_AddRefed<BluetoothClassOfDevice>
+BluetoothClassOfDevice::Create(nsPIDOMWindow* aOwner)
+{
+  MOZ_ASSERT(NS_IsMainThread());
+  MOZ_ASSERT(aOwner);
+
+  nsRefPtr<BluetoothClassOfDevice> cod = new BluetoothClassOfDevice(aOwner);
+  return cod.forget();
+}
+
+JSObject*
+BluetoothClassOfDevice::WrapObject(JSContext* aCx)
+{
+  return BluetoothClassOfDeviceBinding::Wrap(aCx, this);
+}
new file mode 100644
--- /dev/null
+++ b/dom/bluetooth2/BluetoothClassOfDevice.h
@@ -0,0 +1,92 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim:set ts=2 sw=2 sts=2 et cindent: */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef mozilla_dom_bluetooth_bluetoothclassofdevice_h
+#define mozilla_dom_bluetooth_bluetoothclassofdevice_h
+
+#include "BluetoothCommon.h"
+#include "mozilla/Attributes.h"
+#include "mozilla/ErrorResult.h"
+#include "nsCycleCollectionParticipant.h"
+#include "nsPIDOMWindow.h"
+#include "nsWrapperCache.h"
+
+struct JSContext;
+
+BEGIN_BLUETOOTH_NAMESPACE
+
+class BluetoothClassOfDevice MOZ_FINAL : public nsISupports,
+                                         public nsWrapperCache
+{
+public:
+  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
+  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(BluetoothClassOfDevice)
+
+  static already_AddRefed<BluetoothClassOfDevice>
+    Create(nsPIDOMWindow* aOwner);
+
+  uint16_t MajorServiceClass() const
+  {
+    return mMajorServiceClass;
+  }
+
+  uint8_t MajorDeviceClass() const
+  {
+    return mMajorDeviceClass;
+  }
+
+  uint8_t MinorDeviceClass() const
+  {
+    return mMinorDeviceClass;
+  }
+
+  /**
+   * Compare whether CoD equals to CoD value.
+   *
+   * @param aValue [in] CoD value to compare
+   */
+  bool Equals(const uint32_t aValue);
+
+  /**
+   * Convert CoD to uint32_t CoD value.
+   *
+   * TODO: Remove this function once we replace uint32_t cod value with
+   *       BluetoothClassOfDevice in BluetoothProfileController.
+   */
+  uint32_t ToUint32();
+
+  /**
+   * Update CoD.
+   *
+   * @param aValue [in] CoD value to update
+   */
+  void Update(const uint32_t aValue);
+
+  nsPIDOMWindow* GetParentObject() const
+  {
+    return mOwnerWindow;
+  }
+  virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
+
+private:
+  BluetoothClassOfDevice(nsPIDOMWindow* aOwner);
+  ~BluetoothClassOfDevice();
+
+  /**
+   * Reset CoD to default value.
+   */
+  void Reset();
+
+  uint16_t mMajorServiceClass;
+  uint8_t mMajorDeviceClass;
+  uint8_t mMinorDeviceClass;
+
+  nsCOMPtr<nsPIDOMWindow> mOwnerWindow;
+};
+
+END_BLUETOOTH_NAMESPACE
+
+#endif // mozilla_dom_bluetooth_bluetoothclassofdevice_h
--- a/dom/bluetooth2/BluetoothProfileController.h
+++ b/dom/bluetooth2/BluetoothProfileController.h
@@ -22,29 +22,29 @@ BEGIN_BLUETOOTH_NAMESPACE
  * |       | service | device | device |   |
  * |       | class   | class  | class  |   |
  * |       |<- 11  ->|<- 5  ->|<- 6  ->|   |
  *
  * https://www.bluetooth.org/en-us/specification/assigned-numbers/baseband
  */
 
 // Bit 23 ~ Bit 13: Major service class
-#define GET_MAJOR_SERVICE_CLASS(cod) ((cod & 0xffe000) >> 13)
+#define GET_MAJOR_SERVICE_CLASS(cod) (((cod) & 0xffe000) >> 13)
 
 // Bit 12 ~ Bit 8: Major device class
-#define GET_MAJOR_DEVICE_CLASS(cod)  ((cod & 0x1f00) >> 8)
+#define GET_MAJOR_DEVICE_CLASS(cod)  (((cod) & 0x1f00) >> 8)
 
 // Bit 7 ~ Bit 2: Minor device class
-#define GET_MINOR_DEVICE_CLASS(cod)  ((cod & 0xfc) >> 2)
+#define GET_MINOR_DEVICE_CLASS(cod)  (((cod) & 0xfc) >> 2)
 
 // Audio: Major service class = 0x100 (Bit 21 is set)
-#define HAS_AUDIO(cod)               (cod & 0x200000)
+#define HAS_AUDIO(cod)               ((cod) & 0x200000)
 
 // Rendering: Major service class = 0x20 (Bit 18 is set)
-#define HAS_RENDERING(cod)           (cod & 0x40000)
+#define HAS_RENDERING(cod)           ((cod) & 0x40000)
 
 // Peripheral: Major device class = 0x5
 #define IS_PERIPHERAL(cod)           (GET_MAJOR_DEVICE_CLASS(cod) == 0x5)
 
 // Remote Control: sub-field of minor device class, Bit 5 ~ Bit 2 = 0x3
 #define IS_REMOTE_CONTROL(cod)       ((GET_MINOR_DEVICE_CLASS(cod) & 0xf) == 0x3)
 
 // Keyboard: sub-field of minor device class (Bit 6)
--- a/dom/bluetooth2/moz.build
+++ b/dom/bluetooth2/moz.build
@@ -2,16 +2,17 @@
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 if CONFIG['MOZ_B2G_BT']:
     SOURCES += [
         'BluetoothAdapter.cpp',
+        'BluetoothClassOfDevice.cpp',
         'BluetoothDevice.cpp',
         'BluetoothDiscoveryHandle.cpp',
         'BluetoothHidManager.cpp',
         'BluetoothManager.cpp',
         'BluetoothProfileController.cpp',
         'BluetoothReplyRunnable.cpp',
         'BluetoothService.cpp',
         'BluetoothUuid.cpp',
@@ -88,16 +89,17 @@ if CONFIG['MOZ_B2G_BT']:
     ]
 
 EXPORTS.mozilla.dom.bluetooth.ipc += [
     'ipc/BluetoothMessageUtils.h',
 ]
 
 EXPORTS.mozilla.dom.bluetooth += [
     'BluetoothAdapter.h',
+    'BluetoothClassOfDevice.h',
     'BluetoothCommon.h',
     'BluetoothDevice.h',
     'BluetoothDiscoveryHandle.h',
     'BluetoothManager.h',
 ]
 
 IPDL_SOURCES += [
     'ipc/BluetoothTypes.ipdlh',
--- a/dom/network/interfaces/moz.build
+++ b/dom/network/interfaces/moz.build
@@ -13,13 +13,12 @@ XPIDL_SOURCES += [
     'nsITCPSocketChild.idl',
     'nsITCPSocketParent.idl',
     'nsIUDPSocketChild.idl',
 ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
     XPIDL_SOURCES += [
         'nsIDOMNetworkStatsManager.idl',
-        'nsIEthernetManager.idl',
         'nsINetworkStatsServiceProxy.idl',
     ]
 
 XPIDL_MODULE = 'dom_network'
deleted file mode 100644
--- a/dom/network/interfaces/nsIEthernetManager.idl
+++ /dev/null
@@ -1,137 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-[scriptable, function, uuid(2a3ad56c-edc0-439f-8aae-900b331ddf49)]
-interface nsIEthernetManagerCallback : nsISupports
-{
-  /**
-   * Callback function used to report the success of different operations.
-   *
-   * @param success
-   *        Boolean value indicates the success of an operation.
-   * @prarm message
-   *        Message reported in the end of operation.
-   */
-  void notify(in boolean success, in DOMString message);
-};
-
-[scriptable, function, uuid(1746e7dd-92d4-43fa-8ef4-bc13d0b60353)]
-interface nsIEthernetManagerScanCallback : nsISupports
-{
-  /**
-   * Callback function used to report the result of scan function.
-   *
-   * @param list
-   *        List of available ethernet interfaces.
-   */
-  void notify(in jsval list);
-};
-
-/**
- * An internal idl provides control to ethernet interfaces.
- */
-[scriptable, uuid(a96441dd-36b3-4f7f-963b-2c032e28a039)]
-interface nsIEthernetManager : nsISupports
-{
-  /**
-   * List of exisiting interface name.
-   */
-  readonly attribute jsval interfaceList;
-
-  /**
-   * Scan available ethernet interfaces on device.
-   *
-   * @param callback
-   *        Callback function.
-   */
-  void scan(in nsIEthernetManagerScanCallback callback);
-
-  /**
-   * Add a new interface to the interface list.
-   *
-   * @param ifname
-   *        Interface name. Should be the form of "eth*".
-   * @param callback
-   *        Callback function.
-   */
-  void addInterface(in DOMString ifname,
-                    in nsIEthernetManagerCallback callback);
-
-  /**
-   * Remove an existing interface from the interface list.
-   *
-   * @param ifname
-   *        Interface name.
-   * @param Callback
-   *        Callback function.
-   */
-  void removeInterface(in DOMString ifname,
-                       in nsIEthernetManagerCallback callback);
-
-  /**
-   * Update a conifg of an existing interface in the interface list.
-   *
-   * @param ifname
-   *        Interface name.
-   * @param config
-   *        .ip: ip address.
-   *        .prefixLength: mask length.
-   *        .gateway: gateway.
-   *        .dnses: dnses.
-   *        .httpProxyHost: http proxy host.
-   *        .httpProxyPort: http porxy port.
-   *        .ipMode: ip mode, can be 'dhcp' or 'static'.
-   * @param callback
-   *        Callback function.
-   */
-  void updateInterfaceConfig(in DOMString ifname,
-                             in jsval config,
-                             in nsIEthernetManagerCallback callback);
-
-  /**
-   * Enable networking of an existing interface in the interface list.
-   *
-   * @param ifname
-   *        Interface name.
-   * @param callback
-   *        Callback function.
-   */
-  void enable(in DOMString ifname,
-              in nsIEthernetManagerCallback callback);
-
-  /**
-   * Disable networking of an existing interface in the interface list.
-   *
-   * @param ifname
-   *        Interface name.
-   * @param callback
-   *        Callback function.
-   */
-  void disable(in DOMString ifname,
-               in nsIEthernetManagerCallback callback);
-
-  /**
-   * Make an existing interface connect to network.
-   *
-   * @param ifname
-   *        Interface name.
-   * @param callback
-   *        Callback function.
-   */
-  void connect(in DOMString ifname,
-               in nsIEthernetManagerCallback callback);
-
-  /**
-   * Disconnect a connected interface in the interface list.
-   *
-   * @param ifname
-   *        Interface name.
-   * @param callback
-   *        Callback function.
-   */
-  void disconnect(in DOMString ifname,
-                  in nsIEthernetManagerCallback callback);
-};
deleted file mode 100644
--- a/dom/network/src/EthernetManager.js
+++ /dev/null
@@ -1,619 +0,0 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-const DEBUG = false;
-function debug(s) {
-  if (DEBUG) {
-    dump("-*- EthernetManager: " + s + "\n");
-  }
-}
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-const TOPIC_INTERFACE_STATE_CHANGED = "network-interface-state-changed";
-
-const ETHERNET_NETWORK_IFACE_PREFIX = "eth";
-const DEFAULT_ETHERNET_NETWORK_IFACE = "eth0";
-
-const INTERFACE_IPADDR_NULL = "0.0.0.0";
-const INTERFACE_GATEWAY_NULL = "0.0.0.0";
-const INTERFACE_PREFIX_NULL = 0;
-const INTERFACE_MACADDR_NULL = "00:00:00:00:00:00";
-
-const NETWORK_INTERFACE_UP   = "up";
-const NETWORK_INTERFACE_DOWN = "down";
-
-const IP_MODE_DHCP = "dhcp";
-const IP_MODE_STATIC = "static";
-
-XPCOMUtils.defineLazyServiceGetter(this, "gNetworkManager",
-                                   "@mozilla.org/network/manager;1",
-                                   "nsINetworkManager");
-
-XPCOMUtils.defineLazyServiceGetter(this, "gNetworkService",
-                                   "@mozilla.org/network/service;1",
-                                   "nsINetworkService");
-
-
-// nsINetworkInterface
-
-function EthernetInterface(attr) {
-  this.state = attr.state;
-  this.type = attr.type;
-  this.name = attr.name;
-  this.ipMode = attr.ipMode;
-  this.ips = [attr.ip];
-  this.prefixLengths = [attr.prefixLength];
-  this.gateways = [attr.gateway];
-  this.dnses = attr.dnses;
-  this.httpProxyHost = "";
-  this.httpProxyPort = 0;
-}
-EthernetInterface.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsINetworkInterface]),
-
-  updateConfig: function(config) {
-    debug("Interface " + this.name + " updateConfig " + JSON.stringify(config));
-    this.state = (config.state != undefined) ?
-                  config.state : this.state;
-    this.ips = (config.ip != undefined) ? [config.ip] : this.ips;
-    this.prefixLengths = (config.prefixLength != undefined) ?
-                         [config.prefixLength] : this.prefixLengths;
-    this.gateways = (config.gateway != undefined) ?
-                    [config.gateway] : this.gateways;
-    this.dnses = (config.dnses != undefined) ? config.dnses : this.dnses;
-    this.httpProxyHost = (config.httpProxyHost != undefined) ?
-                          config.httpProxyHost : this.httpProxyHost;
-    this.httpProxyPort = (config.httpProxyPort != undefined) ?
-                          config.httpProxyPort : this.httpProxyPort;
-    this.ipMode = (config.ipMode != undefined) ?
-                   config.ipMode : this.ipMode;
-  },
-
-  getAddresses: function(ips, prefixLengths) {
-    ips.value = this.ips.slice();
-    prefixLengths.value = this.prefixLengths.slice();
-
-    return this.ips.length;
-  },
-
-  getGateways: function(count) {
-    if (count) {
-      count.value = this.gateways.length;
-    }
-    return this.gateways.slice();
-  },
-
-  getDnses: function(count) {
-    if (count) {
-      count.value = this.dnses.length;
-    }
-    return this.dnses.slice();
-  }
-};
-
-// nsIEthernetManager
-
-/*
- *  Network state transition diagram
- *
- *   ----------  enable  ---------  connect   -----------   disconnect   --------------
- *  | Disabled | -----> | Enabled | -------> | Connected | <----------> | Disconnected |
- *   ----------          ---------            -----------    connect     --------------
- *       ^                  |                      |                           |
- *       |     disable      |                      |                           |
- *       -----------------------------------------------------------------------
- */
-
-function EthernetManager() {
-  debug("EthernetManager start");
-
-  // Interface list.
-  this.ethernetInterfaces = {};
-
-  // Used to memorize last connection information.
-  this.lastStaticConfig = {};
-
-  Services.obs.addObserver(this, "xpcom-shutdown", false);
-}
-
-EthernetManager.prototype = {
-  classID: Components.ID("a96441dd-36b3-4f7f-963b-2c032e28a039"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIEthernetManager]),
-
-  ethernetInterfaces: null,
-  lastStaticConfig: null,
-
-  observer: function(subject, topic, data) {
-    switch (topic) {
-      case "xpcom-shutdown":
-        debug("xpcom-shutdown");
-
-        this._shutdown();
-
-        Services.obs.removeObserver(this, "xpcom-shutdown");
-        break;
-    }
-  },
-
-  _shutdown: function() {
-    debug("shuting down.");
-    (function onRemove(ifnameList) {
-      if (!ifnameList.length) {
-        return;
-      }
-
-      let ifname = ifnameList.shift();
-      this.removeInterface(ifname, { notify: onRemove.bind(this, ifnameList) });
-    }).call(this, Object.keys(this.ethernetInterfaces));
-  },
-
-  get interfaceList() {
-    return Object.keys(this.ethernetInterfaces);
-  },
-
-  scan: function(callback) {
-    debug("scan");
-
-    gNetworkService.getInterfaces(function(success, list) {
-      let ethList = [];
-
-      if (!success) {
-        if (callback) {
-          callback.notify(ethList);
-        }
-        return;
-      }
-
-      for (let i = 0; i < list.length; i++) {
-        debug("Found interface " + list[i]);
-        if (!list[i].startsWith(ETHERNET_NETWORK_IFACE_PREFIX)) {
-          continue;
-        }
-        ethList.push(list[i]);
-      }
-
-      if (callback) {
-        callback.notify(ethList);
-      }
-    });
-  },
-
-  addInterface: function(ifname, callback) {
-    debug("addInterfaces " + ifname);
-
-    if (!ifname || !ifname.startsWith(ETHERNET_NETWORK_IFACE_PREFIX)) {
-      if (callback) {
-        callback.notify(false, "Invalid interface.");
-      }
-      return;
-    }
-
-    if (this.ethernetInterfaces[ifname]) {
-      if (callback) {
-        callback.notify(true, "Interface already exists.");
-      }
-      return;
-    }
-
-    gNetworkService.getInterfaceConfig(ifname, function(success, result) {
-      if (!success) {
-        if (callback) {
-          callback.notify(false, "Netd error.");
-        }
-        return;
-      }
-
-      // Since the operation may still succeed with an invalid interface name,
-      // check the mac address as well.
-      if (result.macAddr == INTERFACE_MACADDR_NULL) {
-        if (callback) {
-          callback.notify(false, "Interface not found.");
-        }
-        return;
-      }
-
-      this.ethernetInterfaces[ifname] = new EthernetInterface({
-        state:        result.link == NETWORK_INTERFACE_UP ?
-                        Ci.nsINetworkInterface.NETWORK_STATE_DISABLED :
-                        Ci.nsINetworkInterface.NETWORK_STATE_ENABLED,
-        name:         ifname,
-        type:         Ci.nsINetworkInterface.NETWORK_TYPE_ETHERNET,
-        ip:           result.ip,
-        prefixLength: result.prefix,
-        ipMode:       IP_MODE_DHCP
-      });
-
-      // Register the interface to NetworkManager.
-      gNetworkManager.registerNetworkInterface(this.ethernetInterfaces[ifname]);
-
-      debug("Add interface " + ifname + " success with " +
-            JSON.stringify(this.ethernetInterfaces[ifname]));
-
-      if (callback) {
-        callback.notify(true, "ok");
-      }
-    }.bind(this));
-  },
-
-  removeInterface: function(ifname, callback) {
-    debug("removeInterface");
-
-    if (!ifname || !ifname.startsWith(ETHERNET_NETWORK_IFACE_PREFIX)) {
-      if (callback) {
-        callback.notify(false, "Invalid interface.");
-      }
-      return;
-    }
-
-    if (!this.ethernetInterfaces[ifname]) {
-      if (callback) {
-        callback.notify(true, "Interface does not exist.");
-      }
-      return;
-    }
-
-    // Make sure interface is disable before removing.
-    this.disable(ifname, { notify: function(success, message) {
-      // Unregister the interface from NetworkManager and also remove it from
-      // the interface list.
-      gNetworkManager.unregisterNetworkInterface(this.ethernetInterfaces[ifname]);
-      delete this.ethernetInterfaces[ifname];
-
-      debug("Remove interface " + ifname + " success.");
-
-      if (callback) {
-        callback.notify(true, "ok");
-      }
-    }.bind(this)});
-  },
-
-  updateInterfaceConfig: function(ifname, config, callback) {
-    debug("interfaceConfigUpdate with " + ifname);
-
-    this._ensureIfname(ifname, callback, function(iface) {
-      if (!config) {
-        if (callback) {
-          callback.notify(false, "No config to update.");
-        }
-        return;
-      }
-
-      // Network state can not be modified externally.
-      if (config.state) {
-        delete config.state;
-      }
-
-      let currentIpMode = iface.ipMode;
-
-      // Update config.
-      this.ethernetInterfaces[iface.name].updateConfig(config);
-
-      // Do not automatically re-connect if the interface is not in connected
-      // state.
-      if (iface.state != Ci.nsINetworkInterface.NETWORK_STATE_CONNECTED) {
-        if (callback) {
-          callback.notify(true, "ok");
-        }
-        return;
-      }
-
-      let newIpMode = this.ethernetInterfaces[iface.name].ipMode;
-      if (newIpMode == IP_MODE_STATIC) {
-        this._setStaticIP(iface.name, callback);
-        return;
-      }
-      if ((currentIpMode == IP_MODE_STATIC) && (newIpMode == IP_MODE_DHCP)) {
-        gNetworkService.stopDhcp(iface.name);
-        // Clear the current network settings before do dhcp request, otherwise
-        // dhcp settings could fail.
-        this.disconnect(iface.name, { notify: function(success, message) {
-          if (!success) {
-            if (callback) {
-              callback.notify("Disconnect failed.");
-            }
-            return;
-          }
-          this._runDhcp(iface.name, callback);
-        }.bind(this) });
-        return;
-      }
-
-      if (callback) {
-        callback.notify(true, "ok");
-      }
-    }.bind(this));
-  },
-
-  enable: function(ifname, callback) {
-    debug("enable with " + ifname);
-
-    this._ensureIfname(ifname, callback, function(iface) {
-      // Interface can be only enabled in the state of disabled.
-      if (iface.state != Ci.nsINetworkInterface.NETWORK_STATE_DISABLED) {
-        if (callback) {
-          callback.notify(true, "already enabled.");
-        }
-        return;
-      }
-
-      let ips = {};
-      let prefixLengths = {};
-      iface.getAddresses(ips, prefixLengths);
-      let config = { ifname: iface.name,
-                     ip:     ips.value[0],
-                     prefix: prefixLengths.value[0],
-                     link:   NETWORK_INTERFACE_UP };
-      gNetworkService.setInterfaceConfig(config, function(success) {
-        if (!success) {
-          if (callback) {
-            callback.notify(false, "Netd Error.");
-          }
-          return;
-        }
-
-        this.ethernetInterfaces[iface.name].updateConfig({
-          state: Ci.nsINetworkInterface.NETWORK_STATE_ENABLED
-        });
-
-        debug("Interface " + iface.name + " enable success.");
-
-        if (callback) {
-          callback.notify(true, "ok");
-        }
-      }.bind(this));
-    }.bind(this));
-  },
-
-  disable: function(ifname, callback) {
-    debug("disable with " + ifname);
-
-    this._ensureIfname(ifname, callback, function(iface) {
-      if (iface.state == Ci.nsINetworkInterface.NETWORK_STATE_DISABLED) {
-        if (callback) {
-          callback.notify(true, "Interface is already disabled.");
-        }
-        return;
-      }
-
-      if (iface.state == Ci.nsINetworkInterface.NETWORK_STATE_CONNECTED) {
-        gNetworkService.stopDhcp(iface.name);
-      }
-
-      let ips = {};
-      let prefixLengths = {};
-      iface.getAddresses(ips, prefixLengths);
-      let config = { ifname: iface.name,
-                     ip:     ips.value[0],
-                     prefix: prefixLengths.value[0],
-                     link:   NETWORK_INTERFACE_DOWN };
-      gNetworkService.setInterfaceConfig(config, function(success) {
-        if (!success) {
-          if (callback) {
-            callback.notify(false, "Netd Error.");
-          }
-          return;
-        }
-
-        this.ethernetInterfaces[iface.name].updateConfig({
-          state: Ci.nsINetworkInterface.NETWORK_STATE_DISABLED
-        });
-
-        debug("Disable interface " + iface.name + " success.");
-
-        if (callback) {
-          callback.notify(true, "ok");
-        }
-      }.bind(this));
-    }.bind(this));
-  },
-
-  connect: function(ifname, callback) {
-    debug("connect wtih " + ifname);
-
-    this._ensureIfname(ifname, callback, function(iface) {
-      // Interface can only be connected in the state of enabled or
-      // disconnected.
-      if (iface.state == Ci.nsINetworkInterface.NETWORK_STATE_DISABLED ||
-          iface.state == Ci.nsINetworkInterface.NETWORK_STATE_CONNECTED) {
-        if (callback) {
-          callback.notify(true, "Interface " + ifname + " is not available or "
-                                 + " already connected.");
-        }
-        return;
-      }
-
-      if (iface.ipMode == IP_MODE_DHCP) {
-        this._runDhcp(iface.name, callback);
-        return;
-      }
-
-      if (iface.ipMode == IP_MODE_STATIC) {
-        if (this._checkConfigNull(iface) && this.lastStaticConfig[iface.name]) {
-          debug("connect with lastStaticConfig " +
-                JSON.stringify(this.lastStaticConfig[iface.name]));
-          this.ethernetInterfaces[iface.name].updateConfig(
-            this.lastStaticConfig[iface.name]);
-        }
-        this._setStaticIP(iface.name, callback);
-        return;
-      }
-
-      if (callback) {
-        callback.notify(false, "Ip mode is wrong or not set.");
-      }
-    }.bind(this));
-  },
-
-  disconnect: function(ifname, callback) {
-    debug("disconnect");
-
-    this._ensureIfname(ifname, callback, function(iface) {
-      // Interface can be only disconnected in the state of connected.
-      if (iface.state != Ci.nsINetworkInterface.NETWORK_STATE_CONNECTED) {
-        if (callback) {
-          callback.notify(true, "interface is already disconnected");
-        }
-        return;
-      }
-
-      let config = { ifname: iface.name,
-                     ip:     INTERFACE_IPADDR_NULL,
-                     prefix: INTERFACE_PREFIX_NULL,
-                     link:   NETWORK_INTERFACE_UP };
-      gNetworkService.setInterfaceConfig(config, function(success) {
-        if (!success) {
-          if (callback) {
-            callback.notify(false, "Netd error.");
-          }
-          return;
-        }
-
-        // Stop dhcp daemon.
-        gNetworkService.stopDhcp(iface.name);
-
-        this.ethernetInterfaces[iface.name].updateConfig({
-          state:        Ci.nsINetworkInterface.NETWORK_STATE_DISCONNECTED,
-          ip:           INTERFACE_IPADDR_NULL,
-          prefixLength: INTERFACE_PREFIX_NULL,
-          gateway:      INTERFACE_GATEWAY_NULL
-        });
-
-        Services.obs.notifyObservers(this.ethernetInterfaces[iface.name],
-                                     TOPIC_INTERFACE_STATE_CHANGED,
-                                     null);
-
-        debug("Disconnect interface " + iface.name + " success.");
-
-        if (callback) {
-          callback.notify(true, "ok");
-        }
-      }.bind(this));
-    }.bind(this));
-  },
-
-  _checkConfigNull: function(iface) {
-    let ips = {};
-    let prefixLengths = {};
-    let gateways = iface.getGateways();
-    iface.getAddresses(ips, prefixLengths);
-
-    if (ips.value[0] == INTERFACE_IPADDR_NULL &&
-        prefixLengths.value[0] == INTERFACE_PREFIX_NULL &&
-        gateways[0] == INTERFACE_GATEWAY_NULL) {
-      return true;
-    }
-
-    return false;
-  },
-
-  _ensureIfname: function(ifname, callback, func) {
-    // If no given ifname, use the default one.
-    if (!ifname) {
-      ifname = DEFAULT_ETHERNET_NETWORK_IFACE;
-    }
-
-    let iface = this.ethernetInterfaces[ifname];
-    if (!iface) {
-      if (callback) {
-        callback.notify(true, "Interface " + ifname + " is not available.");
-      }
-      return;
-    }
-
-    func.call(this, iface);
-  },
-
-  _runDhcp: function(ifname, callback) {
-    debug("runDhcp with " + ifname);
-
-    if (!this.ethernetInterfaces[ifname]) {
-      callback.notify(false, "Invalid interface.");
-      return
-    }
-
-    gNetworkService.runDhcp(ifname, function(success, result) {
-      if (!success) {
-        callback.notify(false, "Dhcp failed.");
-        return;
-      }
-
-      debug("Dhcp success with " + JSON.stringify(result));
-
-      // Clear last static network information when connecting with dhcp mode.
-      if (this.lastStaticConfig[ifname]) {
-        this.lastStaticConfig[ifname] = null;
-      }
-
-      this.ethernetInterfaces[ifname].updateConfig({
-        state:        Ci.nsINetworkInterface.NETWORK_STATE_CONNECTED,
-        ip:           result.ip,
-        gateway:      result.gateway,
-        prefixLength: result.prefix,
-        dnses:        [result.dns1, result.dns2]
-      });
-
-      Services.obs.notifyObservers(this.ethernetInterfaces[ifname],
-                                   TOPIC_INTERFACE_STATE_CHANGED,
-                                   null);
-
-      debug("Connect interface " + ifname + "with dhcp success.");
-
-      callback.notify(true, "ok");
-    }.bind(this));
-  },
-
-  _setStaticIP: function(ifname, callback) {
-    let iface = this.ethernetInterfaces[ifname];
-    if (!iface) {
-      callback.notify(false, "Invalid interface.");
-      return;
-    }
-
-    let ips = {};
-    let prefixLengths = {};
-    iface.getAddresses(ips, prefixLengths);
-
-    let config = { ifname: iface.name,
-                   ip:     ips.value[0],
-                   prefix: prefixLengths.value[0],
-                   link:   NETWORK_INTERFACE_UP };
-    gNetworkService.setInterfaceConfig(config, function(success) {
-      if (!success) {
-        callback.notify(false, "Netd Error.");
-        return;
-      }
-
-      // Keep the lastest static network information.
-      let ips = {};
-      let prefixLengths = {};
-      let gateways = iface.getGateways();
-      iface.getAddresses(ips, prefixLengths);
-
-      this.lastStaticConfig[iface.name] = {
-        ip:           ips.value[0],
-        prefixLength: prefixLengths.value[0],
-        gateway:      gateways[0]
-      };
-
-      this.ethernetInterfaces[ifname].updateConfig({
-        state: Ci.nsINetworkInterface.NETWORK_STATE_CONNECTED,
-      });
-
-      Services.obs.notifyObservers(this.ethernetInterfaces[ifname],
-                                   TOPIC_INTERFACE_STATE_CHANGED,
-                                   null);
-
-      debug("Connect interface " + ifname + "with static ip success.");
-
-      callback.notify(true, "ok");
-    }.bind(this));
-  },
-}
-
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([EthernetManager]);
deleted file mode 100644
--- a/dom/network/src/EthernetManager.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-component {a96441dd-36b3-4f7f-963b-2c032e28a039} EthernetManager.js
-contract @mozilla.org/ethernetManager;1 {a96441dd-36b3-4f7f-963b-2c032e28a039}
--- a/dom/network/src/moz.build
+++ b/dom/network/src/moz.build
@@ -39,18 +39,16 @@ EXTRA_COMPONENTS += [
 ]
 
 EXTRA_PP_COMPONENTS += [
     'TCPSocket.js',
 ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
     EXTRA_COMPONENTS += [
-        'EthernetManager.js',
-        'EthernetManager.manifest',
         'NetworkStatsManager.js',
         'NetworkStatsManager.manifest',
         'NetworkStatsServiceProxy.js',
         'NetworkStatsServiceProxy.manifest',
     ]
     EXPORTS.mozilla.dom.network += [
         'NetUtils.h',
     ]
deleted file mode 100644
--- a/dom/network/tests/marionette/head.js
+++ /dev/null
@@ -1,551 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-let Promise = SpecialPowers.Cu.import("resource://gre/modules/Promise.jsm").Promise;
-
-const ETHERNET_MANAGER_CONTRACT_ID = "@mozilla.org/ethernetManager;1";
-
-const INTERFACE_UP = "UP";
-const INTERFACE_DOWN = "DOWN";
-
-let gTestSuite = (function() {
-  let suite = {};
-
-  // Private member variables of the returned object |suite|.
-  let ethernetManager = SpecialPowers.Cc[ETHERNET_MANAGER_CONTRACT_ID]
-                                     .getService(SpecialPowers.Ci.nsIEthernetManager);
-  let pendingEmulatorShellCount = 0;
-
-  /**
-   * Send emulator shell command with safe guard.
-   *
-   * We should only call |finish()| after all emulator command transactions
-   * end, so here comes with the pending counter.  Resolve when the emulator
-   * gives positive response, and reject otherwise.
-   *
-   * Fulfill params: an array of emulator response lines.
-   * Reject params: an array of emulator response lines.
-   *
-   * @param command
-   *        A string command to be passed to emulator through its telnet console.
-   *
-   * @return A deferred promise.
-   */
-  function runEmulatorShellSafe(command) {
-    let deferred = Promise.defer();
-
-    ++pendingEmulatorShellCount;
-    runEmulatorShell(command, function(aResult) {
-      --pendingEmulatorShellCount;
-
-      ok(true, "Emulator shell response: " + JSON.stringify(aResult));
-      if (Array.isArray(aResult)) {
-        deferred.resolve(aResult);
-      } else {
-        deferred.reject(aResult);
-      }
-    });
-
-    return deferred.promise;
-  }
-
-  /**
-   * Get the system network conifg by the given interface name.
-   *
-   * Use shell command 'netcfg' to get the list of network cofig.
-   *
-   * Fulfill params: An object of { name, flag, ip }
-   *
-   * @parm ifname
-   *       Interface name.
-   *
-   * @return A deferred promise.
-   */
-  function getNetworkConfig(ifname) {
-    return runEmulatorShellSafe(['netcfg'])
-      .then(result => {
-        // Sample 'netcfg' output:
-        //
-        // lo       UP                                   127.0.0.1/8   0x00000049 00:00:00:00:00:00
-        // eth0     UP                                   10.0.2.15/24  0x00001043 52:54:00:12:34:56
-        // eth1     DOWN                                   0.0.0.0/0   0x00001002 52:54:00:12:34:57
-        // rmnet1   DOWN                                   0.0.0.0/0   0x00001002 52:54:00:12:34:59
-
-        let config;
-
-        for (let i = 0; i < result.length; i++) {
-          let tokens = result[i].split(/\s+/);
-          let name = tokens[0];
-          let flag = tokens[1];
-          let ip = tokens[2].split(/\/+/)[0];
-          if (name == ifname) {
-            config = { name: name, flag: flag, ip: ip };
-            break;
-          }
-        }
-
-        return config;
-      });
-  }
-
-  /**
-   * Get the ip assigned by dhcp server of a given interface name.
-   *
-   * Get the ip from android property 'dhcp.[ifname].ipaddress'.
-   *
-   * Fulfill params: A string of ip address.
-   *
-   * @parm ifname
-   *       Interface name.
-   *
-   * @return A deferred promise.
-   */
-  function getDhcpIpAddr(ifname) {
-    return runEmulatorShellSafe(['getprop', 'dhcp.' + ifname + '.ipaddress'])
-      .then(function(ipAddr) {
-        return ipAddr[0];
-      });
-  }
-
-  /**
-   * Get the gateway assigned by dhcp server of a given interface name.
-   *
-   * Get the ip from android property 'dhcp.[ifname].gateway'.
-   *
-   * Fulfill params: A string of gateway.
-   *
-   * @parm ifname
-   *       Interface name.
-   *
-   * @return A deferred promise.
-   */
-  function getDhcpGateway(ifname) {
-    return runEmulatorShellSafe(['getprop', 'dhcp.' + ifname + '.gateway'])
-      .then(function(gateway) {
-        return gateway[0];
-      });
-  }
-
-  /**
-   * Get the default route.
-   *
-   * Use shell command 'ip route' to get the default of device.
-   *
-   * Fulfill params: An array of { name, gateway }
-   *
-   * @return A deferred promise.
-   */
-  function getDefaultRoute() {
-    return runEmulatorShellSafe(['ip', 'route'])
-      .then(result => {
-        // Sample 'ip route' output:
-        //
-        // 10.0.2.0/24 dev eth0  proto kernel  scope link  src 10.0.2.15
-        // default via 10.0.2.2 dev eth0  metric 2
-
-        let routeInfo = [];
-
-        for (let i = 0; i < result.length; i++) {
-          if (!result[i].match('default')) {
-            continue;
-          }
-
-          let tokens = result[i].split(/\s+/);
-          let name = tokens[4];
-          let gateway = tokens[2];
-          routeInfo.push({ name: name, gateway: gateway });
-        }
-
-        return routeInfo;
-      });
-  }
-
-  /**
-   * Check a specific interface is enabled or not.
-   *
-   * @parm ifname
-   *       Interface name.
-   * @parm enabled
-   *       A boolean value used to check interface is disable or not.
-   *
-   * @return A deferred promise.
-   */
-  function checkInterfaceIsEnabled(ifname, enabled) {
-    return getNetworkConfig(ifname)
-      .then(function(config) {
-        if (enabled) {
-          is(config.flag, INTERFACE_UP, "Interface is enabled as expectation.");
-        } else {
-          is(config.flag, INTERFACE_DOWN, "Interface is disabled as expectation.");
-        }
-      });
-  }
-
-  /**
-   * Check the ip of a specific interface is equal to given ip or not.
-   *
-   * @parm ifname
-   *       Interface name.
-   * @parm ip
-   *       Given ip address.
-   *
-   * @return A deferred promise.
-   */
-  function checkInterfaceIpAddr(ifname, ip) {
-    return getNetworkConfig(ifname)
-      .then(function(config) {
-        is(config.ip, ip, "IP is right as expectation.");
-      });
-  }
-
-  /**
-   * Check the default gateway of a specific interface is equal to given gateway
-   * or not.
-   *
-   * @parm ifname
-   *       Interface name.
-   * @parm gateway
-   *       Given gateway.
-   *
-   * @return A deferred promise.
-   */
-  function checkDefaultRoute(ifname, gateway) {
-    return getDefaultRoute()
-      .then(function(routeInfo) {
-        for (let i = 0; i < routeInfo.length; i++) {
-          if (routeInfo[i].name == ifname) {
-            is(routeInfo[i].gateway, gateway,
-               "Default gateway is right as expectation.");
-            return true;
-          }
-        }
-
-        if (!gateway) {
-          ok(true, "Default route is cleared.");
-          return true;
-        }
-
-        return false;
-      });
-  }
-
-  /**
-   * Check the length of interface list in EthernetManager is equal to given
-   * length or not.
-   *
-   * @parm length
-   *       Given length.
-   */
-  function checkInterfaceListLength(length) {
-    let list = ethernetManager.interfaceList;
-    is(length, list.length, "List length is equal as expectation.");
-  }
-
-  /**
-   * Check the given interface exists on device or not.
-   *
-   * @parm ifname
-   *       Interface name.
-   *
-   * @return A deferred promise.
-   */
-  function checkInterfaceExist(ifname) {
-    return scanInterfaces()
-      .then(list => {
-        let index = list.indexOf(ifname);
-        if (index < 0) {
-          throw "Interface " + ifname + " not found.";
-        }
-
-        ok(true, ifname + " exists.")
-      });
-  }
-
-  /**
-   * Scan for available ethernet interfaces.
-   *
-   * Fulfill params: A list of available interfaces found in device.
-   *
-   * @return A deferred promise.
-   */
-  function scanInterfaces() {
-    let deferred = Promise.defer();
-
-    ethernetManager.scan(function onScan(list) {
-      deferred.resolve(list);
-    });
-
-    return deferred.promise;
-  }
-
-  /**
-   * Add an interface into interface list.
-   *
-   * Fulfill params: A boolean value indicates success or not.
-   *
-   * @param ifname
-   *        Interface name.
-   *
-   * @return A deferred promise.
-   */
-  function addInterface(ifname) {
-    let deferred = Promise.defer();
-
-    ethernetManager.addInterface(ifname, function onAdd(success, message) {
-      ok(success, "Add interface " + ifname + " success.");
-      is(message, "ok", "Message is as expectation.");
-
-      deferred.resolve(success);
-    });
-
-    return deferred.promise;
-  }
-
-  /**
-   * Remove an interface form the interface list.
-   *
-   * Fulfill params: A boolean value indicates success or not.
-   *
-   * @param ifname
-   *        Interface name.
-   *
-   * @return A deferred promise.
-   */
-  function removeInterface(ifname) {
-    let deferred = Promise.defer();
-
-    ethernetManager.removeInterface(ifname, function onRemove(success, message) {
-      ok(success, "Remove interface " + ifname + " success.");
-      is(message, "ok", "Message is as expectation.");
-
-      deferred.resolve(success);
-    });
-
-    return deferred.promise;
-  }
-
-  /**
-   * Enable networking of an interface in the interface list.
-   *
-   * Fulfill params: A boolean value indicates success or not.
-   *
-   * @param ifname
-   *        Interface name.
-   *
-   * @return A deferred promise.
-   */
-  function enableInterface(ifname) {
-    let deferred = Promise.defer();
-
-    ethernetManager.enable(ifname, function onEnable(success, message) {
-      ok(success, "Enable interface " + ifname + " success.");
-      is(message, "ok", "Message is as expectation.");
-
-      deferred.resolve(success);
-    });
-
-    return deferred.promise;
-  }
-
-  /**
-   * Disable networking of an interface in the interface list.
-   *
-   * Fulfill params: A boolean value indicates success or not.
-   *
-   * @param ifname
-   *        Interface name.
-   *
-   * @return A deferred promise.
-   */
-  function disableInterface(ifname) {
-    let deferred = Promise.defer();
-
-    ethernetManager.disable(ifname, function onDisable(success, message) {
-      ok(success, "Disable interface " + ifname + " success.");
-      is(message, "ok", "Message is as expectation.");
-
-      deferred.resolve(success);
-    });
-
-    return deferred.promise;
-  }
-
-  /**
-   * Make an interface connect to network.
-   *
-   * Fulfill params: A boolean value indicates success or not.
-   *
-   * @param ifname
-   *        Interface name.
-   *
-   * @return A deferred promise.
-   */
-  function makeInterfaceConnect(ifname) {
-    let deferred = Promise.defer();
-
-    ethernetManager.connect(ifname, function onConnect(success, message) {
-      ok(success, "Interface " + ifname + " is connected successfully.");
-      is(message, "ok", "Message is as expectation.");
-
-      deferred.resolve(success);
-    });
-
-    return deferred.promise;
-  }
-
-  /**
-   * Make an interface disconnect to network.
-   *
-   * Fulfill params: A boolean value indicates success or not.
-   *
-   * @param ifname
-   *        Interface name.
-   *
-   * @return A deferred promise.
-   */
-  function makeInterfaceDisconnect(ifname) {
-    let deferred = Promise.defer();
-
-    ethernetManager.disconnect(ifname, function onDisconnect(success, message) {
-      ok(success, "Interface " + ifname + " is disconnected successfully.");
-      is(message, "ok", "Message is as expectation.");
-
-      deferred.resolve(success);
-    });
-
-    return deferred.promise;
-  }
-
-  /**
-   * Update the config the an interface in the interface list.
-   *
-   * @param ifname
-   *        Interface name.
-   * @param config
-   *        .ip: ip address.
-   *        .prefixLength: mask length.
-   *        .gateway: gateway.
-   *        .dnses: dnses.
-   *        .httpProxyHost: http proxy host.
-   *        .httpProxyPort: http porxy port.
-   *        .usingDhcp: an boolean value indicates using dhcp or not.
-   *
-   * @return A deferred promise.
-   */
-  function updateInterfaceConfig(ifname, config) {
-    let deferred = Promise.defer();
-
-    ethernetManager.updateInterfaceConfig(ifname, config,
-                                          function onUpdated(success, message) {
-      ok(success, "Interface " + ifname + " config is updated successfully " +
-                  " with " + JSON.stringify(config));
-      is(message, "ok", "Message is as expectation.");
-
-      deferred.resolve(success);
-    });
-
-    return deferred.promise;
-  }
-
-  /**
-   * Wait for timeout.
-   *
-   * @param timeout
-   *        Time in ms.
-   *
-   * @return A deferred promise.
-   */
-  function waitForTimeout(timeout) {
-    let deferred = Promise.defer();
-
-    setTimeout(function() {
-      ok(true, "waitForTimeout " + timeout);
-      deferred.resolve();
-    }, timeout);
-
-    return deferred.promise;
-  }
-
-  /**
-   * Wait for default route of a specific interface being set and
-   * check.
-   *
-   * @param ifname
-   *        Interface name.
-   * @param gateway
-   *        Target gateway.
-   *
-   * @return A deferred promise.
-   */
-  function waitForDefaultRouteSet(ifname, gateway) {
-    return gTestSuite.waitForTimeout(500)
-      .then(() => gTestSuite.checkDefaultRoute(ifname, gateway))
-      .then(success => {
-        if (success) {
-          ok(true, "Default route is set as expectation " + gateway);
-          return;
-        }
-
-        ok(true, "Default route is not set yet, check again. " + success);
-        return waitForDefaultRouteSet(ifname, gateway);
-      });
-  }
-
-  //---------------------------------------------------
-  // Public test suite functions
-  //---------------------------------------------------
-  suite.scanInterfaces = scanInterfaces;
-  suite.addInterface = addInterface;
-  suite.removeInterface = removeInterface;
-  suite.enableInterface = enableInterface;
-  suite.disableInterface = disableInterface;
-  suite.makeInterfaceConnect = makeInterfaceConnect;
-  suite.makeInterfaceDisconnect = makeInterfaceDisconnect;
-  suite.updateInterfaceConfig = updateInterfaceConfig;
-  suite.getDhcpIpAddr = getDhcpIpAddr;
-  suite.getDhcpGateway = getDhcpGateway;
-  suite.checkInterfaceExist = checkInterfaceExist;
-  suite.checkInterfaceIsEnabled = checkInterfaceIsEnabled;
-  suite.checkInterfaceIpAddr = checkInterfaceIpAddr;
-  suite.checkDefaultRoute = checkDefaultRoute;
-  suite.checkInterfaceListLength = checkInterfaceListLength;
-  suite.waitForTimeout = waitForTimeout;
-  suite.waitForDefaultRouteSet = waitForDefaultRouteSet;
-
-  /**
-   * End up the test run.
-   *
-   * Wait until all pending emulator shell commands are done and then |finish|
-   * will be called in the end.
-   */
-  function cleanUp() {
-    waitFor(finish, function() {
-      return pendingEmulatorShellCount === 0;
-    });
-  }
-
-  /**
-   * Common test routine.
-   *
-   * Start a test with the given test case chain. The test environment will be
-   * settled down before the test. After the test, all the affected things will
-   * be restored.
-   *
-   * @param aTestCaseChain
-   *        The test case entry point, which can be a function or a promise.
-   *
-   * @return A deferred promise.
-   */
-  suite.doTest = function(aTestCaseChain) {
-    return Promise.resolve()
-      .then(aTestCaseChain)
-      .then(function onresolve() {
-        cleanUp();
-      }, function onreject(aReason) {
-        ok(false, 'Promise rejects during test' + (aReason ? '(' + aReason + ')' : ''));
-        cleanUp();
-      });
-  };
-
-  return suite;
-})();
\ No newline at end of file
deleted file mode 100644
--- a/dom/network/tests/marionette/manifest.ini
+++ /dev/null
@@ -1,15 +0,0 @@
-[DEFAULT]
-b2g = true
-browser = false
-qemu = true
-
-[test_ethernet_add_interface.js]
-[test_ethernet_remove_interface.js]
-[test_ethernet_enable.js]
-[test_ethernet_disable.js]
-[test_ethernet_connect_with_dhcp.js]
-[test_ethernet_connect_with_static_ip.js]
-[test_ethernet_reconnect_with_dhcp.js]
-[test_ethernet_reconnect_with_static_ip.js]
-[test_ethernet_ip_mode_change.js]
-[test_ethernet_disconnect.js]
deleted file mode 100644
--- a/dom/network/tests/marionette/test_ethernet_add_interface.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-MARIONETTE_TIMEOUT = 60000;
-MARIONETTE_HEAD_JS = 'head.js';
-
-const ETHERNET_INTERFACE_NAME = "eth1";
-
-gTestSuite.doTest(function() {
-  return Promise.resolve()
-    .then(() => gTestSuite.checkInterfaceExist(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.checkInterfaceListLength(0))
-    .then(() => gTestSuite.addInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.checkInterfaceListLength(1))
-    .then(() => gTestSuite.removeInterface(ETHERNET_INTERFACE_NAME));
-});
\ No newline at end of file
deleted file mode 100644
--- a/dom/network/tests/marionette/test_ethernet_connect_with_dhcp.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-MARIONETTE_TIMEOUT = 60000;
-MARIONETTE_HEAD_JS = 'head.js';
-
-const ETHERNET_INTERFACE_NAME = "eth1";
-
-function checkDhcpResult(ifname) {
-  return gTestSuite.getDhcpIpAddr(ifname)
-    .then(ip => gTestSuite.checkInterfaceIpAddr(ifname, ip))
-    .then(() => gTestSuite.getDhcpGateway(ifname))
-    .then(gateway => gTestSuite.waitForDefaultRouteSet(ifname, gateway));
-}
-
-gTestSuite.doTest(function() {
-  return Promise.resolve()
-    .then(() => gTestSuite.checkInterfaceExist(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.addInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.enableInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.makeInterfaceConnect(ETHERNET_INTERFACE_NAME))
-    .then(() => checkDhcpResult(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.makeInterfaceDisconnect(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.disableInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.removeInterface(ETHERNET_INTERFACE_NAME));
-});
\ No newline at end of file
deleted file mode 100644
--- a/dom/network/tests/marionette/test_ethernet_connect_with_static_ip.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-MARIONETTE_TIMEOUT = 60000;
-MARIONETTE_HEAD_JS = 'head.js';
-
-const ETHERNET_INTERFACE_NAME = "eth1";
-
-let staticConfig = {
-  ip: "1.2.3.4",
-  gateway: "1.2.3.5",
-  prefixLength: 24,
-  dnses: ["1.2.3.6"],
-  ipMode: "static"
-};
-
-function checkStaticResult(ifname) {
-  return gTestSuite.checkInterfaceIpAddr(ifname, staticConfig.ip)
-    .then(() => gTestSuite.checkDefaultRoute(ifname, staticConfig.gateway));
-}
-
-gTestSuite.doTest(function() {
-  return Promise.resolve()
-    .then(() => gTestSuite.checkInterfaceExist(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.addInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.enableInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.updateInterfaceConfig(ETHERNET_INTERFACE_NAME, staticConfig))
-    .then(() => gTestSuite.makeInterfaceConnect(ETHERNET_INTERFACE_NAME))
-    .then(() => checkStaticResult(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.makeInterfaceDisconnect(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.disableInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.removeInterface(ETHERNET_INTERFACE_NAME));
-});
\ No newline at end of file
deleted file mode 100644
--- a/dom/network/tests/marionette/test_ethernet_disable.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-MARIONETTE_TIMEOUT = 60000;
-MARIONETTE_HEAD_JS = 'head.js';
-
-const ETHERNET_INTERFACE_NAME = "eth1";
-
-gTestSuite.doTest(function() {
-  return Promise.resolve()
-    .then(() => gTestSuite.checkInterfaceExist(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.addInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.enableInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.disableInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.checkInterfaceIsEnabled(ETHERNET_INTERFACE_NAME, false))
-    .then(() => gTestSuite.removeInterface(ETHERNET_INTERFACE_NAME));
-});
\ No newline at end of file
deleted file mode 100644
--- a/dom/network/tests/marionette/test_ethernet_disconnect.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-MARIONETTE_TIMEOUT = 60000;
-MARIONETTE_HEAD_JS = 'head.js';
-
-const ETHERNET_INTERFACE_NAME = "eth1";
-const INTERFACE_IP_NONE = "0.0.0.0";
-
-function checkIpAddrIsReset(ifname) {
-  return gTestSuite.checkInterfaceIpAddr(ifname, INTERFACE_IP_NONE)
-    .then(() => gTestSuite.checkDefaultRoute(ifname));
-}
-
-gTestSuite.doTest(function() {
-  return Promise.resolve()
-    .then(() => gTestSuite.checkInterfaceExist(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.addInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.enableInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.makeInterfaceConnect(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.makeInterfaceDisconnect(ETHERNET_INTERFACE_NAME))
-    .then(() => checkIpAddrIsReset(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.disableInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.removeInterface(ETHERNET_INTERFACE_NAME));
-});
\ No newline at end of file
deleted file mode 100644
--- a/dom/network/tests/marionette/test_ethernet_enable.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-MARIONETTE_TIMEOUT = 60000;
-MARIONETTE_HEAD_JS = 'head.js';
-
-const ETHERNET_INTERFACE_NAME = "eth1";
-
-gTestSuite.doTest(function() {
-  return Promise.resolve()
-    .then(() => gTestSuite.checkInterfaceExist(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.addInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.enableInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.checkInterfaceIsEnabled(ETHERNET_INTERFACE_NAME, true))
-    .then(() => gTestSuite.disableInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.removeInterface(ETHERNET_INTERFACE_NAME));
-});
\ No newline at end of file
deleted file mode 100644
--- a/dom/network/tests/marionette/test_ethernet_ip_mode_change.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-MARIONETTE_TIMEOUT = 60000;
-MARIONETTE_HEAD_JS = 'head.js';
-
-const ETHERNET_INTERFACE_NAME = "eth1";
-
-let staticConfig = {
-  ip: "1.2.3.4",
-  gateway: "1.2.3.5",
-  prefixLength: 24,
-  dnses: ["1.2.3.6"],
-  ipMode: "static"
-};
-
-function checkStaticResult(ifname) {
-  return gTestSuite.checkInterfaceIpAddr(ifname, staticConfig.ip)
-    .then(() => gTestSuite.waitForDefaultRouteSet(ifname, staticConfig.gateway));
-}
-
-function checkDhcpResult(ifname) {
-  return gTestSuite.getDhcpIpAddr(ifname)
-    .then(ip => gTestSuite.checkInterfaceIpAddr(ifname, ip))
-    .then(() => gTestSuite.getDhcpGateway(ifname))
-    .then(gateway => gTestSuite.waitForDefaultRouteSet(ifname, gateway));
-}
-
-gTestSuite.doTest(function() {
-  return Promise.resolve()
-    .then(() => gTestSuite.checkInterfaceExist(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.addInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.enableInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.makeInterfaceConnect(ETHERNET_INTERFACE_NAME))
-    .then(() => checkDhcpResult(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.updateInterfaceConfig(ETHERNET_INTERFACE_NAME, staticConfig))
-    .then(() => checkStaticResult(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.updateInterfaceConfig(ETHERNET_INTERFACE_NAME, { ipMode: "dhcp"}))
-    .then(() => checkDhcpResult(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.makeInterfaceDisconnect(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.disableInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.removeInterface(ETHERNET_INTERFACE_NAME));
-});
\ No newline at end of file
deleted file mode 100644
--- a/dom/network/tests/marionette/test_ethernet_reconnect_with_dhcp.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-MARIONETTE_TIMEOUT = 60000;
-MARIONETTE_HEAD_JS = 'head.js';
-
-const ETHERNET_INTERFACE_NAME = "eth1";
-
-function checkDhcpResult(ifname) {
-  return gTestSuite.getDhcpIpAddr(ifname)
-    .then(ip => gTestSuite.checkInterfaceIpAddr(ifname, ip))
-    .then(() => gTestSuite.getDhcpGateway(ifname))
-    .then(gateway => gTestSuite.waitForDefaultRouteSet(ifname, gateway));
-}
-
-gTestSuite.doTest(function() {
-  return Promise.resolve()
-    .then(() => gTestSuite.checkInterfaceExist(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.addInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.enableInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.makeInterfaceConnect(ETHERNET_INTERFACE_NAME))
-    .then(() => checkDhcpResult(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.makeInterfaceDisconnect(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.makeInterfaceConnect(ETHERNET_INTERFACE_NAME))
-    .then(() => checkDhcpResult(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.disableInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.removeInterface(ETHERNET_INTERFACE_NAME));
-});
\ No newline at end of file
deleted file mode 100644
--- a/dom/network/tests/marionette/test_ethernet_reconnect_with_static_ip.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-MARIONETTE_TIMEOUT = 60000;
-MARIONETTE_HEAD_JS = 'head.js';
-
-const ETHERNET_INTERFACE_NAME = "eth1";
-
-let staticConfig = {
-  ip: "1.2.3.4",
-  gateway: "1.2.3.5",
-  prefixLength: 24,
-  dnses: ["1.2.3.6"],
-  ipMode: "static"
-};
-
-function checkStaticResult(ifname) {
-  return gTestSuite.checkInterfaceIpAddr(ifname, staticConfig.ip)
-    .then(() => gTestSuite.checkDefaultRoute(ifname, staticConfig.gateway));
-}
-
-gTestSuite.doTest(function() {
-  return Promise.resolve()
-    .then(() => gTestSuite.checkInterfaceExist(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.addInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.enableInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.updateInterfaceConfig(ETHERNET_INTERFACE_NAME, staticConfig))
-    .then(() => gTestSuite.makeInterfaceConnect(ETHERNET_INTERFACE_NAME))
-    .then(() => checkStaticResult(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.makeInterfaceDisconnect(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.makeInterfaceConnect(ETHERNET_INTERFACE_NAME))
-    .then(() => checkStaticResult(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.makeInterfaceDisconnect(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.disableInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.removeInterface(ETHERNET_INTERFACE_NAME));
-});
\ No newline at end of file
deleted file mode 100644
--- a/dom/network/tests/marionette/test_ethernet_remove_interface.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-MARIONETTE_TIMEOUT = 60000;
-MARIONETTE_HEAD_JS = 'head.js';
-
-const ETHERNET_INTERFACE_NAME = "eth1";
-
-gTestSuite.doTest(function() {
-  return Promise.resolve()
-    .then(() => gTestSuite.checkInterfaceExist(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.addInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.checkInterfaceListLength(1))
-    .then(() => gTestSuite.removeInterface(ETHERNET_INTERFACE_NAME))
-    .then(() => gTestSuite.checkInterfaceListLength(0));
-});
\ No newline at end of file
--- a/dom/system/gonk/NetworkManager.js
+++ b/dom/system/gonk/NetworkManager.js
@@ -8,19 +8,19 @@ const {classes: Cc, interfaces: Ci, util
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/FileUtils.jsm");
 Cu.import("resource://gre/modules/systemlibs.js");
 
 const NETWORKMANAGER_CONTRACTID = "@mozilla.org/network/manager;1";
 const NETWORKMANAGER_CID =
-  Components.ID("{1ba9346b-53b5-4660-9dc6-58f0b258d0a6}");
+  Components.ID("{33901e46-33b8-11e1-9869-f46d04d25bcc}");
 
-const DEFAULT_PREFERRED_NETWORK_TYPE = Ci.nsINetworkInterface.NETWORK_TYPE_ETHERNET;
+const DEFAULT_PREFERRED_NETWORK_TYPE = Ci.nsINetworkInterface.NETWORK_TYPE_WIFI;
 
 XPCOMUtils.defineLazyServiceGetter(this, "gSettingsService",
                                    "@mozilla.org/settingsService;1",
                                    "nsISettingsService");
 XPCOMUtils.defineLazyGetter(this, "ppmm", function() {
   return Cc["@mozilla.org/parentprocessmessagemanager;1"]
          .getService(Ci.nsIMessageBroadcaster);
 });
@@ -271,18 +271,17 @@ NetworkManager.prototype = {
             if (network.type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_DUN) {
               this.removeSecondaryDefaultRoute(network);
             }
 #endif
             // Remove routing table in /proc/net/route
             if (network.type == Ci.nsINetworkInterface.NETWORK_TYPE_WIFI) {
               gNetworkService.resetRoutingTable(network);
 #ifdef MOZ_B2G_RIL
-            } else if (network.type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE ||
-                       network.type == Ci.nsINetworkInterface.NETWORK_TYPE_ETHERNET) {
+            } else if (network.type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE) {
               gNetworkService.removeDefaultRoute(network);
 #endif
             }
 
             // Abort ongoing captive portal detection on the wifi interface
             CaptivePortalDetectionHelper
               .notify(CaptivePortalDetectionHelper.EVENT_DISCONNECT, network);
             this.setAndConfigureActive();
@@ -363,19 +362,17 @@ NetworkManager.prototype = {
         return interfaces;
       }
     }
   },
 
   getNetworkId: function(network) {
     let id = "device";
 #ifdef MOZ_B2G_RIL
-    if (this.isNetworkTypeEthernet(network.type)) {
-      id = network.name.substring(3);
-    } else if (this.isNetworkTypeMobile(network.type)) {
+    if (this.isNetworkTypeMobile(network.type)) {
       if (!(network instanceof Ci.nsIRilNetworkInterface)) {
         throw Components.Exception("Mobile network not an nsIRilNetworkInterface",
                                    Cr.NS_ERROR_INVALID_ARG);
       }
       id = "ril" + network.serviceId;
     }
 #endif
 
@@ -417,61 +414,27 @@ NetworkManager.prototype = {
   },
 
   _manageOfflineStatus: true,
 
   networkInterfaces: null,
 
   _dataDefaultServiceId: null,
 
-  _networkTypePriorityList: [Ci.nsINetworkInterface.NETWORK_TYPE_ETHERNET,
-                             Ci.nsINetworkInterface.NETWORK_TYPE_WIFI,
-                             Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE],
-  get networkTypePriorityList() {
-    return this._networkTypePriorityList;
-  },
-  set networkTypePriorityList(val) {
-    if (val.length != this._networkTypePriorityList.length) {
-      throw "Priority list length should equal to " +
-            this._networkTypePriorityList.length;
-    }
-
-    // Check if types in new priority list are valid and also make sure there
-    // are no duplicate types.
-    let list = [Ci.nsINetworkInterface.NETWORK_TYPE_ETHERNET,
-                Ci.nsINetworkInterface.NETWORK_TYPE_WIFI,
-                Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE];
-    while (list.length) {
-      let type = list.shift();
-      if (val.indexOf(type) == -1) {
-        throw "There is missing network type";
-      }
-    }
-
-    this._networkTypePriorityList = val;
-  },
-
-  getPriority: function(type) {
-    if (this._networkTypePriorityList.indexOf(type) == -1) {
-      // 0 indicates the lowest priority.
-      return 0;
-    }
-
-    return this._networkTypePriorityList.length -
-           this._networkTypePriorityList.indexOf(type);
-  },
-
   _preferredNetworkType: DEFAULT_PREFERRED_NETWORK_TYPE,
   get preferredNetworkType() {
     return this._preferredNetworkType;
   },
   set preferredNetworkType(val) {
+#ifdef MOZ_B2G_RIL
     if ([Ci.nsINetworkInterface.NETWORK_TYPE_WIFI,
-         Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE,
-         Ci.nsINetworkInterface.NETWORK_TYPE_ETHERNET].indexOf(val) == -1) {
+         Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE].indexOf(val) == -1) {
+#else
+    if (val != Ci.nsINetworkInterface.NETWORK_TYPE_WIFI) {
+#endif
       throw "Invalid network type";
     }
     this._preferredNetworkType = val;
   },
 
   active: null,
   _overriddenActive: null,
 
@@ -493,20 +456,16 @@ NetworkManager.prototype = {
             type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_DUN);
   },
 
   isNetworkTypeMobile: function(type) {
     return (type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE ||
             this.isNetworkTypeSecondaryMobile(type));
   },
 
-  isNetworkTypeEthernet: function(type) {
-    return (type == Ci.nsINetworkInterface.NETWORK_TYPE_ETHERNET);
-  },
-
   setExtraHostRoute: function(network) {
     if (network.type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_MMS) {
       if (!(network instanceof Ci.nsIRilNetworkInterface)) {
         debug("Network for MMS must be an instance of nsIRilNetworkInterface");
         return;
       }
 
       network = network.QueryInterface(Ci.nsIRilNetworkInterface);
@@ -637,33 +596,21 @@ NetworkManager.prototype = {
       if (network.state != Ci.nsINetworkInterface.NETWORK_STATE_CONNECTED) {
         continue;
       }
 #ifdef MOZ_B2G_RIL
       if (network.type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE) {
         defaultDataNetwork = network;
       }
 #endif
+      this.active = network;
       if (network.type == this.preferredNetworkType) {
-        this.active = network;
         debug("Found our preferred type of network: " + network.name);
         break;
       }
-
-      // Initialize the active network with the first connected network.
-      if (!this.active) {
-        this.active = network;
-        continue;
-      }
-
-      // Compare the prioriy between two network types. If found incoming
-      // network with higher priority, replace the active network.
-      if (this.getPriority(this.active.type) < this.getPriority(network.type)) {
-        this.active = network;
-      }
     }
     if (this.active) {
 #ifdef MOZ_B2G_RIL
       // Give higher priority to default data APN than seconary APN.
       // If default data APN is not connected, we still set default route
       // and DNS on seconary APN.
       if (defaultDataNetwork &&
           this.isNetworkTypeSecondaryMobile(this.active.type) &&
@@ -728,32 +675,29 @@ NetworkManager.prototype = {
   },
 #endif
 
   convertConnectionType: function(network) {
     // If there is internal interface change (e.g., MOBILE_MMS, MOBILE_SUPL),
     // the function will return null so that it won't trigger type change event
     // in NetworkInformation API.
     if (network.type != Ci.nsINetworkInterface.NETWORK_TYPE_WIFI &&
-        network.type != Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE &&
-        network.type != Ci.nsINetworkInterface.NETWORK_TYPE_ETHERNET) {
+        network.type != Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE) {
       return null;
     }
 
     if (network.state == Ci.nsINetworkInterface.NETWORK_STATE_DISCONNECTED) {
       return CONNECTION_TYPE_NONE;
     }
 
     switch (network.type) {
       case Ci.nsINetworkInterface.NETWORK_TYPE_WIFI:
         return CONNECTION_TYPE_WIFI;
       case Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE:
         return CONNECTION_TYPE_CULLULAR;
-      case Ci.nsINetworkInterface.NETWORK_TYPE_ETHERNET:
-        return CONNECTION_TYPE_ETHERNET;
     }
   },
 
   // nsISettingsServiceCallback
 
   tetheringSettings: {},
 
   initTetheringSettings: function() {
--- a/dom/system/gonk/NetworkManager.manifest
+++ b/dom/system/gonk/NetworkManager.manifest
@@ -1,3 +1,3 @@
 # NetworkManager.js
-component {1ba9346b-53b5-4660-9dc6-58f0b258d0a6} NetworkManager.js
-contract @mozilla.org/network/manager;1 {1ba9346b-53b5-4660-9dc6-58f0b258d0a6}
+component {33901e46-33b8-11e1-9869-f46d04d25bcc} NetworkManager.js
+contract @mozilla.org/network/manager;1 {33901e46-33b8-11e1-9869-f46d04d25bcc}
--- a/dom/system/gonk/NetworkService.js
+++ b/dom/system/gonk/NetworkService.js
@@ -7,17 +7,17 @@
 const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/NetUtil.jsm");
 Cu.import("resource://gre/modules/FileUtils.jsm");
 
 const NETWORKSERVICE_CONTRACTID = "@mozilla.org/network/service;1";
-const NETWORKSERVICE_CID = Components.ID("{48c13741-aec9-4a86-8962-432011708261}");
+const NETWORKSERVICE_CID = Components.ID("{baec696c-c78d-42db-8b44-603f8fbfafb4}");
 
 XPCOMUtils.defineLazyServiceGetter(this, "gNetworkWorker",
                                    "@mozilla.org/network/worker;1",
                                    "nsINetworkWorker");
 
 // 1xx - Requested action is proceeding
 const NETD_COMMAND_PROCEEDING   = 100;
 // 2xx - Requested action has been successfully completed
@@ -537,91 +537,16 @@ NetworkService.prototype = {
     this.controlMessage(params, function(data) {
       let code = data.resultCode;
       let reason = data.resultReason;
       if(DEBUG) debug("updateUpStream result: Code " + code + " reason " + reason);
       callback.updateUpStreamResult(!isError(code), data.curExternalIfname);
     });
   },
 
-  getInterfaces: function(callback) {
-    let params = {
-      cmd: "getInterfaces",
-      isAsync: true
-    };
-
-    this.controlMessage(params, function(data) {
-      if(DEBUG) debug("getInterfaces result: " + JSON.stringify(data));
-      let success = !isError(data.resultCode);
-      callback.getInterfacesResult(success, data.interfaceList);
-    });
-  },
-
-  setInterfaceConfig: function(config, callback) {
-    config.cmd = "setInterfaceConfig";
-    config.isAsync = true;
-
-    this.controlMessage(config, function(data) {
-      if(DEBUG) debug("setInterfaceConfig result: " + JSON.stringify(data));
-      let success = !isError(data.resultCode);
-      callback.setInterfaceConfigResult(success);
-    });
-  },
-
-  getInterfaceConfig: function(ifname, callback) {
-    let params = {
-      cmd: "getInterfaceConfig",
-      ifname: ifname,
-      isAsync: true
-    };
-
-    this.controlMessage(params, function(data) {
-      if(DEBUG) debug("getInterfaceConfig result: " + JSON.stringify(data));
-      let success = !isError(data.resultCode);
-      let result = { ip: data.ipAddr,
-                     prefix: data.maskLength,
-                     link: data.flag,
-                     mac: data.macAddr };
-      callback.getInterfaceConfigResult(success, result);
-    });
-  },
-
-  runDhcp: function(ifname, callback) {
-    let params = {
-      cmd: "runDhcp",
-      ifname: ifname,
-      isBlocking: true
-    };
-
-    this.controlMessage(params, function(data) {
-      if(DEBUG) debug("runDhcp result: " + JSON.stringify(data));
-      let success = data.success;
-      let result = {
-        ip: data.ipAddr,
-        gateway: data.gateway,
-        dns1: data.dns1,
-        dns2: data.dns2,
-        prefix: data.maskLength,
-        server: data.server
-      };
-
-      callback.runDhcpResult(success, result);
-    });
-  },
-
-  stopDhcp: function(ifname) {
-    let params = {
-      cmd: "stopDhcp",
-      ifname: ifname,
-      isAsync: true
-    };
-
-    this.controlMessage(params);
-  },
-
   shutdown: false,
 
   observe: function observe(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "xpcom-shutdown":
         debug("NetworkService shutdown");
         this.shutdown = true;
         Services.obs.removeObserver(this, "xpcom-shutdown");
--- a/dom/system/gonk/NetworkService.manifest
+++ b/dom/system/gonk/NetworkService.manifest
@@ -1,3 +1,3 @@
 # NetworkService.js
-component {48c13741-aec9-4a86-8962-432011708261} NetworkService.js
-contract @mozilla.org/network/service;1 {48c13741-aec9-4a86-8962-432011708261}
+component {baec696c-c78d-42db-8b44-603f8fbfafb4} NetworkService.js
+contract @mozilla.org/network/service;1 {baec696c-c78d-42db-8b44-603f8fbfafb4}
--- a/dom/system/gonk/NetworkUtils.cpp
+++ b/dom/system/gonk/NetworkUtils.cpp
@@ -106,17 +106,17 @@ static NetworkParams *gWifiTetheringParm
 
 
 CommandFunc NetworkUtils::sWifiEnableChain[] = {
   NetworkUtils::clearWifiTetherParms,
   NetworkUtils::wifiFirmwareReload,
   NetworkUtils::startAccessPointDriver,
   NetworkUtils::setAccessPoint,
   NetworkUtils::startSoftAP,
-  NetworkUtils::setConfig,
+  NetworkUtils::setInterfaceUp,
   NetworkUtils::tetherInterface,
   NetworkUtils::setIpForwardingEnabled,
   NetworkUtils::tetheringStatus,
   NetworkUtils::startTethering,
   NetworkUtils::setDnsForwarders,
   NetworkUtils::enableNat,
   NetworkUtils::wifiTetheringSuccess
 };
@@ -147,33 +147,33 @@ CommandFunc NetworkUtils::sWifiRetryChai
   NetworkUtils::stopSoftAP,
   NetworkUtils::stopTethering,
 
   // sWifiEnableChain:
   NetworkUtils::wifiFirmwareReload,
   NetworkUtils::startAccessPointDriver,
   NetworkUtils::setAccessPoint,
   NetworkUtils::startSoftAP,
-  NetworkUtils::setConfig,
+  NetworkUtils::setInterfaceUp,
   NetworkUtils::tetherInterface,
   NetworkUtils::setIpForwardingEnabled,
   NetworkUtils::tetheringStatus,
   NetworkUtils::startTethering,
   NetworkUtils::setDnsForwarders,
   NetworkUtils::enableNat,
   NetworkUtils::wifiTetheringSuccess
 };
 
 CommandFunc NetworkUtils::sWifiOperationModeChain[] = {
   NetworkUtils::wifiFirmwareReload,
   NetworkUtils::wifiOperationModeSuccess
 };
 
 CommandFunc NetworkUtils::sUSBEnableChain[] = {
-  NetworkUtils::setConfig,
+  NetworkUtils::setInterfaceUp,
   NetworkUtils::enableNat,
   NetworkUtils::setIpForwardingEnabled,
   NetworkUtils::tetherInterface,
   NetworkUtils::tetheringStatus,
   NetworkUtils::startTethering,
   NetworkUtils::setDnsForwarders,
   NetworkUtils::usbTetheringSuccess
 };
@@ -196,17 +196,17 @@ CommandFunc NetworkUtils::sUSBFailChain[
 
 CommandFunc NetworkUtils::sUpdateUpStreamChain[] = {
   NetworkUtils::cleanUpStream,
   NetworkUtils::createUpStream,
   NetworkUtils::updateUpStreamSuccess
 };
 
 CommandFunc NetworkUtils::sStartDhcpServerChain[] = {
-  NetworkUtils::setConfig,
+  NetworkUtils::setInterfaceUp,
   NetworkUtils::startTethering,
   NetworkUtils::setDhcpServerSuccess
 };
 
 CommandFunc NetworkUtils::sStopDhcpServerChain[] = {
   NetworkUtils::stopTethering,
   NetworkUtils::setDhcpServerSuccess
 };
@@ -235,31 +235,16 @@ CommandFunc NetworkUtils::sNetworkInterf
   NetworkUtils::networkInterfaceAlarmSuccess
 };
 
 CommandFunc NetworkUtils::sSetDnsChain[] = {
   NetworkUtils::setDefaultInterface,
   NetworkUtils::setInterfaceDns
 };
 
-CommandFunc NetworkUtils::sGetInterfacesChain[] = {
-  NetworkUtils::getInterfaceList,
-  NetworkUtils::getInterfacesSuccess
-};
-
-CommandFunc NetworkUtils::sSetInterfaceConfigChain[] = {
-  NetworkUtils::setConfig,
-  NetworkUtils::setInterfaceConfigSuccess
-};
-
-CommandFunc NetworkUtils::sGetInterfaceConfigChain[] = {
-  NetworkUtils::getConfig,
-  NetworkUtils::getInterfaceConfigSuccess
-};
-
 /**
  * Helper function to get the mask from given prefix length.
  */
 static uint32_t makeMask(const uint32_t prefixLength)
 {
   uint32_t mask = 0;
   for (uint32_t i = 0; i < prefixLength; ++i) {
     mask |= (0x80000000 >> i);
@@ -332,25 +317,16 @@ static void join(nsTArray<nsCString>& ar
       CHECK_LENGTH(len, strlen(array[i].get()), maxlen)
       strcat(result, array[i].get());
     }
   }
 
 #undef CHECK_LEN
 }
 
-static void convertUTF8toUTF16(nsTArray<nsCString>& narrow,
-                               nsTArray<nsString>& wide,
-                               uint32_t length)
-{
-  for (uint32_t i = 0; i < length; i++) {
-    wide.AppendElement(NS_ConvertUTF8toUTF16(narrow[i].get()));
-  }
-}
-
 /**
  * Helper function to get network interface properties from the system property table.
  */
 static void getIFProperties(const char* ifname, IFProperties& prop)
 {
   char key[PROPERTY_KEY_MAX];
   snprintf(key, PROPERTY_KEY_MAX - 1, "net.%s.gw", ifname);
   property_get(key, prop.gateway, "");
@@ -705,19 +681,19 @@ void NetworkUtils::setAlarm(CommandChain
                             NetworkResultOptions& aResult)
 {
   char command[MAX_COMMAND_SIZE];
   snprintf(command, MAX_COMMAND_SIZE - 1, "bandwidth setinterfacealert %s %ld", GET_CHAR(mIfname), GET_FIELD(mThreshold));
 
   doCommand(command, aChain, aCallback);
 }
 
-void NetworkUtils::setConfig(CommandChain* aChain,
-                             CommandCallback aCallback,
-                             NetworkResultOptions& aResult)
+void NetworkUtils::setInterfaceUp(CommandChain* aChain,
+                                  CommandCallback aCallback,
+                                  NetworkResultOptions& aResult)
 {
   char command[MAX_COMMAND_SIZE];
   if (SDK_VERSION >= 16) {
     snprintf(command, MAX_COMMAND_SIZE - 1, "interface setcfg %s %s %s %s",
                      GET_CHAR(mIfname),
                      GET_CHAR(mIp),
                      GET_CHAR(mPrefix),
                      GET_CHAR(mLink));
@@ -942,36 +918,16 @@ void NetworkUtils::setInterfaceDns(Comma
     }
 
     written += ret;
   }
 
   doCommand(command, aChain, aCallback);
 }
 
-void NetworkUtils::getInterfaceList(CommandChain* aChain,
-                                    CommandCallback aCallback,
-                                    NetworkResultOptions& aResult)
-{
-  char command[MAX_COMMAND_SIZE];
-  snprintf(command, MAX_COMMAND_SIZE - 1, "interface list");
-
-  doCommand(command, aChain, aCallback);
-}
-
-void NetworkUtils::getConfig(CommandChain* aChain,
-                             CommandCallback aCallback,
-                             NetworkResultOptions& aResult)
-{
-  char command[MAX_COMMAND_SIZE];
-  snprintf(command, MAX_COMMAND_SIZE - 1, "interface getcfg %s", GET_CHAR(mIfname));
-
-  doCommand(command, aChain, aCallback);
-}
-
 #undef GET_CHAR
 #undef GET_FIELD
 
 /*
  * Netd command success/fail function
  */
 #define ASSIGN_FIELD(prop)  aResult.prop = aChain->getParams().prop;
 #define ASSIGN_FIELD_VALUE(prop, value)  aResult.prop = value;
@@ -1102,85 +1058,16 @@ void NetworkUtils::wifiOperationModeSucc
   postMessage(aChain->getParams(), aResult);
 }
 
 void NetworkUtils::setDnsFail(NetworkParams& aOptions, NetworkResultOptions& aResult)
 {
   postMessage(aOptions, aResult);
 }
 
-void NetworkUtils::getInterfacesFail(NetworkParams& aOptions, NetworkResultOptions& aResult)
-{
-  postMessage(aOptions, aResult);
-}
-
-void NetworkUtils::getInterfacesSuccess(CommandChain* aChain,
-                                        CommandCallback aCallback,
-                                        NetworkResultOptions& aResult)
-{
-  char buf[BUF_SIZE];
-  NS_ConvertUTF16toUTF8 reason(aResult.mResultReason);
-  memcpy(buf, reason.get(), strlen(reason.get()));
-
-  nsTArray<nsCString> result;
-  split(buf, INTERFACE_DELIMIT, result);
-
-  nsTArray<nsString> interfaceList;
-  uint32_t length = result.Length();
-  convertUTF8toUTF16(result, interfaceList, length);
-
-  aResult.mInterfaceList.Construct();
-  for (uint32_t i = 0; i < length; i++) {
-    aResult.mInterfaceList.Value().AppendElement(interfaceList[i]);
-  }
-
-  postMessage(aChain->getParams(), aResult);
-}
-
-void NetworkUtils::setInterfaceConfigFail(NetworkParams& aOptions, NetworkResultOptions& aResult)
-{
-  postMessage(aOptions, aResult);
-}
-
-void NetworkUtils::setInterfaceConfigSuccess(CommandChain* aChain,
-                                             CommandCallback aCallback,
-                                             NetworkResultOptions& aResult)
-{
-  postMessage(aChain->getParams(), aResult);
-}
-
-void NetworkUtils::getInterfaceConfigFail(NetworkParams& aOptions, NetworkResultOptions& aResult)
-{
-  postMessage(aOptions, aResult);
-}
-
-void NetworkUtils::getInterfaceConfigSuccess(CommandChain* aChain,
-                                             CommandCallback aCallback,
-                                             NetworkResultOptions& aResult)
-{
-  char buf[BUF_SIZE];
-  NS_ConvertUTF16toUTF8 reason(aResult.mResultReason);
-  memcpy(buf, reason.get(), strlen(reason.get()));
-
-  nsTArray<nsCString> result;
-  split(buf, NETD_MESSAGE_DELIMIT, result);
-
-  ASSIGN_FIELD_VALUE(mMacAddr, NS_ConvertUTF8toUTF16(result[0]))
-  ASSIGN_FIELD_VALUE(mIpAddr, NS_ConvertUTF8toUTF16(result[1]))
-  ASSIGN_FIELD_VALUE(mMaskLength, atof(result[2].get()))
-
-  if (result[3].Find("up")) {
-    ASSIGN_FIELD_VALUE(mFlag, NS_ConvertUTF8toUTF16("up"))
-  } else {
-    ASSIGN_FIELD_VALUE(mFlag, NS_ConvertUTF8toUTF16("down"))
-  }
-
-  postMessage(aChain->getParams(), aResult);
-}
-
 #undef ASSIGN_FIELD
 #undef ASSIGN_FIELD_VALUE
 
 NetworkUtils::NetworkUtils(MessageCallback aCallback)
  : mMessageCallback(aCallback)
 {
   mNetUtils = new NetUtils();
 
@@ -1235,24 +1122,16 @@ void NetworkUtils::ExecuteCommand(Networ
   } else if (aOptions.mCmd.EqualsLiteral("setWifiTethering")) {
     setWifiTethering(aOptions);
   } else if (aOptions.mCmd.EqualsLiteral("setUSBTethering")) {
     setUSBTethering(aOptions);
   } else if (aOptions.mCmd.EqualsLiteral("enableUsbRndis")) {
     enableUsbRndis(aOptions);
   } else if (aOptions.mCmd.EqualsLiteral("updateUpStream")) {
     updateUpStream(aOptions);
-  } else if (aOptions.mCmd.EqualsLiteral("getInterfaces")) {
-    getInterfaces(aOptions);
-  } else if (aOptions.mCmd.EqualsLiteral("stopDhcp")) {
-    stopDhcp(aOptions);
-  } else if (aOptions.mCmd.EqualsLiteral("setInterfaceConfig")) {
-    setInterfaceConfig(aOptions);
-  } else if (aOptions.mCmd.EqualsLiteral("getInterfaceConfig")) {
-    getInterfaceConfig(aOptions);
   } else {
     WARN("unknon message");
     return;
   }
 
   if (!aOptions.mIsAsync) {
     NetworkResultOptions result;
     result.mRet = ret;
@@ -1832,60 +1711,24 @@ bool NetworkUtils::enableUsbRndis(Networ
   if (report) {
     usleep(USB_FUNCTION_RETRY_INTERVAL * 1000);
     checkUsbRndisState(aOptions);
   }
   return true;
 }
 
 /**
- * Handling upstream interface change event.
+ * handling upstream interface change event.
  */
 bool NetworkUtils::updateUpStream(NetworkParams& aOptions)
 {
   RUN_CHAIN(aOptions, sUpdateUpStreamChain, updateUpStreamFail)
   return true;
 }
 
-/**
- * Stop dhcp client deamon.
- */
-bool NetworkUtils::stopDhcp(NetworkParams& aOptions)
-{
-  mNetUtils->do_dhcp_stop(GET_CHAR(mIfname));
-  return true;
-}
-
-/**
- * Get existing network interfaces.
- */
-bool NetworkUtils::getInterfaces(NetworkParams& aOptions)
-{
-  RUN_CHAIN(aOptions, sGetInterfacesChain, getInterfacesFail)
-  return true;
-}
-
-/**
- * Set network config for a specified interface.
- */
-bool NetworkUtils::setInterfaceConfig(NetworkParams& aOptions)
-{
-  RUN_CHAIN(aOptions, sSetInterfaceConfigChain, setInterfaceConfigFail)
-  return true;
-}
-
-/**
- * Get network config of a specified interface.
- */
-bool NetworkUtils::getInterfaceConfig(NetworkParams& aOptions)
-{
-  RUN_CHAIN(aOptions, sGetInterfaceConfigChain, getInterfaceConfigFail)
-  return true;
-}
-
 void NetworkUtils::sendBroadcastMessage(uint32_t code, char* reason)
 {
   NetworkResultOptions result;
   switch(code) {
     case NETD_COMMAND_INTERFACE_CHANGE:
       result.mTopic = NS_ConvertUTF8toUTF16("netd-interface-change");
       break;
     case NETD_COMMAND_BANDWIDTH_CONTROLLER:
--- a/dom/system/gonk/NetworkUtils.h
+++ b/dom/system/gonk/NetworkUtils.h
@@ -67,17 +67,16 @@ public:
     mEndIp = aOther.mEndIp;
     mServerIp = aOther.mServerIp;
     mMaskLength = aOther.mMaskLength;
     mPreInternalIfname = aOther.mPreInternalIfname;
     mPreExternalIfname = aOther.mPreExternalIfname;
     mCurInternalIfname = aOther.mCurInternalIfname;
     mCurExternalIfname = aOther.mCurExternalIfname;
     mThreshold = aOther.mThreshold;
-    mIsBlocking = aOther.mIsBlocking;
   }
 
   NetworkParams(const mozilla::dom::NetworkCommandOptions& aOther) {
 
 #define COPY_SEQUENCE_FIELD(prop, type)                                                      \
     if (aOther.prop.WasPassed()) {                                                           \
       mozilla::dom::Sequence<type > const & currentValue = aOther.prop.InternalValue();      \
       uint32_t length = currentValue.Length();                                               \
@@ -144,17 +143,16 @@ public:
     COPY_OPT_STRING_FIELD(mEndIp, EmptyString())
     COPY_OPT_STRING_FIELD(mServerIp, EmptyString())
     COPY_OPT_STRING_FIELD(mMaskLength, EmptyString())
     COPY_OPT_STRING_FIELD(mPreInternalIfname, EmptyString())
     COPY_OPT_STRING_FIELD(mPreExternalIfname, EmptyString())
     COPY_OPT_STRING_FIELD(mCurInternalIfname, EmptyString())
     COPY_OPT_STRING_FIELD(mCurExternalIfname, EmptyString())
     COPY_OPT_FIELD(mThreshold, -1)
-    COPY_OPT_FIELD(mIsBlocking, false)
 
 #undef COPY_SEQUENCE_FIELD
 #undef COPY_OPT_STRING_FIELD
 #undef COPY_OPT_FIELD
 #undef COPY_FIELD
   }
 
   int32_t mId;
@@ -195,17 +193,16 @@ public:
   nsString mEndIp;
   nsString mServerIp;
   nsString mMaskLength;
   nsString mPreInternalIfname;
   nsString mPreExternalIfname;
   nsString mCurInternalIfname;
   nsString mCurExternalIfname;
   long mThreshold;
-  bool mIsBlocking;
 };
 
 // CommandChain store the necessary information to execute command one by one.
 // Including :
 // 1. Command parameters.
 // 2. Command list.
 // 3. Error callback function.
 // 4. Index of current execution command.
@@ -279,20 +276,16 @@ private:
   bool enableNetworkInterfaceAlarm(NetworkParams& aOptions);
   bool disableNetworkInterfaceAlarm(NetworkParams& aOptions);
   bool setWifiOperationMode(NetworkParams& aOptions);
   bool setDhcpServer(NetworkParams& aOptions);
   bool setWifiTethering(NetworkParams& aOptions);
   bool setUSBTethering(NetworkParams& aOptions);
   bool enableUsbRndis(NetworkParams& aOptions);
   bool updateUpStream(NetworkParams& aOptions);
-  bool getInterfaces(NetworkParams& aOptions);
-  bool stopDhcp(NetworkParams& aOptions);
-  bool setInterfaceConfig(NetworkParams& aOptions);
-  bool getInterfaceConfig(NetworkParams& aOptions);
 
   /**
    * function pointer array holds all netd commands should be executed
    * in sequence to accomplish a given command by other module.
    */
   static CommandFunc sWifiEnableChain[];
   static CommandFunc sWifiDisableChain[];
   static CommandFunc sWifiFailChain[];
@@ -304,19 +297,16 @@ private:
   static CommandFunc sUpdateUpStreamChain[];
   static CommandFunc sStartDhcpServerChain[];
   static CommandFunc sStopDhcpServerChain[];
   static CommandFunc sNetworkInterfaceStatsChain[];
   static CommandFunc sNetworkInterfaceEnableAlarmChain[];
   static CommandFunc sNetworkInterfaceDisableAlarmChain[];
   static CommandFunc sNetworkInterfaceSetAlarmChain[];
   static CommandFunc sSetDnsChain[];
-  static CommandFunc sGetInterfacesChain[];
-  static CommandFunc sSetInterfaceConfigChain[];
-  static CommandFunc sGetInterfaceConfigChain[];
 
   /**
    * Individual netd command stored in command chain.
    */
 #define PARAMS CommandChain* aChain, CommandCallback aCallback, \
                mozilla::dom::NetworkResultOptions& aResult
   static void wifiFirmwareReload(PARAMS);
   static void startAccessPointDriver(PARAMS);
@@ -343,47 +333,38 @@ private:
   static void stopTethering(PARAMS);
   static void startTethering(PARAMS);
   static void untetherInterface(PARAMS);
   static void setDnsForwarders(PARAMS);
   static void enableNat(PARAMS);
   static void disableNat(PARAMS);
   static void setDefaultInterface(PARAMS);
   static void setInterfaceDns(PARAMS);
-  static void getInterfaceList(PARAMS);
-  static void setConfig(PARAMS);
-  static void getConfig(PARAMS);
   static void wifiTetheringSuccess(PARAMS);
   static void usbTetheringSuccess(PARAMS);
   static void networkInterfaceStatsSuccess(PARAMS);
   static void networkInterfaceAlarmSuccess(PARAMS);
   static void updateUpStreamSuccess(PARAMS);
   static void setDhcpServerSuccess(PARAMS);
   static void wifiOperationModeSuccess(PARAMS);
-  static void getInterfacesSuccess(PARAMS);
-  static void setInterfaceConfigSuccess(PARAMS);
-  static void getInterfaceConfigSuccess(PARAMS);
 #undef PARAMS
 
   /**
    * Error callback function executed when a command is fail.
    */
 #define PARAMS NetworkParams& aOptions, \
                mozilla::dom::NetworkResultOptions& aResult
   static void wifiTetheringFail(PARAMS);
   static void wifiOperationModeFail(PARAMS);
   static void usbTetheringFail(PARAMS);
   static void updateUpStreamFail(PARAMS);
   static void setDhcpServerFail(PARAMS);
   static void networkInterfaceStatsFail(PARAMS);
   static void networkInterfaceAlarmFail(PARAMS);
   static void setDnsFail(PARAMS);
-  static void getInterfacesFail(PARAMS);
-  static void setInterfaceConfigFail(PARAMS);
-  static void getInterfaceConfigFail(PARAMS);
 #undef PARAMS
 
   /**
    * Command chain processing functions.
    */
   static void next(CommandChain* aChain, bool aError,
                    mozilla::dom::NetworkResultOptions& aResult);
   static void nextNetdCommand();
--- a/dom/system/gonk/NetworkWorker.cpp
+++ b/dom/system/gonk/NetworkWorker.cpp
@@ -13,18 +13,16 @@
 
 #define NS_NETWORKWORKER_CID \
   { 0x6df093e1, 0x8127, 0x4fa7, {0x90, 0x13, 0xa3, 0xaa, 0xa7, 0x79, 0xbb, 0xdd} }
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::ipc;
 
-#define PROPERTY_VALUE_MAX 80
-
 namespace mozilla {
 
 nsCOMPtr<nsIThread> gWorkerThread;
 
 // The singleton network worker, to be used on the main thread.
 StaticRefPtr<NetworkWorker> gNetworkWorker;
 
 // The singleton networkutils class, that can be used on any thread.
@@ -34,51 +32,32 @@ static nsAutoPtr<NetworkUtils> gNetworkU
 class NetworkResultDispatcher : public nsRunnable
 {
 public:
   NetworkResultDispatcher(const NetworkResultOptions& aResult)
   {
     MOZ_ASSERT(!NS_IsMainThread());
 
 #define COPY_FIELD(prop) mResult.prop = aResult.prop;
-#define COPY_SEQUENCE_FIELD(prop, type)                                                   \
-    if (aResult.prop.WasPassed()) {                                                       \
-      mozilla::dom::Sequence<type > const & currentValue = aResult.prop.InternalValue();  \
-      uint32_t length = currentValue.Length();                                            \
-      mResult.prop.Construct();                                                           \
-      for (uint32_t idx = 0; idx < length; idx++) {                                       \
-        mResult.prop.Value().AppendElement(currentValue[idx]);                            \
-      }                                                                                   \
-    }
     COPY_FIELD(mId)
     COPY_FIELD(mRet)
     COPY_FIELD(mBroadcast)
     COPY_FIELD(mTopic)
     COPY_FIELD(mReason)
     COPY_FIELD(mResultCode)
     COPY_FIELD(mResultReason)
     COPY_FIELD(mError)
     COPY_FIELD(mRxBytes)
     COPY_FIELD(mTxBytes)
     COPY_FIELD(mDate)
     COPY_FIELD(mEnable)
     COPY_FIELD(mResult)
     COPY_FIELD(mSuccess)
     COPY_FIELD(mCurExternalIfname)
     COPY_FIELD(mCurInternalIfname)
-    COPY_FIELD(mIpAddr)
-    COPY_FIELD(mGateway)
-    COPY_FIELD(mDns1)
-    COPY_FIELD(mDns2)
-    COPY_FIELD(mServer)
-    COPY_FIELD(mLease)
-    COPY_FIELD(mVendorInfo)
-    COPY_FIELD(mMaskLength)
-    COPY_FIELD(mFlag)
-    COPY_SEQUENCE_FIELD(mInterfaceList, nsString)
 #undef COPY_FIELD
   }
 
   NS_IMETHOD Run()
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     if (gNetworkWorker) {
@@ -108,76 +87,16 @@ public:
       gNetworkUtils->ExecuteCommand(mParams);
     }
     return NS_OK;
   }
 private:
   NetworkParams mParams;
 };
 
-// Runnable used for blocking command.
-class RunDhcpEvent : public nsRunnable
-{
-public:
-  RunDhcpEvent(const NetworkParams& aParams)
-  : mParams(aParams)
-  {}
-
-  NS_IMETHOD Run()
-  {
-    MOZ_ASSERT(!NS_IsMainThread());
-
-    nsAutoPtr<NetUtils> netUtils;
-    netUtils = new NetUtils();
-
-    NetworkResultOptions result;
-    result.mId = mParams.mId;
-
-    int32_t status;
-    char ipaddr[PROPERTY_VALUE_MAX];
-    char gateway[PROPERTY_VALUE_MAX];
-    uint32_t prefixLength;
-    char dns1[PROPERTY_VALUE_MAX];
-    char dns2[PROPERTY_VALUE_MAX];
-    char server[PROPERTY_VALUE_MAX];
-    uint32_t lease;
-    char vendorinfo[PROPERTY_VALUE_MAX];
-    status = netUtils->do_dhcp_do_request(NS_ConvertUTF16toUTF8(mParams.mIfname).get(),
-                                          ipaddr,
-                                          gateway,
-                                          &prefixLength,
-                                          dns1,
-                                          dns2,
-                                          server,
-                                          &lease,
-                                          vendorinfo);
-
-
-    if (status == 0) {
-      // run dhcp success.
-      result.mSuccess = true;
-      result.mIpAddr = NS_ConvertUTF8toUTF16(ipaddr);
-      result.mGateway = NS_ConvertUTF8toUTF16(gateway);
-      result.mDns1 = NS_ConvertUTF8toUTF16(dns1);
-      result.mDns2 = NS_ConvertUTF8toUTF16(dns2);
-      result.mServer = NS_ConvertUTF8toUTF16(server);
-      result.mLease = lease;
-      result.mVendorInfo = NS_ConvertUTF8toUTF16(vendorinfo);
-      result.mMaskLength = prefixLength;
-    }
-
-    nsCOMPtr<nsIRunnable> runnable = new NetworkResultDispatcher(result);
-    NS_DispatchToMainThread(runnable);
-
-    return NS_OK;
-  }
-private:
-  NetworkParams mParams;
-};
-
 // Runnable used dispatch netd result on the worker thread.
 class NetdEventRunnable : public nsRunnable
 {
 public:
   NetdEventRunnable(NetdCommand* aCommand)
     : mCommand(aCommand)
   {
     MOZ_ASSERT(!NS_IsMainThread());
@@ -300,50 +219,26 @@ NetworkWorker::PostMessage(JS::Handle<JS
   MOZ_ASSERT(NS_IsMainThread());
 
   NetworkCommandOptions options;
   if (!options.Init(aCx, aOptions)) {
     NS_WARNING("Bad dictionary passed to NetworkWorker::SendCommand");
     return NS_ERROR_FAILURE;
   }
 
+  // Dispatch the command to the control thread.
   NetworkParams NetworkParams(options);
-
-  if (NetworkParams.mIsBlocking) {
-    NetworkWorker::HandleBlockingCommand(NetworkParams);
-    return NS_OK;
-  }
-
-  // Dispatch the command to the control thread.
   nsCOMPtr<nsIRunnable> runnable = new NetworkCommandDispatcher(NetworkParams);
   if (gWorkerThread) {
     gWorkerThread->Dispatch(runnable, nsIEventTarget::DISPATCH_NORMAL);
   }
   return NS_OK;
 }
 
 void
-NetworkWorker::HandleBlockingCommand(NetworkParams& aOptions)
-{
-  if (aOptions.mCmd.EqualsLiteral("runDhcp")) {
-    NetworkWorker::RunDhcp(aOptions);
-  }
-}
-
-void
-NetworkWorker::RunDhcp(NetworkParams& aOptions)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  nsCOMPtr<nsIRunnable> runnable = new RunDhcpEvent(aOptions);
-  nsCOMPtr<nsIThread> thread;
-  NS_NewThread(getter_AddRefs(thread), runnable);
-}
-
-void
 NetworkWorker::DispatchNetworkResult(const NetworkResultOptions& aOptions)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   mozilla::AutoSafeJSContext cx;
   JS::RootedValue val(cx);
 
   if (!ToJSValue(cx, aOptions, &val)) {
--- a/dom/system/gonk/NetworkWorker.h
+++ b/dom/system/gonk/NetworkWorker.h
@@ -6,18 +6,16 @@
 #define NetworkWorker_h
 
 #include "mozilla/dom/NetworkOptionsBinding.h"
 #include "mozilla/ipc/Netd.h"
 #include "nsINetworkWorker.h"
 #include "nsCOMPtr.h"
 #include "nsThread.h"
 
-class NetworkParams;
-
 namespace mozilla {
 
 class NetworkWorker MOZ_FINAL : public nsINetworkWorker
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSINETWORKWORKER
 
@@ -26,17 +24,14 @@ public:
   void DispatchNetworkResult(const mozilla::dom::NetworkResultOptions& aOptions);
 
 private:
   NetworkWorker();
   ~NetworkWorker();
 
   static void NotifyResult(mozilla::dom::NetworkResultOptions& aResult);
 
-  void HandleBlockingCommand(NetworkParams& aParams);
-  void RunDhcp(NetworkParams& aParams);
-
   nsCOMPtr<nsINetworkEventListener> mListener;
 };
 
 } // namespace mozilla
 
 #endif  // NetworkWorker_h
--- a/dom/system/gonk/nsINetworkManager.idl
+++ b/dom/system/gonk/nsINetworkManager.idl
@@ -4,26 +4,24 @@
 
 #include "nsISupports.idl"
 
 interface nsIWifiTetheringCallback;
 
 /**
  * Information about networks that is exposed to network manager API consumers.
  */
-[scriptable, uuid(8f9ab9e0-72c1-4874-80c7-8143353b979f)]
+[scriptable, uuid(cb62ae03-6bda-43ff-9560-916d60203d33)]
 interface nsINetworkInterface : nsISupports
 {
   const long NETWORK_STATE_UNKNOWN = -1;
   const long NETWORK_STATE_CONNECTING = 0;
   const long NETWORK_STATE_CONNECTED = 1;
   const long NETWORK_STATE_DISCONNECTING = 2;
   const long NETWORK_STATE_DISCONNECTED = 3;
-  const long NETWORK_STATE_ENABLED = 4;
-  const long NETWORK_STATE_DISABLED = 5;
 
   /**
    * Current network state, one of the NETWORK_STATE_* constants.
    *
    * When this changes, network interface implementations notify the
    * 'network-interface-state-changed' observer notification.
    */
   readonly attribute long state;
@@ -31,17 +29,16 @@ interface nsINetworkInterface : nsISuppo
   const long NETWORK_TYPE_UNKNOWN     = -1;
   const long NETWORK_TYPE_WIFI        = 0;
   const long NETWORK_TYPE_MOBILE      = 1;
   const long NETWORK_TYPE_MOBILE_MMS  = 2;
   const long NETWORK_TYPE_MOBILE_SUPL = 3;
   const long NETWORK_TYPE_WIFI_P2P    = 4;
   const long NETWORK_TYPE_MOBILE_IMS  = 5;
   const long NETWORK_TYPE_MOBILE_DUN  = 6;
-  const long NETWORK_TYPE_ETHERNET    = 7;
 
   /**
    * Network type. One of the NETWORK_TYPE_* constants.
    */
   readonly attribute long type;
 
   /**
    * Name of the network interface. This identifier is unique.
@@ -95,17 +92,17 @@ interface nsINetworkInterface : nsISuppo
    */
   void getDnses([optional] out unsigned long count,
                 [array, size_is(count), retval] out wstring dnses);
 };
 
 /**
  * Manage network interfaces.
  */
-[scriptable, uuid(1ba9346b-53b5-4660-9dc6-58f0b258d0a6)]
+[scriptable, uuid(3ea50550-4b3c-11e3-8f96-0800200c9a66)]
 interface nsINetworkManager : nsISupports
 {
   /**
    * Register the given network interface with the network manager.
    *
    * Consumers will be notified with the 'network-interface-registered'
    * observer notification.
    *
@@ -134,25 +131,16 @@ interface nsINetworkManager : nsISupport
    * Object containing all known network connections, keyed by their
    * network id. Network id is composed of a sub-id + '-' + network
    * type. For mobile network types, sub-id is 'ril' + service id; for
    * non-mobile network types, sub-id is always 'device'.
    */
   readonly attribute jsval networkInterfaces;
 
   /**
-   * Priority list of network types. An array of
-   * nsINetworkInterface::NETWORK_TYPE_* constants.
-   *
-   * The piror position of the type indicates the higher priority. The priority
-   * is used to determine route when there are multiple connected networks.
-   */
-  attribute jsval networkTypePriorityList;
-
-  /**
    * The preferred network type. One of the
    * nsINetworkInterface::NETWORK_TYPE_* constants.
    *
    * This attribute is used for setting default route to favor
    * interfaces with given type.  This can be overriden by calling
    * overrideDefaultRoute().
    */
   attribute long preferredNetworkType;
--- a/dom/system/gonk/nsINetworkService.idl
+++ b/dom/system/gonk/nsINetworkService.idl
@@ -96,75 +96,20 @@ interface nsIUpdateUpStreamCallback : ns
    * @param success
    *        Boolean to indicate the operation is successful or not.
    * @param externalIfname
    *        The external interface name.
    */
   void updateUpStreamResult(in boolean success, in DOMString externalIfname);
 };
 
-[scriptable, function, uuid(4a9166f3-7e4f-4d10-bb5c-b49ee21d6184)]
-interface nsIRunDhcpCallback : nsISupports
-{
-  /**
-   * Callback function used to report the result of dhcp request.
-   *
-   * @param success
-   *        Boolean to indicate the operation is successful or not.
-   */
-  void runDhcpResult(in boolean success, in jsval result);
-};
-
-[scriptable, function, uuid(88e3ee22-f1b3-4fa0-8a5d-793fb827c42c)]
-interface nsIGetInterfacesCallback : nsISupports
-{
-  /**
-   * Callback function used to return the list of existing network interfaces.
-   *
-   * @param success
-   *        Boolean to indicate the operation is successful or not.
-   * @param interfaceList
-   *        An array of interface name.
-   */
-  void getInterfacesResult(in boolean success, in jsval interfaceList);
-};
-
-[scriptable, function, uuid(064e02a3-d2c0-42c5-a293-1efa84056100)]
-interface nsIGetInterfaceConfigCallback : nsISupports
-{
-  /**
-   * Callback function used to return the network config of a given interface.
-   *
-   * @param success
-   *        Boolean to indicate the operation is successful or not.
-   * @param result
-   *        .ip: Ip address.
-   *        .prefix: mask length.
-   *        .link: network link properties.
-   *        .mac: mac address.
-   */
-  void getInterfaceConfigResult(in boolean success, in jsval result);
-};
-
-[scriptable, function, uuid(b370f360-6ba8-4517-a4f9-31e8f004ee91)]
-interface nsISetInterfaceConfigCallback : nsISupports
-{
-  /**
-   * Callback function used to set network cofig for a specified interface.
-   *
-   * @param success
-   *        Boolean to indicate the operation is successful or not.
-   */
-  void setInterfaceConfigResult(in boolean success);
-};
-
 /**
  * Provide network services.
  */
-[scriptable, uuid(48c13741-aec9-4a86-8962-432011708261)]
+[scriptable, uuid(f96461fa-e844-45d2-a6c3-8cd23ab0916b)]
 interface nsINetworkService : nsISupports
 {
   /**
    * Enable or disable Wifi Tethering
    *
    * @param enabled
    *        Boolean that indicates whether tethering should be enabled (true) or disabled (false).
    * @param config
@@ -395,58 +340,9 @@ interface nsINetworkService : nsISupport
    * @param current
    *        The current internal and external interface.
    * @param callback
    *        Callback function to report the result.
    */
   void updateUpStream(in jsval previous,
                       in jsval current,
                       in nsIUpdateUpStreamCallback callback);
-
-  /**
-   * Run Dhcp request.
-   *
-   * @param ifname
-   *        Target interface.
-   * @param callback
-   *        Callback function to report the result.
-   */
-  void runDhcp(in DOMString ifname, in nsIRunDhcpCallback callback);
-
-  /**
-   * Stop Dhcp daemon.
-   *
-   * @param ifname
-   *        Target interface.
-   */
-  void stopDhcp(in DOMString ifname);
-
-  /*
-   * Obtain interfaces list.
-   *
-   * @param callback
-   *        Callback function to return the result.
-   */
-  void getInterfaces(in nsIGetInterfacesCallback callback);
-
-  /**
-   * Set config for a network interface.
-   *
-   * @param config
-   *        .ifname: Target interface.
-   *        .ip: Ip address.
-   *        .prefix: mask length.
-   *        .link: network link properties.
-   * @param callback
-   *        Callback function to report the result.
-   */
-  void setInterfaceConfig(in jsval config, in nsISetInterfaceConfigCallback callback);
-
-  /**
-   * Get config of a network interface.
-   *
-   * @param ifname
-   *        Target interface.
-   * @param callback
-   *        Callback function to report the result.
-   */
-  void getInterfaceConfig(in DOMString ifname, in nsIGetInterfaceConfigCallback callback);
 };
new file mode 100644
--- /dev/null
+++ b/dom/webidl/BluetoothClassOfDevice.webidl
@@ -0,0 +1,42 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+[CheckPermissions="bluetooth"]
+interface BluetoothClassOfDevice
+{
+  /**
+   * The following constants are defined in Assigned Numbers of bluetooth
+   * General Access Profile (GAP) spec. For more information see
+   *   https://www.bluetooth.org/en-us/specification/assigned-numbers/baseband
+   */
+
+  // Major service class
+  const unsigned short LIMITED_DISCOVERABILITY = 0x0001;
+  const unsigned short POSITIONING             = 0x0008;
+  const unsigned short NETWORKING              = 0x0010;
+  const unsigned short RENDERING               = 0x0020;
+  const unsigned short CAPTURING               = 0x0040;
+  const unsigned short OBJECT_TRANSFER         = 0x0080;
+  const unsigned short AUDIO                   = 0x0100;
+  const unsigned short TELEPHONY               = 0x0200;
+  const unsigned short INFORMATION             = 0x0400;
+
+  // Major device class
+  const octet MISC          = 0x00;
+  const octet COMPUTER      = 0x01;
+  const octet PHONE         = 0x02;
+  const octet NETWORK       = 0x03;
+  const octet AUDIO_VIDEO   = 0x04;
+  const octet PERIPHERAL    = 0x05;
+  const octet IMAGING       = 0x06;
+  const octet WEARABLE      = 0x07;
+  const octet TOY           = 0x08;
+  const octet HEALTH        = 0x09;
+  const octet UNCATEGORIZED = 0x1F;
+
+  readonly attribute unsigned short majorServiceClass;
+  readonly attribute octet majorDeviceClass;
+  readonly attribute octet minorDeviceClass;
+};
--- a/dom/webidl/NetworkOptions.webidl
+++ b/dom/webidl/NetworkOptions.webidl
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
-* This dictionary holds the parameters sent to the network worker.
+* This dictionnary holds the parameters sent to the network worker.
 */
 dictionary NetworkCommandOptions
 {
   long id = 0;                        // opaque id.
   DOMString cmd = "";                 // the command name.
   DOMString ifname;                   // for "removeNetworkRoute", "setDNS",
                                       //     "setDefaultRouteAndDNS", "removeDefaultRoute"
                                       //     "addHostRoute", "removeHostRoute"
@@ -50,17 +50,16 @@ dictionary NetworkCommandOptions
   DOMString startIp;                  // for "setDhcpServer".
   DOMString endIp;                    // for "setDhcpServer".
   DOMString serverIp;                 // for "setDhcpServer".
   DOMString maskLength;               // for "setDhcpServer".
   DOMString preInternalIfname;        // for "updateUpStream".
   DOMString preExternalIfname;        // for "updateUpStream".
   DOMString curInternalIfname;        // for "updateUpStream".
   DOMString curExternalIfname;        // for "updateUpStream".
-  boolean isBlocking;                 // for "runDhcp".
 };
 
 /**
 * This dictionary holds the parameters sent back to NetworkService.js.
 */
 dictionary NetworkResultOptions
 {
   long id = 0;                        // opaque id.
@@ -77,23 +76,9 @@ dictionary NetworkResultOptions
   float txBytes = -1;                 // for "getNetworkInterfaceStats".
   DOMString date = "";                // for "getNetworkInterfaceStats".
   boolean enable = false;             // for "setWifiTethering", "setUSBTethering"
                                       //     "enableUsbRndis".
   boolean result = false;             // for "enableUsbRndis".
   boolean success = false;            // for "setDhcpServer".
   DOMString curExternalIfname = "";   // for "updateUpStream".
   DOMString curInternalIfname = "";   // for "updateUpStream".
-
-  DOMString ipAddr = "";              // for "runDhcp", "getInterfaceConfig".
-  DOMString gateway = "";             // for "runDhcp".
-  DOMString dns1 = "";                // for "runDhcp".
-  DOMString dns2 = "";                // for "runDhcp".
-  DOMString server = "";              // for "runDhcp".
-  short lease = 0;                    // for "runDhcp".
-  DOMString vendorInfo = "";          // for "runDhcp".
-  short maskLength = 0;               // for "runDhcp".
-
-  DOMString flag = "down";            // for "getInterfaceConfig".
-  DOMString macAddr = "";             // for "getInterfaceConfig".
-
-  sequence<DOMString> interfaceList;  // for "getInterfaceList".
 };
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -562,16 +562,17 @@ WEBIDL_FILES += [
 # the safe side.
 if CONFIG['MOZ_DEBUG']:
     WEBIDL_FILES += ['TestInterfaceJS.webidl']
 
 if CONFIG['MOZ_B2G_BT']:
     if CONFIG['MOZ_B2G_BT_API_V2']:
         WEBIDL_FILES += [
             'BluetoothAdapter2.webidl',
+            'BluetoothClassOfDevice.webidl',
             'BluetoothDevice2.webidl',
             'BluetoothDiscoveryHandle.webidl',
             'BluetoothManager2.webidl',
         ]
     else:
         WEBIDL_FILES += [
             'BluetoothAdapter.webidl',
             'BluetoothDevice.webidl',
--- a/testing/marionette/client/marionette/tests/unit-tests.ini
+++ b/testing/marionette/client/marionette/tests/unit-tests.ini
@@ -23,15 +23,14 @@ skip = false
 [include:../../../../../dom/mobileconnection/tests/marionette/manifest.ini]
 [include:../../../../../dom/system/gonk/tests/marionette/manifest.ini]
 [include:../../../../../dom/icc/tests/marionette/manifest.ini]
 [include:../../../../../dom/system/tests/marionette/manifest.ini]
 [include:../../../../../dom/nfc/tests/marionette/manifest.ini]
 [include:../../../../../dom/events/test/marionette/manifest.ini]
 [include:../../../../../dom/wifi/test/marionette/manifest.ini]
 [include:../../../../../dom/cellbroadcast/tests/marionette/manifest.ini]
-[include:../../../../../dom/network/tests/marionette/manifest.ini]
 
 ; layout tests
 [include:../../../../../layout/base/tests/marionette/manifest.ini]
 
 ; loop tests
 [include:../../../../../browser/components/loop/manifest.ini]