Merge m-c to inbound on a CLOSED TREE.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 30 Apr 2014 16:47:33 -0400
changeset 181502 34736c996ff76a7379b7a4f98b29567cc39d53f5
parent 181451 44e189f0fd67e5eb4d184c5bba0a85018dc0bd3a (current diff)
parent 181501 95613a41c9de67c30e60decb233df3ffdb625dec (diff)
child 181503 a0666ad474fa9b487958acddb53832649df649c5
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
milestone32.0a1
Merge m-c to inbound on a CLOSED TREE.
browser/components/sessionstore/test/browser_480148.js
configure.in
mobile/android/base/resources/drawable-hdpi/ic_url_bar_go.png
mobile/android/base/resources/drawable-mdpi/ic_url_bar_go.png
mobile/android/base/resources/drawable-xhdpi/ic_url_bar_go.png
mobile/android/base/resources/drawable/toolbar_separator.xml
mobile/android/base/resources/drawable/toolbar_separator_pb.xml
mobile/android/base/resources/drawable/toolbar_separator_selector.xml
--- 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="2a165bebfa19b11b697837409f9550dd2917c46c">
     <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="a3437e7e204e32f0f93880a43bfc0cef909cb84d"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="8873166797fecfa65c0afa644d2ebcc7d7cb4ed3"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="0292e64ef8451df104dcf9ac3b2c6749b81684dd"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="85f9690323b235f4dcf2901ea2240d3c60fc22a0"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
   <!-- 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="e6383e6e785cc3ea237e902beb1092f9aa88e29d">
     <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="a3437e7e204e32f0f93880a43bfc0cef909cb84d"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="8873166797fecfa65c0afa644d2ebcc7d7cb4ed3"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
   <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="65fba428f8d76336b33ddd9e15900357953600ba">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="a3437e7e204e32f0f93880a43bfc0cef909cb84d"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="8873166797fecfa65c0afa644d2ebcc7d7cb4ed3"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <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="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
   <!-- Stock Android things -->
@@ -51,17 +51,16 @@
   <project name="platform/external/flac" path="external/flac" revision="d835398098fcbcb904e99ec6bdb9e4a78ef82a7d"/>
   <project name="platform/external/freetype" path="external/freetype" revision="d5a7ed510903655138246192e031960b09418209"/>
   <project name="platform/external/gcc-demangle" path="external/gcc-demangle" revision="41a7d241271ff1738bcb90ef98fc657938899f17"/>
   <project name="platform/external/genext2fs" path="external/genext2fs" revision="a14feae5ebbcda801c26623ec6b04884e2a9ed5b"/>
   <project name="platform/external/giflib" path="external/giflib" revision="50ca09a5b13245c7357733a9072d67fd3d8d4709"/>
   <project name="platform/external/gtest" path="external/gtest" revision="0e87f7087bead3fbba86ad24fb888b23c25b35d3"/>
   <project name="platform/external/harfbuzz" path="external/harfbuzz" revision="77bfb851261572216aeba5a5e1bb1d910d40ecb9"/>
   <project name="platform/external/harfbuzz_ng" path="external/harfbuzz_ng" revision="6e3a3edf0a9ae09a7b92637c2a7131df0bde4760"/>
-  <project name="platform/external/icu4c" path="external/icu4c" remote="aosp" revision="b4c6379528887dc25ca9991a535a8d92a61ad6b6"/>
   <project name="platform/external/iproute2" path="external/iproute2" revision="b438b9c63d6f79cb08391f0b0f12b8457ea99395"/>
   <project name="platform/external/ipsec-tools" path="external/ipsec-tools" revision="c493b85a54d27cbcb1dcb91bb86545254cf28684"/>
   <project name="platform/external/iptables" path="external/iptables" revision="fe8cf0795af508d6bd413d0ab729ed6afabd237e"/>
   <project name="platform/external/jack" path="external/jack" revision="f4e712ba487ef9c26360bce0ae2a7bf62cb36e0a"/>
   <project name="platform/external/jhead" path="external/jhead" revision="369044ba5a78dd3378a804402d43819551350bfc"/>
   <project name="platform/external/jpeg" path="external/jpeg" revision="b0d8c64f08ef085025b60d9d398e66089cafe2c0"/>
   <project name="platform/external/junit" path="external/junit" revision="4304fac3d9e09955b1d73adfe3dff49a8d14b38a"/>
   <project name="platform/external/libgsm" path="external/libgsm" revision="ffb6eeb53ef4ec427e24862c30317179fb303006"/>
@@ -114,20 +113,21 @@
   <project name="platform/prebuilts/qemu-kernel" path="prebuilts/qemu-kernel" revision="0efba6f55dca4756b05f81b6cac3d5f28297da79"/>
   <project name="platform/prebuilts/sdk" path="prebuilts/sdk" revision="b562b01c93de9578d5db537b6a602a38e1aaa0ce"/>
   <project name="platform/prebuilts/tools" path="prebuilts/tools" revision="387f03e815f57d536dd922706db1622bddba8d81"/>
   <project name="platform/system/extras" path="system/extras" revision="5356165f67f4a81c2ef28671c13697f1657590df"/>
   <project name="platform/system/media" path="system/media" revision="be0e2fe59a8043fa5200f75697df9220a99abe9d"/>
   <project name="platform/system/netd" path="system/netd" revision="36704b0da24debcab8090156568ac236315036bb"/>
   <project name="platform/system/security" path="system/security" revision="583374f69f531ba68fc3dcbff1f74893d2a96406"/>
   <project name="platform/system/vold" path="system/vold" revision="d4455b8cf361f8353e8aebac15ffd64b4aedd2b9"/>
+  <project name="platform/external/icu4c" path="external/icu4c" remote="aosp" revision="b4c6379528887dc25ca9991a535a8d92a61ad6b6"/>
+  <project name="platform_frameworks_av" path="frameworks/av" remote="b2g" revision="6c67114dfa109f31d37e880b9c009f2965a22261"/>
+  <project name="platform_system_core" path="system/core" remote="b2g" revision="9395eb5aa885cf6d305a202de6e9694a58a89717"/>
   <default remote="caf" revision="refs/tags/android-4.4.2_r1" sync-j="4"/>
   <!-- Emulator specific things -->
   <project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="72ffdf71c68a96309212eb13d63560d66db14c9e"/>
   <project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="cf3f83a8ef13597b62fb6de7aa0cfaf5dc5de2b5"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="606dd627fad312cb79284fa38e44f0ed4bd42bfa"/>
   <project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="694cecf256122d0cb3b6a1a4efb4b5c7401db223"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="aa430bd055bf7e1003d78e9bf0c0abbe32f33e45"/>
-  <project name="platform_frameworks_av" path="frameworks/av" remote="b2g" revision="6c67114dfa109f31d37e880b9c009f2965a22261"/>
-  <project name="platform_system_core" path="system/core" remote="b2g" revision="9395eb5aa885cf6d305a202de6e9694a58a89717"/>
   <project name="platform/development" path="development" revision="5968ff4e13e0d696ad8d972281fc27ae5a12829b"/>
   <project name="android-sdk" path="sdk" remote="b2g" revision="0951179277915335251c5e11d242e4e1a8c2236f"/>
 </manifest>
--- 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="2a165bebfa19b11b697837409f9550dd2917c46c">
     <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="a3437e7e204e32f0f93880a43bfc0cef909cb84d"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="8873166797fecfa65c0afa644d2ebcc7d7cb4ed3"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="0292e64ef8451df104dcf9ac3b2c6749b81684dd"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="85f9690323b235f4dcf2901ea2240d3c60fc22a0"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
   <!-- 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
@@ -13,17 +13,17 @@
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e6383e6e785cc3ea237e902beb1092f9aa88e29d">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="a3437e7e204e32f0f93880a43bfc0cef909cb84d"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="8873166797fecfa65c0afa644d2ebcc7d7cb4ed3"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
   <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"/>
@@ -114,32 +114,34 @@
   <project name="platform/system/media" path="system/media" revision="df2cdd433738a891102873710bdd3c3db7adb0cc"/>
   <project name="platform/system/netd" path="system/netd" revision="ea8103eae5642621ca8202e00620f4ca954ed413"/>
   <project name="platform/system/security" path="system/security" revision="360f51f7af191316cd739f229db1c5f7233be063"/>
   <project name="platform/system/vold" path="system/vold" revision="153df4d067a4149c7d78f1c92fed2ce2bd6a272e"/>
   <default remote="caf" revision="jb_3.2" sync-j="4"/>
   <!-- Flame specific things -->
   <project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="e8a318f7690092e639ba88891606f4183e846d3f"/>
   <project name="device/qcom/common" path="device/qcom/common" revision="234ed34543345f58c0d4dcb1aa012de68802b9dc"/>
-  <project name="device-flame" path="device/t2m/flame" remote="b2g" revision="9729afa15ae3362db1852eee60422947db614dd6"/>
+  <project name="device-flame" path="device/t2m/flame" remote="b2g" revision="2173c7c1f90ccd28915eed1d58077311d8296ec4"/>
   <project name="kernel/msm" path="kernel" revision="4f49d97a18160be16eb6853c0ee6a5f1830ffbe9"/>
   <project name="platform/bootable/recovery" path="bootable/recovery" revision="f2914eacee9120680a41463708bb6ee8291749fc"/>
   <project name="platform/external/bluetooth/bluedroid" path="external/bluetooth/bluedroid" revision="fa892235a9bd8983f8b591129fc1a9398f64e514"/>
   <project name="platform/external/bluetooth/bluez" path="external/bluetooth/bluez" revision="f0689ac1914cdbc59e53bdc9edd9013dc157c299"/>
   <project name="platform/external/bluetooth/glib" path="external/bluetooth/glib" revision="dd925f76e4f149c3d5571b80e12f7e24bbe89c59"/>
   <project name="platform/external/dbus" path="external/dbus" revision="ea87119c843116340f5df1d94eaf8275e1055ae8"/>
+  <project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="494c177966fdc31183a5f7af82dc9130f523da4b"/>
   <project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="320b05a5761eb2a4816f7529c91ea49422979b55"/>
   <project name="platform/frameworks/av" path="frameworks/av" revision="1df6dac11d7370a2fffca8e31d65b80f537faec5"/>
   <project name="platform/frameworks/base" path="frameworks/base" revision="807d87d5ff66cb5e0664f6924f612fcdb5e2c453"/>
   <project name="platform/frameworks/native" path="frameworks/native" revision="33a2b51f78416536e1bfba0c0b7776db307f3a4f"/>
   <project name="platform/hardware/libhardware" path="hardware/libhardware" revision="484802559ed106bac4811bd01c024ca64f741e60"/>
   <project name="platform/hardware/qcom/audio" path="hardware/qcom/audio" revision="d30227d7ae5cbe8bac8775358b472f44504a20d2"/>
   <project name="platform/hardware/qcom/camera" path="hardware/qcom/camera" revision="81afa7f775b7559da52f468150d1fe090c3fbdc5"/>
   <project name="platform/hardware/qcom/display" path="hardware/qcom/display" revision="e38444b6ce12c7c25883272a439800376d5308eb"/>
   <project name="platform/hardware/qcom/gps" path="hardware/qcom/gps" revision="13312a5577db9261cb0fcee9ccbc58cdb5e6bc55"/>
   <project name="platform/hardware/qcom/media" path="hardware/qcom/media" revision="8a0d0b0d9889ef99c4c6317c810db4c09295f15a"/>
   <project name="platform/hardware/qcom/wlan" path="hardware/qcom/wlan" revision="2208fa3537ace873b8f9ec2355055761c79dfd5f"/>
   <project name="platform/hardware/ril" path="hardware/ril" revision="c4e2ac95907a5519a0e09f01a0d8e27fec101af0"/>
   <project name="platform/system/bluetooth" path="system/bluetooth" revision="e1eb226fa3ad3874ea7b63c56a9dc7012d7ff3c2"/>
   <project name="platform/system/core" path="system/core" revision="e284280277c1312017a9450956a9676584441cdf"/>
+  <project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="83e1560bef0988bbdec49d15cb8eef402857d4ef"/>
   <project name="platform/system/qcom" path="system/qcom" revision="1cdab258b15258b7f9657da70e6f06ebd5a2fc25"/>
   <project name="platform/vendor/qcom/msm8610" path="device/qcom/msm8610" revision="b3001d5f1686f89995b7bf70963cf69c8faebd83"/>
 </manifest>
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,9 +1,9 @@
 {
     "git": {
         "git_revision": "", 
         "remote": "", 
         "branch": ""
     }, 
-    "revision": "ecde92711ca63dd62dd6008686532c0cc52c75dd", 
+    "revision": "85d9192b0062c8c55f5c277a03eb4f768887ded8", 
     "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="2a165bebfa19b11b697837409f9550dd2917c46c">
     <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="a3437e7e204e32f0f93880a43bfc0cef909cb84d"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="8873166797fecfa65c0afa644d2ebcc7d7cb4ed3"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
   <!-- 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="2a165bebfa19b11b697837409f9550dd2917c46c">
     <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="a3437e7e204e32f0f93880a43bfc0cef909cb84d"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="8873166797fecfa65c0afa644d2ebcc7d7cb4ed3"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <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/inari/sources.xml
+++ b/b2g/config/inari/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="ics_chocolate_rb4.2" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="2a165bebfa19b11b697837409f9550dd2917c46c">
     <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="a3437e7e204e32f0f93880a43bfc0cef909cb84d"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="8873166797fecfa65c0afa644d2ebcc7d7cb4ed3"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
   <project name="platform/bionic" path="bionic" revision="cd5dfce80bc3f0139a56b58aca633202ccaee7f8"/>
--- a/b2g/config/leo/sources.xml
+++ b/b2g/config/leo/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="2a165bebfa19b11b697837409f9550dd2917c46c">
     <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="a3437e7e204e32f0f93880a43bfc0cef909cb84d"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="8873166797fecfa65c0afa644d2ebcc7d7cb4ed3"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
   <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/config/mako/sources.xml
+++ b/b2g/config/mako/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="e6383e6e785cc3ea237e902beb1092f9aa88e29d">
     <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="a3437e7e204e32f0f93880a43bfc0cef909cb84d"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="8873166797fecfa65c0afa644d2ebcc7d7cb4ed3"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
   <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="2a165bebfa19b11b697837409f9550dd2917c46c">
     <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="a3437e7e204e32f0f93880a43bfc0cef909cb84d"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="8873166797fecfa65c0afa644d2ebcc7d7cb4ed3"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
   <project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
new file mode 100644
--- /dev/null
+++ b/b2g/dev/app.mozbuild
@@ -0,0 +1,25 @@
+# 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 not CONFIG['LIBXUL_SDK']:
+    app_libxul_dirs = []
+    app_libxul_static_dirs = []
+    include('/toolkit/toolkit.mozbuild')
+
+if CONFIG['MOZ_EXTENSIONS']:
+    add_tier_dir('app', 'extensions')
+
+add_tier_dir('app', [CONFIG['MOZ_BRANDING_DIRECTORY']])
+
+if CONFIG['MOZ_WEBAPP_RUNTIME']:
+    add_tier_dir('app', 'webapprt')
+
+add_tier_dir('app', 'b2g/chrome')
+add_tier_dir('app', 'b2g/components')
+
+# Never add tier dirs after browser because they apparently won't get
+# packaged properly on Mac.
+add_tier_dir('app', 'browser')
+
new file mode 100644
--- /dev/null
+++ b/b2g/dev/build.mk
@@ -0,0 +1,6 @@
+# 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 $(topsrcdir)/browser/build.mk
+
new file mode 100644
--- /dev/null
+++ b/b2g/dev/confvars.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+# 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/.
+
+MOZ_B2G=1
+MOZ_MULET=1
+
+. ${srcdir}/browser/confvars.sh
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -2,16 +2,19 @@
 # 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/.
 
 dist_dest   = $(DIST)/$(MOZ_MACBUNDLE_NAME)
 
 PREF_JS_EXPORTS = $(srcdir)/profile/firefox.js \
 		  $(NULL)
 
+ifdef MOZ_MULET
+PREF_JS_EXPORTS += $(topsrcdir)/b2g/app/b2g.js
+endif
 
 # hardcode en-US for the moment
 AB_CD = en-US
 
 DEFINES += \
   -DAB_CD=$(AB_CD) \
   -DFIREFOX_ICO='"$(DIST)/branding/firefox.ico"' \
   -DDOCUMENT_ICO='"$(DIST)/branding/document.ico"' \
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/general/aboutHome_content_script.js
@@ -0,0 +1,6 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+addMessageListener("AboutHome:SearchTriggered", function (msg) {
+  sendAsyncMessage("AboutHomeTest:CheckRecordedSearch", msg.data);
+});
--- a/browser/base/content/test/general/browser.ini
+++ b/browser/base/content/test/general/browser.ini
@@ -1,16 +1,17 @@
 [DEFAULT]
 support-files =
   POSTSearchEngine.xml
   accounts_testRemoteCommands.html
   alltabslistener.html
   app_bug575561.html
   app_subframe_bug575561.html
   authenticate.sjs
+  aboutHome_content_script.js
   browser_bug479408_sample.html
   browser_bug678392-1.html
   browser_bug678392-2.html
   browser_bug970746.xhtml
   browser_registerProtocolHandler_notification.html
   browser_star_hsts.sjs
   browser_tab_dragdrop2_frame1.xul
   bug564387.html
--- a/browser/base/content/test/general/browser_aboutHome.js
+++ b/browser/base/content/test/general/browser_aboutHome.js
@@ -4,16 +4,17 @@
 
 XPCOMUtils.defineLazyModuleGetter(this, "Promise",
   "resource://gre/modules/Promise.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Task",
   "resource://gre/modules/Task.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "AboutHomeUtils",
   "resource:///modules/AboutHome.jsm");
 
+const TEST_CONTENT_HELPER = "chrome://mochitests/content/browser/browser/base/content/test/general/aboutHome_content_script.js";
 let gRightsVersion = Services.prefs.getIntPref("browser.rights.version");
 
 registerCleanupFunction(function() {
   // Ensure we don't pollute prefs for next tests.
   Services.prefs.clearUserPref("network.cookies.cookieBehavior");
   Services.prefs.clearUserPref("network.cookie.lifetimePolicy");
   Services.prefs.clearUserPref("browser.rights.override");
   Services.prefs.clearUserPref("browser.rights." + gRightsVersion + ".shown");
@@ -105,31 +106,29 @@ let gTests = [
       // Health Report disabled, or no SearchesProvider.
       return Promise.resolve();
     }
 
     let numSearchesBefore = 0;
     let searchEventDeferred = Promise.defer();
     let doc = gBrowser.contentDocument;
     let engineName = doc.documentElement.getAttribute("searchEngineName");
+    let mm = gBrowser.selectedTab.linkedBrowser.messageManager;
 
-    doc.addEventListener("AboutHomeSearchEvent", function onSearch(e) {
-      let data = JSON.parse(e.detail);
+    mm.loadFrameScript(TEST_CONTENT_HELPER, false);
+
+    mm.addMessageListener("AboutHomeTest:CheckRecordedSearch", function (msg) {
+      let data = JSON.parse(msg.data);
       is(data.engineName, engineName, "Detail is search engine name");
 
-      // We use executeSoon() to ensure that this code runs after the
-      // count has been updated in browser.js, since it uses the same
-      // event.
-      executeSoon(function () {
-        getNumberOfSearches(engineName).then(num => {
-          is(num, numSearchesBefore + 1, "One more search recorded.");
-          searchEventDeferred.resolve();
-        });
+      getNumberOfSearches(engineName).then(num => {
+        is(num, numSearchesBefore + 1, "One more search recorded.");
+        searchEventDeferred.resolve();
       });
-    }, true, true);
+    });
 
     // Get the current number of recorded searches.
     let searchStr = "a search";
     getNumberOfSearches(engineName).then(num => {
       numSearchesBefore = num;
 
       info("Perform a search.");
       doc.getElementById("searchText").value = searchStr;
--- a/browser/components/BrowserComponents.manifest
+++ b/browser/components/BrowserComponents.manifest
@@ -37,9 +37,11 @@ category command-line-validator b-browse
 #
 # In theory we should do this for all these instructions, but in practice it is
 # sufficient to do it for the app-startup one, and the file is simpler that way.
 
 component {eab9012e-5f74-4cbc-b2b5-a590235513cc} nsBrowserGlue.js
 contract @mozilla.org/browser/browserglue;1 {eab9012e-5f74-4cbc-b2b5-a590235513cc}
 category app-startup nsBrowserGlue service,@mozilla.org/browser/browserglue;1 application={3c2e2abc-06d4-11e1-ac3b-374f68613e61} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} application={aa3c5121-dab2-40e2-81ca-7ea25febc110} application={a23983c0-fd0e-11dc-95ff-0800200c9a66}
 component {d8903bf6-68d5-4e97-bcd1-e4d3012f721a} nsBrowserGlue.js
+#ifndef MOZ_MULET
 contract @mozilla.org/content-permission/prompt;1 {d8903bf6-68d5-4e97-bcd1-e4d3012f721a}
+#endif
--- a/browser/components/sessionstore/src/SessionStore.jsm
+++ b/browser/components/sessionstore/src/SessionStore.jsm
@@ -2396,105 +2396,27 @@ let SessionStoreInternal = {
     tabstrip.smoothScroll = smoothScroll;
 
     TelemetryStopwatch.finish("FX_SESSION_RESTORE_RESTORE_WINDOW_MS");
 
     this._sendRestoreCompletedNotifications();
   },
 
   /**
-   * Sets the tabs restoring order with the following priority:
-   * Selected tab, pinned tabs, optimized visible tabs, other visible tabs and
-   * hidden tabs.
-   * @param aTabBrowser
-   *        Tab browser object
-   * @param aTabs
-   *        Array of tab references
-   * @param aTabData
-   *        Array of tab data
-   * @param aSelectedTab
-   *        Index of selected tab (1 is first tab, 0 no selected tab)
-   */
-  _setTabsRestoringOrder : function ssi__setTabsRestoringOrder(
-    aTabBrowser, aTabs, aTabData, aSelectedTab) {
-
-    // Store the selected tab. Need to substract one to get the index in aTabs.
-    let selectedTab;
-    if (aSelectedTab > 0 && aTabs[aSelectedTab - 1]) {
-      selectedTab = aTabs[aSelectedTab - 1];
-    }
-
-    // Store the pinned tabs and hidden tabs.
-    let pinnedTabs = [];
-    let pinnedTabsData = [];
-    let hiddenTabs = [];
-    let hiddenTabsData = [];
-    if (aTabs.length > 1) {
-      for (let t = aTabs.length - 1; t >= 0; t--) {
-        if (aTabData[t].pinned) {
-          pinnedTabs.unshift(aTabs.splice(t, 1)[0]);
-          pinnedTabsData.unshift(aTabData.splice(t, 1)[0]);
-        } else if (aTabData[t].hidden) {
-          hiddenTabs.unshift(aTabs.splice(t, 1)[0]);
-          hiddenTabsData.unshift(aTabData.splice(t, 1)[0]);
-        }
-      }
-    }
-
-    // Optimize the visible tabs only if there is a selected tab.
-    if (selectedTab) {
-      let selectedTabIndex = aTabs.indexOf(selectedTab);
-      if (selectedTabIndex > 0) {
-        let scrollSize = aTabBrowser.tabContainer.mTabstrip.scrollClientSize;
-        let tabWidth = aTabs[0].getBoundingClientRect().width;
-        let maxVisibleTabs = Math.ceil(scrollSize / tabWidth);
-        if (maxVisibleTabs < aTabs.length) {
-          let firstVisibleTab = 0;
-          let nonVisibleTabsCount = aTabs.length - maxVisibleTabs;
-          if (nonVisibleTabsCount >= selectedTabIndex) {
-            // Selected tab is leftmost since we scroll to it when possible.
-            firstVisibleTab = selectedTabIndex;
-          } else {
-            // Selected tab is rightmost or no more room to scroll right.
-            firstVisibleTab = nonVisibleTabsCount;
-          }
-          aTabs = aTabs.splice(firstVisibleTab, maxVisibleTabs).concat(aTabs);
-          aTabData =
-            aTabData.splice(firstVisibleTab, maxVisibleTabs).concat(aTabData);
-        }
-      }
-    }
-
-    // Merge the stored tabs in order.
-    aTabs = pinnedTabs.concat(aTabs, hiddenTabs);
-    aTabData = pinnedTabsData.concat(aTabData, hiddenTabsData);
-
-    // Load the selected tab to the first position and select it.
-    if (selectedTab) {
-      let selectedTabIndex = aTabs.indexOf(selectedTab);
-      if (selectedTabIndex > 0) {
-        aTabs = aTabs.splice(selectedTabIndex, 1).concat(aTabs);
-        aTabData = aTabData.splice(selectedTabIndex, 1).concat(aTabData);
-      }
-      aTabBrowser.selectedTab = selectedTab;
-    }
-
-    return [aTabs, aTabData];
-  },
-
-  /**
    * Manage history restoration for a window
    * @param aWindow
    *        Window to restore the tabs into
    * @param aTabs
    *        Array of tab references
    * @param aTabData
    *        Array of tab data
    * @param aSelectTab
-   *        Index of selected tab
+   *        Index of the tab to select. This is a 1-based index where "1"
+   *        indicates the first tab should be selected, and "0" indicates that
+   *        the currently selected tab will not be changed.
    * @param aRestoreImmediately
    *        Flag to indicate whether the given set of tabs aTabs should be
    *        restored/loaded immediately even if restore_on_demand = true
    */
   restoreTabs: function (aWindow, aTabs, aTabData, aSelectTab,
                          aRestoreImmediately = false)
   {
 
@@ -2520,19 +2442,20 @@ let SessionStoreInternal = {
 
     if (aTabs.length == 0) {
       // This is normally done later, but as we're returning early
       // here we need to take care of it.
       this._setWindowStateReady(aWindow);
       return;
     }
 
-    // Sets the tabs restoring order.
-    [aTabs, aTabData] =
-      this._setTabsRestoringOrder(tabbrowser, aTabs, aTabData, aSelectTab);
+    // If provided, set the selected tab.
+    if (aSelectTab > 0 && aSelectTab <= aTabs.length) {
+      tabbrowser.selectedTab = aTabs[aSelectTab - 1];
+    }
 
     // Prepare the tabs so that they can be properly restored. We'll pin/unpin
     // and show/hide tabs as necessary. We'll also set the labels, user typed
     // value, and attach a copy of the tab's data in case we close it before
     // it's been restored.
     for (let t = 0; t < aTabs.length; t++) {
       let tab = aTabs[t];
       let browser = tabbrowser.getBrowserForTab(tab);
--- a/browser/components/sessionstore/test/browser.ini
+++ b/browser/components/sessionstore/test/browser.ini
@@ -106,17 +106,16 @@ skip-if = true
 [browser_463205.js]
 [browser_463206.js]
 [browser_464199.js]
 [browser_465215.js]
 [browser_465223.js]
 [browser_466937.js]
 [browser_467409-backslashplosion.js]
 [browser_477657.js]
-[browser_480148.js]
 [browser_480893.js]
 [browser_485482.js]
 [browser_485563.js]
 [browser_490040.js]
 [browser_491168.js]
 # Disabled for too many intermittent failures.
 # Can be re-enabled once bug 930202 lands.
 skip-if = true
deleted file mode 100644
--- a/browser/components/sessionstore/test/browser_480148.js
+++ /dev/null
@@ -1,216 +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/. */
-
-function test() {
-  /** Test for Bug 484108 **/
-  waitForExplicitFinish();
-  requestLongerTimeout(5);
-
-  // builds the tests state based on a few parameters
-  function buildTestState(num, selected, hidden, pinned) {
-    let state = { windows: [ { "tabs": [], "selected": selected + 1 } ] };
-    while (num--) {
-      state.windows[0].tabs.push({
-        entries: [
-          { url: "http://example.com/?t=" + state.windows[0].tabs.length }
-        ]
-      });
-      let i = state.windows[0].tabs.length - 1;
-      if (hidden.length > 0 && i == hidden[0]) {
-        state.windows[0].tabs[i].hidden = true;
-        hidden.splice(0, 1);
-      }
-      if (pinned.length > 0 && i == pinned[0]) {
-        state.windows[0].tabs[i].pinned = true;
-        pinned.splice(0, 1);
-      }
-    }
-    return state;
-  }
-
-  let tests = [
-    { testNum: 1,
-      totalTabs: 13,
-      selectedTab: 0,
-      shownTabs: 6,
-      hiddenTabs: [],
-      pinnedTabs: [],
-      order: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
-    },
-    { testNum: 2,
-      totalTabs: 13,
-      selectedTab: 12,
-      shownTabs: 6,
-      hiddenTabs: [],
-      pinnedTabs: [],
-      order: [12, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, 6]
-    },
-    { testNum: 3,
-      totalTabs: 13,
-      selectedTab: 3,
-      shownTabs: 6,
-      hiddenTabs: [],
-      pinnedTabs: [],
-      order: [3, 4, 5, 6, 7, 8, 0, 1, 2, 9, 10, 11, 12]
-    },
-    { testNum: 4,
-      totalTabs: 13,
-      selectedTab: 10,
-      shownTabs: 6,
-      hiddenTabs: [],
-      pinnedTabs: [],
-      order: [10, 7, 8, 9, 11, 12, 0, 1, 2, 3, 4, 5, 6]
-    },
-    { testNum: 5,
-      totalTabs: 13,
-      selectedTab: 12,
-      shownTabs: 6,
-      hiddenTabs: [0, 4, 9],
-      pinnedTabs: [],
-      order: [12, 6, 7, 8, 10, 11, 1, 2, 3, 5, 0, 4, 9]
-    },
-    { testNum: 6,
-      totalTabs: 13,
-      selectedTab: 3,
-      shownTabs: 6,
-      hiddenTabs: [1, 7, 12],
-      pinnedTabs: [],
-      order: [3, 4, 5, 6, 8, 9, 0, 2, 10, 11, 1, 7, 12]
-    },
-    { testNum: 7,
-      totalTabs: 13,
-      selectedTab: 3,
-      shownTabs: 6,
-      hiddenTabs: [0, 1, 2],
-      pinnedTabs: [],
-      order: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 1, 2]
-    },
-    { testNum: 8,
-      totalTabs: 13,
-      selectedTab: 0,
-      shownTabs: 6,
-      hiddenTabs: [],
-      pinnedTabs: [0],
-      order: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
-    },
-    { testNum: 9,
-      totalTabs: 13,
-      selectedTab: 1,
-      shownTabs: 6,
-      hiddenTabs: [],
-      pinnedTabs: [0],
-      order: [1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
-    },
-    { testNum: 10,
-      totalTabs: 13,
-      selectedTab: 3,
-      shownTabs: 6,
-      hiddenTabs: [2],
-      pinnedTabs: [0,1],
-      order: [3, 0, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 2]
-    },
-    { testNum: 11,
-      totalTabs: 13,
-      selectedTab: 12,
-      shownTabs: 6,
-      hiddenTabs: [],
-      pinnedTabs: [0,1,2],
-      order: [12, 0, 1, 2, 7, 8, 9, 10, 11, 3, 4, 5, 6]
-    },
-    { testNum: 12,
-      totalTabs: 13,
-      selectedTab: 6,
-      shownTabs: 6,
-      hiddenTabs: [3,4,5],
-      pinnedTabs: [0,1,2],
-      order: [6, 0, 1, 2, 7, 8, 9, 10, 11, 12, 3, 4, 5]
-    },
-    { testNum: 13,
-      totalTabs: 13,
-      selectedTab: 1,
-      shownTabs: 6,
-      hiddenTabs: [3,4,5],
-      pinnedTabs: [0,1,2],
-      order: [1, 0, 2, 6, 7, 8, 9, 10, 11, 12, 3, 4, 5]
-    },
-    { testNum: 14,
-      totalTabs: 13,
-      selectedTab: 2,
-      shownTabs: 6,
-      hiddenTabs: [],
-      pinnedTabs: [0,1,2],
-      order: [2, 0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
-    },
-    { testNum: 15,
-      totalTabs: 13,
-      selectedTab: 3,
-      shownTabs: 6,
-      hiddenTabs: [1,4],
-      pinnedTabs: [0,1,2],
-      order: [3, 0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 4]
-    }
-  ];
-
-  let tabMinWidth =
-    parseInt(getComputedStyle(gBrowser.selectedTab, null).minWidth);
-  let testIndex = 0;
-
-  function runNextTest() {
-    if (tests.length == 0) {
-      finish();
-      return;
-    }
-
-    let wu = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
-                   .getInterface(Components.interfaces.nsIDOMWindowUtils);
-    wu.garbageCollect();
-
-    setTimeout(function() {
-      info ("Starting test " + (++testIndex));
-      let test = tests.shift();
-      let state = buildTestState(test.totalTabs, test.selectedTab,
-                                 test.hiddenTabs, test.pinnedTabs);
-      let tabbarWidth = Math.floor((test.shownTabs - 0.5) * tabMinWidth);
-      let win = openDialog(location, "_blank", "chrome,all,dialog=no");
-      let tabsRestored = [];
-
-      win.addEventListener("SSTabRestoring", function onSSTabRestoring(aEvent) {
-        let tab = aEvent.originalTarget;
-        let tabLink = tab.linkedBrowser.currentURI.spec;
-        let tabIndex =
-          tabLink.substring(tabLink.indexOf("?t=") + 3, tabLink.length);
-
-        // we need to compare with the tab's restoring index, no with the
-        // position index, since the pinned tabs change the positions in the
-        // tabbar. 
-        tabsRestored.push(tabIndex);
-
-        if (tabsRestored.length < state.windows[0].tabs.length)
-          return;
-
-        // all of the tabs should be restoring or restored by now
-        is(tabsRestored.length, state.windows[0].tabs.length,
-           "Test #" + testIndex + ": Number of restored tabs is as expected");
-
-        is(tabsRestored.join(" "), test.order.join(" "),
-           "Test #" + testIndex + ": 'visible' tabs restored first");
-
-        // cleanup
-        win.removeEventListener("SSTabRestoring", onSSTabRestoring, false);
-        win.close();
-        executeSoon(runNextTest);
-      }, false);
-
-      whenWindowLoaded(win, function(aEvent) {
-        let extent =
-          win.outerWidth - win.gBrowser.tabContainer.mTabstrip.scrollClientSize;
-        let windowWidth = tabbarWidth + extent;
-        win.resizeTo(windowWidth, win.outerHeight);
-        ss.setWindowState(win, JSON.stringify(state), true);
-      });
-    }, 1000);
-  };
-
-  runNextTest();
-}
--- a/browser/components/tabview/test/browser_tabview_bug595601.js
+++ b/browser/components/tabview/test/browser_tabview_bug595601.js
@@ -42,52 +42,32 @@ function test() {
   });
 
   TabView._initFrame(function () {
     executeSoon(testRestoreWithHiddenTabs);
   });
 }
 
 function testRestoreWithHiddenTabs() {
-  let checked = false;
-  let ssReady = false;
-  let tabsRestored = false;
+  TabsProgressListener.setCallback(function (needsRestore, isRestoring) {
+    if (needsRestore <= 4) {
+      TabsProgressListener.unsetCallback();
+      is(needsRestore, 4, "4/8 tabs restored");
+    }
+  });
 
-  let check = function () {
-    if (checked || !ssReady || !tabsRestored)
-      return;
-
-    checked = true;
-
+  waitForBrowserState(state, 4, function () {
     is(gBrowser.tabs.length, 8, "there are now eight tabs");
     is(gBrowser.visibleTabs.length, 4, "four visible tabs");
 
     let cw = TabView.getContentWindow();
     is(cw.GroupItems.groupItems.length, 2, "there are now two groupItems");
 
     testSwitchToInactiveGroup();
-  }
-
-  whenSessionStoreReady(function () {
-    ssReady = true;
-    check();
   });
-
-  TabsProgressListener.setCallback(function (needsRestore, isRestoring) {
-    if (4 < needsRestore)
-      return;
-
-    TabsProgressListener.unsetCallback();
-    is(needsRestore, 4, "4/8 tabs restored");
-
-    tabsRestored = true;
-    check();
-  });
-
-  ss.setBrowserState(JSON.stringify(state));
 }
 
 function testSwitchToInactiveGroup() {
   let firstProgress = true;
 
   TabsProgressListener.setCallback(function (needsRestore, isRestoring) {
     if (firstProgress) {
       firstProgress = false;
@@ -103,21 +83,26 @@ function testSwitchToInactiveGroup() {
 
     is(gBrowser.visibleTabs.length, 4, "four visible tabs");
     waitForFocus(finish);
   });
 
   gBrowser.selectedTab = gBrowser.tabs[4];
 }
 
-function whenSessionStoreReady(callback) {
-  window.addEventListener("SSWindowStateReady", function onReady() {
-    window.removeEventListener("SSWindowStateReady", onReady, false);
-    executeSoon(callback);
-  }, false);
+function waitForBrowserState(state, numTabs, callback) {
+  let tabContainer = gBrowser.tabContainer;
+  tabContainer.addEventListener("SSTabRestored", function onRestored() {
+    if (--numTabs <= 0) {
+      tabContainer.removeEventListener("SSTabRestored", onRestored, true);
+      executeSoon(callback);
+    }
+  }, true);
+
+  ss.setBrowserState(JSON.stringify(state));
 }
 
 function countTabs() {
   let needsRestore = 0, isRestoring = 0;
   let windowsEnum = Services.wm.getEnumerator("navigator:browser");
 
   while (windowsEnum.hasMoreElements()) {
     let window = windowsEnum.getNext();
--- a/browser/modules/AboutHome.jsm
+++ b/browser/modules/AboutHome.jsm
@@ -12,16 +12,18 @@ this.EXPORTED_SYMBOLS = [ "AboutHomeUtil
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
   "resource://gre/modules/PrivateBrowsingUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts",
   "resource://gre/modules/FxAccounts.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "Promise",
+  "resource://gre/modules/Promise.jsm");
 
 // Url to fetch snippets, in the urlFormatter service format.
 const SNIPPETS_URL_PREF = "browser.aboutHomeSnippets.updateUrl";
 
 // Should be bumped up if the snippets content format changes.
 const STARTPAGE_VERSION = 4;
 
 this.AboutHomeUtils = {
@@ -176,41 +178,66 @@ let AboutHome = {
       case "AboutHome:Search":
         let data;
         try {
           data = JSON.parse(aMessage.data.searchData);
         } catch(ex) {
           Cu.reportError(ex);
           break;
         }
-        let engine = Services.search.currentEngine;
+
+        Services.search.init(function(status) {
+          if (!Components.isSuccessCode(status)) {
+            return;
+          }
+
+          let engine = Services.search.currentEngine;
 #ifdef MOZ_SERVICES_HEALTHREPORT
-        window.BrowserSearch.recordSearchInHealthReport(engine, "abouthome");
+          window.BrowserSearch.recordSearchInHealthReport(engine, "abouthome");
 #endif
-        // Trigger a search through nsISearchEngine.getSubmission()
-        let submission = engine.getSubmission(data.searchTerms, null, "homepage");
-        window.loadURI(submission.uri.spec, null, submission.postData);
+          // Trigger a search through nsISearchEngine.getSubmission()
+          let submission = engine.getSubmission(data.searchTerms, null, "homepage");
+          window.loadURI(submission.uri.spec, null, submission.postData);
+
+          // Used for testing
+          let mm = aMessage.target.messageManager;
+          mm.sendAsyncMessage("AboutHome:SearchTriggered", aMessage.data.searchData);
+        });
+
         break;
     }
   },
 
   // Send all the chrome-privileged data needed by about:home. This
   // gets re-sent when the search engine changes.
   sendAboutHomeData: function(target) {
     let wrapper = {};
     Components.utils.import("resource:///modules/sessionstore/SessionStore.jsm",
       wrapper);
     let ss = wrapper.SessionStore;
+
     ss.promiseInitialized.then(function() {
+      let deferred = Promise.defer();
+
+      Services.search.init(function (status){
+        if (!Components.isSuccessCode(status)) {
+          deferred.reject(status);
+        } else {
+          deferred.resolve(Services.search.defaultEngine.name);
+        }
+      });
+
+      return deferred.promise;
+    }).then(function(engineName) {
       let data = {
         showRestoreLastSession: ss.canRestoreLastSession,
         snippetsURL: AboutHomeUtils.snippetsURL,
         showKnowYourRights: AboutHomeUtils.showKnowYourRights,
         snippetsVersion: AboutHomeUtils.snippetsVersion,
-        defaultEngineName: Services.search.defaultEngine.name
+        defaultEngineName: engineName
       };
 
       if (AboutHomeUtils.showKnowYourRights) {
         // Set pref to indicate we've shown the notification.
         let currentVersion = Services.prefs.getIntPref("browser.rights.version");
         Services.prefs.setBoolPref("browser.rights." + currentVersion + ".shown", true);
       }
 
--- a/configure.in
+++ b/configure.in
@@ -4197,22 +4197,27 @@ browser)
   ;;
 
 xulrunner)
   AC_DEFINE(MOZ_XULRUNNER)
   ;;
 b2g)
   AC_DEFINE(MOZ_B2G)
   ;;
+b2g/dev)
+  AC_DEFINE(MOZ_B2G)
+  AC_DEFINE(MOZ_MULET)
+  ;;
 esac
 
 AC_SUBST(MOZ_BUILD_APP)
 AC_SUBST(MOZ_PHOENIX)
 AC_SUBST(MOZ_XULRUNNER)
 AC_SUBST(MOZ_B2G)
+AC_SUBST(MOZ_MULET)
 AC_SUBST(MOZ_B2G_VERSION)
 
 AC_DEFINE_UNQUOTED(MOZ_BUILD_APP,$MOZ_BUILD_APP)
 
 dnl ========================================================
 dnl Check android sdk version depending on mobile target
 dnl ========================================================
 
--- a/dom/bluetooth/ipc/BluetoothChild.cpp
+++ b/dom/bluetooth/ipc/BluetoothChild.cpp
@@ -70,26 +70,30 @@ BluetoothChild::ActorDestroy(ActorDestro
 #endif
 }
 
 bool
 BluetoothChild::RecvNotify(const BluetoothSignal& aSignal)
 {
   MOZ_ASSERT(sBluetoothService);
 
-  sBluetoothService->DistributeSignal(aSignal);
+  if (sBluetoothService) {
+    sBluetoothService->DistributeSignal(aSignal);
+  }
   return true;
 }
 
 bool
 BluetoothChild::RecvEnabled(const bool& aEnabled)
 {
   MOZ_ASSERT(sBluetoothService);
 
-  sBluetoothService->SetEnabled(aEnabled);
+  if (sBluetoothService) {
+    sBluetoothService->SetEnabled(aEnabled);
+  }
   return true;
 }
 
 bool
 BluetoothChild::RecvBeginShutdown()
 {
   if (mShutdownState != Running && mShutdownState != SentStopNotifying) {
     MOZ_ASSERT(false, "Bad state!");
--- a/dom/mobileconnection/tests/marionette/manifest.ini
+++ b/dom/mobileconnection/tests/marionette/manifest.ini
@@ -1,29 +1,32 @@
 [DEFAULT]
 b2g = true
 browser = false
 qemu = true
 
 [test_mobile_networks.js]
 [test_mobile_voice_state.js]
+disabled = Bug 999458
 [test_mobile_voice_location.js]
 [test_mobile_operator_names.js]
 [test_mobile_operator_names_plmnlist.js]
+disabled = Bug 999458
 [test_mobile_operator_names_roaming.js]
 [test_mobile_preferred_network_type.js]
 [test_mobile_data_connection.js]
 [test_mobile_data_location.js]
 [test_mobile_data_state.js]
+disabled = Bug 999458
 [test_mobile_mmi.js]
 [test_mobile_mmi_change_pin.js]
 [test_mobile_roaming_preference.js]
 [test_call_barring_get_option.js]
 [test_call_barring_set_error.js]
 [test_call_barring_change_password.js]
 [test_mobile_set_radio.js]
 [test_mobile_last_known_network.js]
 [test_mobile_icc_change.js]
 [test_mobile_connections_array_uninitialized.js]
 [test_mobile_signal_strength.js]
 [test_mobile_data_ipv6.js]
 disabled = Bug 979137
-[test_dsds_mobile_data_connection.js]
\ No newline at end of file
+[test_dsds_mobile_data_connection.js]
--- a/layout/tools/reftest/mach_commands.py
+++ b/layout/tools/reftest/mach_commands.py
@@ -331,20 +331,16 @@ def B2GCommand(func):
     sdcard = CommandArgument('--sdcard', default="10MB",
         help='Define size of sdcard: 1MB, 50MB...etc')
     func = sdcard(func)
 
     emulator_res = CommandArgument('--emulator-res', default='800x1000',
         help='Emulator resolution of the format \'<width>x<height>\'')
     func = emulator_res(func)
 
-    emulator = CommandArgument('--emulator', default='arm',
-        help='Architecture of emulator to use: x86 or arm')
-    func = emulator(func)
-
     marionette = CommandArgument('--marionette', default=None,
         help='host:port to use when connecting to Marionette')
     func = marionette(func)
 
     totalChunks = CommandArgument('--total-chunks', dest='totalChunks',
         help = 'How many chunks to split the tests up into.')
     func = totalChunks(func)
 
@@ -391,17 +387,17 @@ class MachCommands(MachCommandBase):
         reftest = self._spawn(ReftestRunner)
         return reftest.run_desktop_test(test_file, suite=suite, **kwargs)
 
 
 # TODO For now b2g commands will only work with the emulator,
 # they should be modified to work with all devices.
 def is_emulator(cls):
     """Emulator needs to be configured."""
-    return cls.device_name.find('emulator') == 0
+    return cls.device_name.startswith('emulator')
 
 
 @CommandProvider
 class B2GCommands(MachCommandBase):
     def __init__(self, context):
         MachCommandBase.__init__(self, context)
 
         for attr in ('b2g_home', 'xre_path', 'device_name'):
@@ -424,11 +420,18 @@ class B2GCommands(MachCommandBase):
     @Command('crashtest-remote', category='testing',
         description='Run a remote crashtest.',
         conditions=[conditions.is_b2g, is_emulator])
     @B2GCommand
     def run_crashtest_remote(self, test_file, **kwargs):
         return self._run_reftest(test_file, suite='crashtest', **kwargs)
 
     def _run_reftest(self, test_file=None, suite=None, **kwargs):
+        if self.device_name:
+            if self.device_name.startswith('emulator'):
+                emulator = 'arm'
+                if 'x86' in self.device_name:
+                    emulator = 'x86'
+                kwargs['emulator'] = emulator
+
         reftest = self._spawn(ReftestRunner)
         return reftest.run_b2g_test(self.b2g_home, self.xre_path,
             test_file, suite=suite, **kwargs)
index 70caf842d33e52296d730f9016c4c50bf89b0838..efb5ab8e7474a84d0cbf37fa22702768b2d0ffa6
GIT binary patch
literal 550
zc%17D@N?(olHy`uVBq!ia0vp^Y9P$P3?%12mYf5mSkfJR9T^xl_H+M9WCijSl0AZa
z85pX73L9D&7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+10!Y05c#1%-#CuhVZrANdh
zre_x>q+|lQ#GwEG|Eo4Wj05TyDhcunW&i^@G0lw&75**xE5CHjHs8k;Kq1B?Z+91A
zp4~CifSfy?E{-7<r;kp#%hasE(b_)sS$x|2{~I<hb6M8Ay4U(8M?A-#xc^2LZ)V3c
zcwC*P$*J(cBs=-N6+`xyp1KLQEc4G-tG0hVm)U8QdS}~@f?jrkKbtHUKj4`sbGquH
z>eX3u{<So&xgC3<bmD5o&z=6qv>X{7_r3Dq_WZ#S9=lX1;s2DKPP?C+xc=mnnSwwO
z?_4&ENk?xy-1SNIb%9{)oz#zkN2hF@)b&f;#oP2Ax6w9Zqf@7=be>)QEY(?%8rj@`
z^U0lwiF^r?&%MI>jq@#i&aX~W`Z!zGwnXe!{~O+{2_oIc>}F2_`ct*UHKHUXu_V<h
zxhNG#F&G&bn&=vs=o*@b7#dp{8(W#0=^B_@85p!XIz^*s$jwj5OsmAL;hW5_=b)hW
MboFyt=akR{0E6?)RR910
deleted file mode 100644
index b0420db296ec485587e749815603c8b340d8856a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
index 608a80f47210fc07d464d5b672dbb2ebcf4cf2d3..eda09a3f6b27fb6772bab05f1541b4a2f79d3b34
GIT binary patch
literal 473
zc%17D@N?(olHy`uVBq!ia0vp^QXtI13?%1G+4BcTv7|ftIx;Y9?C1WI$O_~uBzpw;
zGB8xBF)%c=FfjZA3N^f7U???UV0e|lz+g3lfkC`r&aOZkpoC?BPlzj!j!({rj!#a>
z$OSTpMF0Q)zn~Z62h=QB666;Qq#1aG+LkE)S*^5Aan0{-9*fql0g5pudAqv^Rqx3G
zDVXf(;uxZFerwQMzQYO}I%~u1*4+ADe{<u`&|5x})uiiNWMtSaeCrJ=ZeHg&@KZVH
z_-?kHrVpeqvmbuNcY;0Xr^6wU8fBMdJFcoltGHd}RtXX@=o4Ie(sQ!m)lX{m*S<`N
zY$?7p>!*=)k)G;oySCs{`@|co1KI`789itzIl}KIr<=9mUe%PRFZHJ{=JC7vpTT}B
zyZ;Qf(^)#296;x(mbgZgq$HN4S|t~y0x1R~149#C0~1|C^AJO0D`R6TQ!`xyb1MUb
hc1NdZ6b-rgDVb@NxHWu}`SlzW0-mmZF6*2UngIQ-pEdvh
deleted file mode 100644
index 8afde62835da63101a1b7bb7bcb7181ea101f201..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
index 4b6f1f34fd46470288a7a999b0479f55ce51871c..8fd7a3d1d00f3a61c1bf29396fc19be4759ab8e8
GIT binary patch
literal 679
zc%17D@N?(olHy`uVBq!ia0vp^#vshW3=*k7AOWOU(j9#r85lP9bN@+X1@aY=J%W50
z7^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+10A~wJ$#1%-#C8ftFXZQz&
z`38hk)V3s~WY#uyDk-amMa9J?riO&a0A<NQ|NsA=`|#&yparreL4LsuNI)}2P-WY@
z2EM;vzX<TxD}FeV_937VD9)JV?d~F1#HFAOWE*<AIEHu}e>?3qQ<DNuTc%prJk7Jh
z@Bh!zbYx<BweGg+=lkCt-cfmye@Smc!~@2M`y<pN<9>v0UVg&(GJimrX*HXPe^~g^
zl_yt;=kHnMdg(*>RLNO;p3T|*=B)_ho=EH8ukTzCDW2nch0$f264Q&8C5fyNC!-Z_
zO?&=T^Z2xvryp^#uS%PJ(&GNK3u}GCD=T6nt*(FF@rti7%17(jtlQt8C1n}D)G_(C
zt>YMrwT|C1TQS?oU2C86czS$Fe$oE#__PTdG?x`heUHpht7~yReWl;Y=v(`yGiA&Y
zY71wwHQZL@RpM`Y{%3FEJ^n@f0)NZ)tv5GTwBSB-$ggI3M`c0XyM$-bNqtGrw(b*u
zH|^QG+uSq$Hs35Rnjhrf9dO*P_Qc+~RVFL%+~zmFF!4XL*FUwl%$;j2PwbpL2^hx=
zswJ)wB`Jv|saDBFsX&Us$iUD<*T6*A&^*M@*vi=0%G6BPz}(8fpxx0a8bw2HeoAIq
WC2kGhWPUvdMWUyxpUXO@geCyZ*$1Tn
deleted file mode 100644
index 91fb5f788f0617851a730e6c2fb39f5d4204a93f..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/mobile/android/base/resources/drawable/toolbar_separator.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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/. -->
-
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
-       android:shape="rectangle">
-
-    <solid android:color="#a6aeb4"/>
-    <size android:width="1dp" />
-
-</shape>
deleted file mode 100644
--- a/mobile/android/base/resources/drawable/toolbar_separator_pb.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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/. -->
-
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
-       android:shape="rectangle">
-
-    <solid android:color="#222"/>
-    <size android:width="1dp" />
-
-</shape>
deleted file mode 100644
--- a/mobile/android/base/resources/drawable/toolbar_separator_selector.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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/. -->
-
-<!-- Note that android:color="@color/toolbar_separator" (which uses a selector)
-     directly in the <shape> does not appear to work, so instead we select
-     between two shapes with different colors. -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
-          xmlns:gecko="http://schemas.android.com/apk/res-auto">
-
-    <item gecko:state_private="true" android:drawable="@drawable/toolbar_separator_pb"/>
-    <item android:drawable="@drawable/toolbar_separator"/>
-
-</selector>
--- a/mobile/android/base/resources/layout/browser_toolbar.xml
+++ b/mobile/android/base/resources/layout/browser_toolbar.xml
@@ -10,46 +10,44 @@
                  style="@style/UrlBar.ImageButton.Unused"/>
 
     <ImageButton android:id="@+id/forward"
                  style="@style/UrlBar.ImageButton.Unused"/>
 
     <!-- Note: any layout parameters setting the right edge of
          this View should be matched in the url_bar_translating_edge.
 
-         Note 2: On devices where the editing mode cancel items are
-         wider than the tabs and similar buttons (e.g. hardware menu
-         button), the url bar will shrink, in which case the LayoutParams
-         of this View are changed dynamically. -->
+         Note 2: On devices where the editing mode cancel button is
+         wider than the tabs counter and nearby buttons, the url bar will
+         shrink, in which case the LayoutParams of this View are
+         changed dynamically. -->
     <ImageView android:id="@+id/url_bar_entry"
                style="@style/UrlBar.Button"
                android:layout_marginLeft="4dp"
-               android:layout_marginRight="-19dp"
+               android:layout_marginRight="-15dp"
                android:layout_marginTop="5dp"
                android:layout_marginBottom="5dp"
                android:layout_centerVertical="true"
                android:layout_toLeftOf="@+id/tabs"
-               android:paddingRight="4dp"
                android:duplicateParentState="true"
                android:clickable="false"
                android:focusable="false"
                android:src="@drawable/url_bar_entry"
                android:scaleType="fitXY"/>
 
     <!-- A View that clips with url_bar_entry and translates
          around it to animate shrinking or growing the url bar,
          which occurs in the display/editing mode transitions. -->
     <ImageView android:id="@+id/url_bar_translating_edge"
                style="@style/UrlBar.Button"
                android:layout_alignLeft="@id/url_bar_entry"
                android:layout_toLeftOf="@+id/tabs"
                android:layout_alignTop="@id/url_bar_entry"
                android:layout_alignBottom="@id/url_bar_entry"
-               android:layout_marginRight="-19dp"
-               android:paddingRight="4dp"
+               android:layout_marginRight="-15dp"
                android:duplicateParentState="true"
                android:clickable="false"
                android:focusable="false"
                android:visibility="invisible"
                android:src="@drawable/url_bar_translating_edge"
                android:scaleType="fitXY"/>
 
     <LinearLayout android:id="@+id/menu_items"
@@ -98,37 +96,32 @@
                         android:layout_alignRight="@id/tabs"/>
 
     <!-- Note that the edit components are invisible so that the views
          depending on their location can properly layout. -->
     <ImageView android:id="@+id/edit_cancel"
                style="@style/UrlBar.ImageButton.Icon"
                android:layout_alignParentRight="true"
                android:src="@drawable/close_edit_mode"
+               android:layout_marginLeft="2dp"
+               android:layout_marginRight="2dp"
                android:contentDescription="@string/edit_mode_cancel"
                android:visibility="invisible"/>
 
-    <org.mozilla.gecko.widget.ThemedView android:id="@+id/edit_separator"
-                                         android:layout_toLeftOf="@id/edit_cancel"
-                                         android:layout_width="1dip"
-                                         android:layout_height="match_parent"
-                                         android:layout_marginTop="12dp"
-                                         android:layout_marginBottom="12dp"
-                                         android:layout_marginLeft="8dp"
-                                         android:layout_marginRight="2dp"
-                                         android:background="@drawable/toolbar_separator_selector"
-                                         android:visibility="invisible"/>
-
+    <!-- The left margin of the cancel button is larger than the right because
+         the url bar drawable contains some whitespace, so we compensate by adding
+         a negative right margin (value determined through experimentation). -->
     <org.mozilla.gecko.toolbar.ToolbarEditLayout android:id="@+id/edit_layout"
                   style="@style/UrlBar.Button"
-                  android:layout_toLeftOf="@id/edit_separator"
+                  android:layout_toLeftOf="@id/edit_cancel"
                   android:layout_marginLeft="4dp"
-                  android:layout_marginRight="4dp"
+                  android:layout_marginRight="-2dp"
                   android:paddingLeft="8dp"
-                  android:visibility="gone"/>
+                  android:paddingRight="8dp"
+                  android:visibility="invisible"/>
 
     <org.mozilla.gecko.toolbar.ToolbarDisplayLayout android:id="@+id/display_layout"
                   style="@style/UrlBar.Button"
                   android:layout_toLeftOf="@id/tabs"
                   android:layout_marginRight="-24dp"/>
 
     <ImageView android:id="@+id/shadow"
                android:layout_width="fill_parent"
--- a/mobile/android/base/resources/layout/toolbar_edit_layout.xml
+++ b/mobile/android/base/resources/layout/toolbar_edit_layout.xml
@@ -22,15 +22,9 @@
           android:textCursorDrawable="@null"
           android:inputType="textUri|textNoSuggestions"
           android:imeOptions="actionGo|flagNoExtractUi|flagNoFullscreen"
           android:selectAllOnFocus="true"
           android:singleLine="true"
           android:gravity="center_vertical|left"
           gecko:autoUpdateTheme="false"/>
 
-    <ImageButton android:id="@+id/go"
-                 style="@style/UrlBar.ImageButton.Icon"
-                 android:src="@drawable/ic_url_bar_go"
-                 android:contentDescription="@string/go"
-                 android:visibility="gone"/>
-
 </merge>
--- a/mobile/android/base/tests/components/ToolbarComponent.java
+++ b/mobile/android/base/tests/components/ToolbarComponent.java
@@ -15,16 +15,17 @@ import org.mozilla.gecko.tests.helpers.D
 import org.mozilla.gecko.tests.helpers.WaitHelper;
 
 import android.view.View;
 import android.widget.EditText;
 import android.widget.ImageButton;
 import android.widget.TextView;
 
 import com.jayway.android.robotium.solo.Condition;
+import com.jayway.android.robotium.solo.Solo;
 
 /**
  * A class representing any interactions that take place on the Toolbar.
  */
 public class ToolbarComponent extends BaseComponent {
     public ToolbarComponent(final UITestContext testContext) {
         super(testContext);
     }
@@ -64,23 +65,16 @@ public class ToolbarComponent extends Ba
     private View getUrlDisplayLayout() {
         return getToolbarView().findViewById(R.id.display_layout);
     }
 
     private TextView getUrlTitleText() {
         return (TextView) getToolbarView().findViewById(R.id.url_bar_title);
     }
 
-    /**
-     * Returns the View for the go button in the browser toolbar.
-     */
-    private ImageButton getGoButton() {
-        return (ImageButton) getToolbarView().findViewById(R.id.go);
-    }
-
     private ImageButton getBackButton() {
         DeviceHelper.assertIsTablet();
         return (ImageButton) getToolbarView().findViewById(R.id.back);
     }
 
     private ImageButton getForwardButton() {
         DeviceHelper.assertIsTablet();
         return (ImageButton) getToolbarView().findViewById(R.id.forward);
@@ -136,17 +130,17 @@ public class ToolbarComponent extends Ba
     }
 
     public ToolbarComponent commitEditingMode() {
         assertIsEditing();
 
         WaitHelper.waitForPageLoad(new Runnable() {
             @Override
             public void run() {
-                mSolo.clickOnView(getGoButton());
+                mSolo.sendKey(Solo.ENTER);
             }
         });
         waitForNotEditing();
 
         return this;
     }
 
     public ToolbarComponent dismissEditingMode() {
--- a/mobile/android/base/toolbar/BrowserToolbar.java
+++ b/mobile/android/base/toolbar/BrowserToolbar.java
@@ -29,20 +29,21 @@ import org.mozilla.gecko.toolbar.Toolbar
 import org.mozilla.gecko.toolbar.ToolbarDisplayLayout.UpdateFlags;
 import org.mozilla.gecko.util.Clipboard;
 import org.mozilla.gecko.util.GeckoEventListener;
 import org.mozilla.gecko.util.HardwareUtils;
 import org.mozilla.gecko.util.MenuUtils;
 import org.mozilla.gecko.widget.ThemedImageButton;
 import org.mozilla.gecko.widget.ThemedImageView;
 import org.mozilla.gecko.widget.ThemedRelativeLayout;
-import org.mozilla.gecko.widget.ThemedView;
 
 import android.content.Context;
 import android.content.res.Resources;
+import android.graphics.Bitmap;
+import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.StateListDrawable;
 import android.os.Build;
 import android.text.TextUtils;
 import android.util.AttributeSet;
 import android.util.Log;
 import android.view.ContextMenu;
 import android.view.KeyEvent;
@@ -132,18 +133,17 @@ public class BrowserToolbar extends Them
     private ToolbarProgressView progressBar;
     private TabCounter tabsCounter;
     private ThemedImageButton menuButton;
     private ThemedImageView menuIcon;
     private LinearLayout actionItemBar;
     private MenuPopup menuPopup;
     private List<View> focusOrder;
 
-    private final ThemedView editSeparator;
-    private final View editCancel;
+    private final ImageView editCancel;
 
     private boolean shouldShrinkURLBar = false;
 
     private OnActivateListener activateListener;
     private OnFocusChangeListener focusChangeListener;
     private OnStartEditingListener startEditingListener;
     private OnStopEditingListener stopEditingListener;
 
@@ -215,18 +215,17 @@ public class BrowserToolbar extends Them
         forwardButton = (ImageButton) findViewById(R.id.forward);
         setButtonEnabled(forwardButton, false);
 
         menuButton = (ThemedImageButton) findViewById(R.id.menu);
         menuIcon = (ThemedImageView) findViewById(R.id.menu_icon);
         actionItemBar = (LinearLayout) findViewById(R.id.menu_items);
         hasSoftMenuButton = !HardwareUtils.hasMenuButton();
 
-        editSeparator = (ThemedView) findViewById(R.id.edit_separator);
-        editCancel = findViewById(R.id.edit_cancel);
+        editCancel = (ImageView) findViewById(R.id.edit_cancel);
 
         // We use different layouts on phones and tablets, so adjust the focus
         // order appropriately.
         focusOrder = new ArrayList<View>();
         if (HardwareUtils.isTablet()) {
             focusOrder.addAll(Arrays.asList(tabsButton, backButton, forwardButton, this));
             focusOrder.addAll(urlDisplayLayout.getFocusOrder());
             focusOrder.addAll(Arrays.asList(actionItemBar, menuButton));
@@ -323,16 +322,17 @@ public class BrowserToolbar extends Them
                 // always be sync.
                 setContentDescription(contentDescription);
             }
         });
 
         urlEditLayout.setOnFocusChangeListener(new View.OnFocusChangeListener() {
             @Override
             public void onFocusChange(View v, boolean hasFocus) {
+                // This will select the url bar when entering editing mode.
                 setSelected(hasFocus);
                 if (focusChangeListener != null) {
                     focusChangeListener.onFocusChange(v, hasFocus);
                 }
             }
         });
 
         tabsButton.setOnClickListener(new Button.OnClickListener() {
@@ -595,25 +595,24 @@ public class BrowserToolbar extends Them
         tabsButton.setNextFocusDownId(nextId);
         backButton.setNextFocusDownId(nextId);
         forwardButton.setNextFocusDownId(nextId);
         urlDisplayLayout.setNextFocusDownId(nextId);
         menuButton.setNextFocusDownId(nextId);
     }
 
     private int getUrlBarEntryTranslation() {
-        if (editSeparator == null) {
+        if (editCancel == null) {
             // We are on tablet, and there is no animation so return a translation of 0.
             return 0;
         }
 
-        // We would ideally use the right-most point of the edit layout instead of the
-        // edit separator and its margin, but it is not inflated when this code initially runs.
-        final LayoutParams lp = (LayoutParams) editSeparator.getLayoutParams();
-        return editSeparator.getLeft() - lp.leftMargin - urlBarEntry.getRight();
+        // Subtract the right margin because it's negative.
+        final LayoutParams lp = (LayoutParams) urlEditLayout.getLayoutParams();
+        return urlEditLayout.getRight() - lp.rightMargin - urlBarEntry.getRight();
     }
 
     private int getUrlBarCurveTranslation() {
         return getWidth() - tabsButton.getLeft();
     }
 
     private boolean canDoBack(Tab tab) {
         return (tab.canDoBack() && !isEditing());
@@ -845,62 +844,57 @@ public class BrowserToolbar extends Them
         setUrlEditLayoutVisibility(false, null);
     }
 
     private void hideUrlEditLayout(PropertyAnimator animator) {
         setUrlEditLayoutVisibility(false, animator);
     }
 
     private void setUrlEditLayoutVisibility(final boolean showEditLayout, PropertyAnimator animator) {
-        urlEditLayout.prepareAnimation(showEditLayout, animator);
-
-        final View viewToShow = (showEditLayout ? urlEditLayout : urlDisplayLayout);
-        final View viewToHide = (showEditLayout ? urlDisplayLayout : urlEditLayout);
+        if (showEditLayout) {
+            urlEditLayout.prepareShowAnimation(animator);
+        }
 
         if (animator == null) {
+            final View viewToShow = (showEditLayout ? urlEditLayout : urlDisplayLayout);
+            final View viewToHide = (showEditLayout ? urlDisplayLayout : urlEditLayout);
+
             viewToHide.setVisibility(View.GONE);
             viewToShow.setVisibility(View.VISIBLE);
 
             final int cancelVisibility = (showEditLayout ? View.VISIBLE : View.INVISIBLE);
             setCancelVisibility(cancelVisibility);
             return;
         }
 
-        ViewHelper.setAlpha(viewToShow, 0.0f);
-        animator.attach(viewToShow,
-                        PropertyAnimator.Property.ALPHA,
-                        1.0f);
-
-        animator.attach(viewToHide,
-                        PropertyAnimator.Property.ALPHA,
-                        0.0f);
-
         animator.addPropertyAnimationListener(new PropertyAnimationListener() {
             @Override
             public void onPropertyAnimationStart() {
-                viewToShow.setVisibility(View.VISIBLE);
                 if (!showEditLayout) {
+                    urlEditLayout.setVisibility(View.GONE);
+                    urlDisplayLayout.setVisibility(View.VISIBLE);
+
                     setCancelVisibility(View.INVISIBLE);
                 }
             }
 
             @Override
             public void onPropertyAnimationEnd() {
-                viewToHide.setVisibility(View.GONE);
-                ViewHelper.setAlpha(viewToHide, 1.0f);
                 if (showEditLayout) {
+                    urlDisplayLayout.setVisibility(View.GONE);
+                    urlEditLayout.setVisibility(View.VISIBLE);
+
                     setCancelVisibility(View.VISIBLE);
                 }
             }
         });
     }
 
     private void setCancelVisibility(final int visibility) {
-        if (editSeparator != null && editCancel != null) {
-            editSeparator.setVisibility(visibility);
+        if (editCancel != null) {
             editCancel.setVisibility(visibility);
         }
     }
 
     /**
      * Disables and dims all toolbar elements which are not
      * related to editing mode.
      */
@@ -1016,19 +1010,16 @@ public class BrowserToolbar extends Them
         }
     }
 
     private void showEditingWithPhoneAnimation(final PropertyAnimator animator,
             final int entryTranslation, final int curveTranslation) {
         if (isAnimatingEntry)
             return;
 
-        // Highlight the toolbar from the start of the animation.
-        setSelected(true);
-
         urlDisplayLayout.prepareStartEditingAnimation();
 
         // Slide toolbar elements.
         if (urlBarTranslatingEdge != null) {
             animator.attach(urlBarTranslatingEdge,
                             PropertyAnimator.Property.TRANSLATION_X,
                             entryTranslation);
         }
@@ -1101,16 +1092,20 @@ public class BrowserToolbar extends Them
         updateChildrenForEditing();
 
         if (stopEditingListener != null) {
             stopEditingListener.onStopEditing();
         }
 
         updateProgressVisibility();
 
+        // The animation looks cleaner if the text in the URL bar is
+        // not selected so clear the selection by clearing focus.
+        urlEditLayout.clearFocus();
+
         if (Build.VERSION.SDK_INT < 11) {
             stopEditingWithoutAnimation();
         } else if (HardwareUtils.isTablet()) {
             // No animation.
             hideUrlEditLayout();
         } else {
             stopEditingWithPhoneAnimation();
         }
@@ -1333,19 +1328,16 @@ public class BrowserToolbar extends Them
     @Override
     public void setPrivateMode(boolean isPrivate) {
         super.setPrivateMode(isPrivate);
 
         tabsButton.setPrivateMode(isPrivate);
         menuButton.setPrivateMode(isPrivate);
         menuIcon.setPrivateMode(isPrivate);
         urlEditLayout.setPrivateMode(isPrivate);
-        if (editSeparator != null) {
-            editSeparator.setPrivateMode(isPrivate);
-        }
 
         if (backButton instanceof BackButton) {
             ((BackButton) backButton).setPrivateMode(isPrivate);
         }
 
         if (forwardButton instanceof ForwardButton) {
             ((ForwardButton) forwardButton).setPrivateMode(isPrivate);
         }
--- a/mobile/android/base/toolbar/ToolbarEditLayout.java
+++ b/mobile/android/base/toolbar/ToolbarEditLayout.java
@@ -3,75 +3,51 @@
  * 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/. */
 
 package org.mozilla.gecko.toolbar;
 
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.animation.PropertyAnimator;
 import org.mozilla.gecko.animation.PropertyAnimator.PropertyAnimationListener;
-import org.mozilla.gecko.animation.ViewHelper;
 import org.mozilla.gecko.toolbar.BrowserToolbar.OnCommitListener;
 import org.mozilla.gecko.toolbar.BrowserToolbar.OnDismissListener;
 import org.mozilla.gecko.toolbar.BrowserToolbar.OnFilterListener;
-import org.mozilla.gecko.toolbar.ToolbarEditText.OnTextTypeChangeListener;
-import org.mozilla.gecko.toolbar.ToolbarEditText.TextType;
 import org.mozilla.gecko.widget.ThemedLinearLayout;
 
 import android.content.Context;
 import android.util.AttributeSet;
 import android.view.KeyEvent;
 import android.view.LayoutInflater;
 import android.view.View;
-import android.view.View.OnFocusChangeListener;
 import android.view.inputmethod.InputMethodManager;
-import android.widget.ImageButton;
 
 /**
 * {@code ToolbarEditLayout} is the UI for when the toolbar is in
 * edit state. It controls a text entry ({@code ToolbarEditText})
 * and its matching 'go' button which changes depending on the
 * current type of text in the entry.
 */
 public class ToolbarEditLayout extends ThemedLinearLayout {
 
     private final ToolbarEditText mEditText;
-    private final ImageButton mGo;
 
-    private OnCommitListener mCommitListener;
     private OnFocusChangeListener mFocusChangeListener;
 
     public ToolbarEditLayout(Context context, AttributeSet attrs) {
         super(context, attrs);
 
         setOrientation(HORIZONTAL);
 
         LayoutInflater.from(context).inflate(R.layout.toolbar_edit_layout, this);
-        mGo = (ImageButton) findViewById(R.id.go);
         mEditText = (ToolbarEditText) findViewById(R.id.url_edit_text);
     }
 
     @Override
     public void onAttachedToWindow() {
-        mGo.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if (mCommitListener != null) {
-                    mCommitListener.onCommit();
-                }
-            }
-        });
-
-        mEditText.setOnTextTypeChangeListener(new OnTextTypeChangeListener() {
-            @Override
-            public void onTextTypeChange(ToolbarEditText editText, TextType textType) {
-                updateGoButton(textType);
-            }
-        });
-
         mEditText.setOnFocusChangeListener(new OnFocusChangeListener() {
             @Override
             public void onFocusChange(View v, boolean hasFocus) {
                 if (mFocusChangeListener != null) {
                     mFocusChangeListener.onFocusChange(ToolbarEditLayout.this, hasFocus);
                 }
             }
         });
@@ -80,107 +56,52 @@ public class ToolbarEditLayout extends T
     @Override
     public void setOnFocusChangeListener(OnFocusChangeListener listener) {
         mFocusChangeListener = listener;
     }
 
     @Override
     public void setEnabled(boolean enabled) {
         super.setEnabled(enabled);
-
-        mGo.setEnabled(enabled);
         mEditText.setEnabled(enabled);
     }
 
     @Override
     public void setPrivateMode(boolean isPrivate) {
         super.setPrivateMode(isPrivate);
         mEditText.setPrivateMode(isPrivate);
     }
 
-    private void updateGoButton(TextType textType) {
-        if (textType == TextType.EMPTY) {
-            mGo.setVisibility(View.GONE);
-            return;
-        }
-
-        mGo.setVisibility(View.VISIBLE);
-
-        final int imageResource;
-        final String contentDescription;
-
-        if (textType == TextType.SEARCH_QUERY) {
-            imageResource = R.drawable.ic_url_bar_search;
-            contentDescription = getContext().getString(R.string.search);
-        } else {
-            imageResource = R.drawable.ic_url_bar_go;
-            contentDescription = getContext().getString(R.string.go);
-        }
-
-        mGo.setImageResource(imageResource);
-        mGo.setContentDescription(contentDescription);
-    }
-
     private void showSoftInput() {
         InputMethodManager imm =
                (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
         imm.showSoftInput(mEditText, InputMethodManager.SHOW_IMPLICIT);
     }
 
-    void prepareAnimation(final boolean showing, final PropertyAnimator animator) {
-        if (showing) {
-            prepareShowAnimation(animator);
-        } else {
-            prepareHideAnimation(animator);
-        }
-    }
-
-    private void prepareShowAnimation(final PropertyAnimator animator) {
+    void prepareShowAnimation(final PropertyAnimator animator) {
         if (animator == null) {
             mEditText.requestFocus();
             showSoftInput();
             return;
         }
 
         animator.addPropertyAnimationListener(new PropertyAnimationListener() {
             @Override
             public void onPropertyAnimationStart() {
-                ViewHelper.setAlpha(mGo, 0.0f);
                 mEditText.requestFocus();
             }
 
             @Override
             public void onPropertyAnimationEnd() {
-                ViewHelper.setAlpha(mGo, 1.0f);
                 showSoftInput();
             }
         });
     }
 
-    private void prepareHideAnimation(final PropertyAnimator animator) {
-        if (animator == null) {
-            return;
-        }
-
-        animator.addPropertyAnimationListener(new PropertyAnimationListener() {
-            @Override
-            public void onPropertyAnimationStart() {
-                ViewHelper.setAlpha(mGo, 0.0f);
-            }
-
-            @Override
-            public void onPropertyAnimationEnd() {
-                // The enclosing view is invisible, so unhide the go button.
-                ViewHelper.setAlpha(mGo, 1.0f);
-            }
-        });
-    }
-
     void setOnCommitListener(OnCommitListener listener) {
-        mCommitListener = listener;
         mEditText.setOnCommitListener(listener);
     }
 
     void setOnDismissListener(OnDismissListener listener) {
         mEditText.setOnDismissListener(listener);
     }
 
     void setOnFilterListener(OnFilterListener listener) {
--- a/services/sync/modules/service.js
+++ b/services/sync/modules/service.js
@@ -706,17 +706,17 @@ Sync11Service.prototype = {
           if (!this.identity.syncKey) {
             this._log.warn("No passphrase in verifyLogin.");
             this.status.login = LOGIN_FAILED_NO_PASSPHRASE;
             return false;
           }
 
           // Go ahead and do remote setup, so that we can determine
           // conclusively that our passphrase is correct.
-          if (this._remoteSetup()) {
+          if (this._remoteSetup(test)) {
             // Username/password verified.
             this.status.login = LOGIN_SUCCEEDED;
             return true;
           }
 
           this._log.warn("Remote setup failed.");
           // Remote setup must have failed.
           return false;
--- a/testing/marionette/mach_commands.py
+++ b/testing/marionette/mach_commands.py
@@ -64,26 +64,28 @@ class B2GCommands(MachCommandBase):
     def __init__(self, context):
         MachCommandBase.__init__(self, context)
 
         for attr in ('b2g_home', 'device_name'):
             setattr(self, attr, getattr(context, attr, None))
     @Command('marionette-webapi', category='testing',
         description='Run a Marionette webapi test',
         conditions=[conditions.is_b2g])
-    @CommandArgument('--emulator', choices=['x86', 'arm'],
-        help='Run an emulator of the specified architecture.')
     @CommandArgument('--type', dest='testtype',
         help='Test type, usually one of: browser, b2g, b2g-qemu.',
         default='b2g')
     @CommandArgument('tests', nargs='*', metavar='TESTS',
         help='Path to test(s) to run.')
-    def run_marionette_webapi(self, tests, emulator=None, testtype=None):
-        if not emulator and self.device_name.find('emulator') == 0:
-            emulator='arm'
+    def run_marionette_webapi(self, tests, testtype=None):
+        emulator = None
+        if self.device_name:
+            if self.device_name.startswith('emulator'):
+                emulator = 'arm'
+                if 'x86' in self.device_name:
+                    emulator = 'x86'
 
         if self.substs.get('ENABLE_MARIONETTE') != '1':
             print(MARIONETTE_DISABLED_B2G % 'marionette-webapi')
             return 1
 
         return run_marionette(tests, b2g_path=self.b2g_home, emulator=emulator,
             testtype=testtype, topsrcdir=self.topsrcdir, address=None)
 
--- a/testing/mochitest/mach_commands.py
+++ b/testing/mochitest/mach_commands.py
@@ -547,20 +547,16 @@ def B2GCommand(func):
     nowindow = CommandArgument('--no-window', action='store_true', default=False,
         help='Pass --no-window to the emulator')
     func = nowindow(func)
 
     sdcard = CommandArgument('--sdcard', default="10MB",
         help='Define size of sdcard: 1MB, 50MB...etc')
     func = sdcard(func)
 
-    emulator = CommandArgument('--emulator', default='arm',
-        help='Architecture of emulator to use: x86 or arm')
-    func = emulator(func)
-
     marionette = CommandArgument('--marionette', default=None,
         help='host:port to use when connecting to Marionette')
     func = marionette(func)
 
     chunk_total = CommandArgument('--total-chunks', type=int,
         help='Total number of chunks to split tests into.')
     func = chunk_total(func)
 
@@ -654,17 +650,17 @@ class MachCommands(MachCommandBase):
         return mochitest.run_desktop_test(self._mach_context,
             test_paths=test_paths, suite=flavor, **kwargs)
 
 
 # TODO For now b2g commands will only work with the emulator,
 # they should be modified to work with all devices.
 def is_emulator(cls):
     """Emulator needs to be configured."""
-    return cls.device_name.find('emulator') == 0
+    return cls.device_name.startswith('emulator')
 
 
 @CommandProvider
 class B2GCommands(MachCommandBase):
     """So far these are only mochitest plain. They are
     implemented separately because their command lines
     are completely different.
     """
@@ -676,16 +672,22 @@ class B2GCommands(MachCommandBase):
 
     @Command('mochitest-remote', category='testing',
         description='Run a remote mochitest.',
         conditions=[conditions.is_b2g, is_emulator])
     @B2GCommand
     def run_mochitest_remote(self, test_paths, **kwargs):
         from mozbuild.controller.building import BuildDriver
 
+        if self.device_name.startswith('emulator'):
+            emulator = 'arm'
+            if 'x86' in self.device_name:
+                emulator = 'x86'
+            kwargs['emulator'] = emulator
+
         self._ensure_state_subdir_exists('.')
 
         driver = self._spawn(BuildDriver)
         driver.install_tests(remove=False)
 
         mochitest = self._spawn(MochitestRunner)
         return mochitest.run_b2g_test(b2g_home=self.b2g_home,
                 xre_path=self.xre_path, test_paths=test_paths, **kwargs)
--- a/testing/xpcshell/mach_commands.py
+++ b/testing/xpcshell/mach_commands.py
@@ -29,17 +29,20 @@ from mach.decorators import (
 
 ADB_NOT_FOUND = '''
 The %s command requires the adb binary to be on your path.
 
 If you have a B2G build, this can be found in
 '%s/out/host/<platform>/bin'.
 '''.lstrip()
 
-BUSYBOX_URL = 'http://www.busybox.net/downloads/binaries/latest/busybox-armv7l'
+BUSYBOX_URLS = {
+    'arm': 'http://www.busybox.net/downloads/binaries/latest/busybox-armv7l',
+    'x86': 'http://www.busybox.net/downloads/binaries/latest/busybox-i686'
+}
 
 
 if sys.version_info[0] < 3:
     unicode_type = unicode
 else:
     unicode_type = str
 
 # Simple filter to omit the message emitted as a test file begins.
@@ -298,38 +301,41 @@ class B2GXPCShellRunner(MozbuildObject):
         build_path = os.path.join(self.topsrcdir, 'build')
         if build_path not in sys.path:
             sys.path.append(build_path)
 
         self.tests_dir = os.path.join(self.topobjdir, '_tests')
         self.xpcshell_dir = os.path.join(self.tests_dir, 'xpcshell')
         self.bin_dir = os.path.join(self.distdir, 'bin')
 
-    def _download_busybox(self, b2g_home):
-        system_bin = os.path.join(b2g_home, 'out', 'target', 'product', 'generic', 'system', 'bin')
+    def _download_busybox(self, b2g_home, emulator):
+        target_device = 'generic'
+        if emulator == 'x86':
+            target_device = 'generic_x86'
+        system_bin = os.path.join(b2g_home, 'out', 'target', 'product', target_device, 'system', 'bin')
         busybox_path = os.path.join(system_bin, 'busybox')
 
         if os.path.isfile(busybox_path):
             return busybox_path
 
         if not os.path.isdir(system_bin):
             os.makedirs(system_bin)
 
         try:
-            data = urllib2.urlopen(BUSYBOX_URL)
+            data = urllib2.urlopen(BUSYBOX_URLS[emulator])
         except urllib2.URLError:
             print('There was a problem downloading busybox. Proceeding without it,' \
                   'initial setup will be slow.')
             return
 
         with open(busybox_path, 'wb') as f:
             f.write(data.read())
         return busybox_path
 
-    def run_test(self, test_paths, b2g_home=None, busybox=None,
+    def run_test(self, test_paths, b2g_home=None, busybox=None, device_name=None,
                  # ignore parameters from other platforms' options
                  **kwargs):
         try:
             import which
             which.which('adb')
         except which.WhichError:
             # TODO Find adb automatically if it isn't on the path
             print(ADB_NOT_FOUND % ('mochitest-remote', b2g_home))
@@ -343,31 +349,35 @@ class B2GXPCShellRunner(MozbuildObject):
             test_path = self._wrap_path_argument(test_paths[0]).relpath()
 
         import runtestsb2g
         parser = runtestsb2g.B2GOptions()
         options, args = parser.parse_args([])
 
         options.b2g_path = b2g_home
         options.busybox = busybox or os.environ.get('BUSYBOX')
-        options.emulator = 'arm'
         options.localLib = self.bin_dir
         options.localBin = self.bin_dir
         options.logcat_dir = self.xpcshell_dir
         options.manifest = os.path.join(self.xpcshell_dir, 'xpcshell_b2g.ini')
         options.mozInfo = os.path.join(self.topobjdir, 'mozinfo.json')
         options.objdir = self.topobjdir
         options.symbolsPath = os.path.join(self.distdir, 'crashreporter-symbols'),
         options.testingModulesDir = os.path.join(self.tests_dir, 'modules')
         options.testsRootDir = self.xpcshell_dir
         options.testPath = test_path
         options.use_device_libs = True
 
+        options.emulator = 'arm'
+        if device_name.startswith('emulator'):
+            if 'x86' in device_name:
+                options.emulator = 'x86'
+
         if not options.busybox:
-            options.busybox = self._download_busybox(b2g_home)
+            options.busybox = self._download_busybox(b2g_home, options.emulator)
 
         return runtestsb2g.run_remote_xpcshell(parser, options, args)
 
 def is_platform_supported(cls):
     """Must have a Firefox, Android or B2G build."""
     return conditions.is_android(cls) or \
            conditions.is_b2g(cls) or \
            conditions.is_firefox(cls)
@@ -431,16 +441,17 @@ class MachCommands(MachCommandBase):
         driver = self._spawn(BuildDriver)
         driver.install_tests(remove=False)
 
         if conditions.is_android(self):
             xpcshell = self._spawn(AndroidXPCShellRunner)
         elif conditions.is_b2g(self):
             xpcshell = self._spawn(B2GXPCShellRunner)
             params['b2g_home'] = self.b2g_home
+            params['device_name'] = self.device_name
         else:
             xpcshell = self._spawn(XPCShellRunner)
         xpcshell.cwd = self._mach_context.cwd
 
         try:
             return xpcshell.run_test(**params)
         except InvalidTestPathError as e:
             print(e.message)
--- a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm
@@ -279,20 +279,17 @@ this.DownloadIntegration = {
         if (aStorage.default || !preferredStorageName) {
           preferredStorageName = aStorage.storageName;
         }
       });
 
       // Now get the path for this storage area.
       if (preferredStorageName) {
         let volume = volumeService.getVolumeByName(preferredStorageName);
-        if (volume &&
-            volume.isMediaPresent &&
-            !volume.isMountLocked &&
-            !volume.isSharing) {
+        if (volume && volume.state === Ci.nsIVolume.STATE_MOUNTED){
           directoryPath = OS.Path.join(volume.mountPoint, "downloads");
           yield OS.File.makeDir(directoryPath, { ignoreExisting: true });
         }
       }
       if (directoryPath) {
         throw new Task.Result(directoryPath);
       } else {
         throw new Components.Exception("No suitable storage for downloads.",
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
@@ -16,16 +16,18 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 XPCOMUtils.defineLazyModuleGetter(this, "DeferredTask",
   "resource://gre/modules/DeferredTask.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "OS",
   "resource://gre/modules/osfile.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Task",
   "resource://gre/modules/Task.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",
   "resource://gre/modules/TelemetryStopwatch.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "Deprecated",
+  "resource://gre/modules/Deprecated.jsm");
 
 // A text encoder to UTF8, used whenever we commit the
 // engine metadata to disk.
 XPCOMUtils.defineLazyGetter(this, "gEncoder",
                             function() {
                               return new TextEncoder();
                             });
 
@@ -2872,18 +2874,17 @@ SearchService.prototype = {
       }
       return;
     }
 
     let warning =
       "Search service falling back to synchronous initialization. " +
       "This is generally the consequence of an add-on using a deprecated " +
       "search service API.";
-    // Bug 785487 - Disable warning until our own callers are fixed.
-    //Deprecated.warning(warning, "https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIBrowserSearchService#async_warning");
+    Deprecated.warning(warning, "https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIBrowserSearchService#async_warning");
     LOG(warning);
 
     engineMetadataService.syncInit();
     this._syncInit();
     if (!Components.isSuccessCode(this._initRV)) {
       throw this._initRV;
     }
   },
--- a/toolkit/devtools/server/actors/root.js
+++ b/toolkit/devtools/server/actors/root.js
@@ -1,16 +1,17 @@
 /* -*- tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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 { Ci } = require("chrome");
 const Services = require("Services");
 const { ActorPool, appendExtraActors, createExtraActors } = require("devtools/server/actors/common");
 const { DebuggerServer } = require("devtools/server/main");
 
 /* Root actor for the remote debugging protocol. */
 
 /**
  * Create a remote debugging protocol root actor.