Backout aa955afe7507:49f1c6fa27f8 (bug 953381) for robocop orange on this CLOSED TREE
authorNathan Froyd <froydnj@mozilla.com>
Mon, 20 Jan 2014 20:06:34 -0500
changeset 180383 fcc09f288cd3ae579b42425c2edec3d5de790549
parent 180382 a868a956c60c49abe0dba3a427b4bb2ddacdc797
child 180384 4a0a369d7ffb91f9632ddef33912a6e065af16a0
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs953381
milestone29.0a1
backs outaa955afe75076b400947787c22013dfd6dee9477
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backout aa955afe7507:49f1c6fa27f8 (bug 953381) for robocop orange on this CLOSED TREE
CLOBBER
mobile/android/app/mobile.js
mobile/android/base/BrowserApp.java
mobile/android/base/MediaCastingBar.java
mobile/android/base/locales/en-US/android_strings.dtd
mobile/android/base/moz.build
mobile/android/base/resources/drawable-hdpi/media_bar_pause.png
mobile/android/base/resources/drawable-hdpi/media_bar_play.png
mobile/android/base/resources/drawable-hdpi/media_bar_stop.png
mobile/android/base/resources/drawable-mdpi/media_bar_pause.png
mobile/android/base/resources/drawable-mdpi/media_bar_play.png
mobile/android/base/resources/drawable-mdpi/media_bar_stop.png
mobile/android/base/resources/drawable-xhdpi/media_bar_pause.png
mobile/android/base/resources/drawable-xhdpi/media_bar_play.png
mobile/android/base/resources/drawable-xhdpi/media_bar_stop.png
mobile/android/base/resources/layout/gecko_app.xml
mobile/android/base/resources/layout/media_casting.xml
mobile/android/base/strings.xml.in
mobile/android/base/tests/robocop.ini
mobile/android/base/tests/testVideoDiscovery.java
mobile/android/base/tests/testVideoDiscovery.js
mobile/android/base/tests/video_discovery.html
mobile/android/chrome/content/CastingApps.js
mobile/android/chrome/content/browser.js
mobile/android/chrome/jar.mn
mobile/android/locales/en-US/chrome/browser.properties
--- a/CLOBBER
+++ b/CLOBBER
@@ -17,9 +17,9 @@
 #
 # Modifying this file will now automatically clobber the buildbot machines \o/
 #
 
 # Are you updating CLOBBER because you think it's needed for your WebIDL
 # changes to stick? As of bug 928195, this shouldn't be necessary! Please
 # don't change CLOBBER for WebIDL changes any more.
 
-Bug 953381 requires a clobber due to bug 961339.
+Bug 917896 requires a clobber due to bug 961339.
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -269,19 +269,16 @@ pref("browser.search.jarURIs", "chrome:/
 // tell the search service that we don't really expose the "current engine"
 pref("browser.search.noCurrentEngine", true);
 
 #ifdef MOZ_OFFICIAL_BRANDING
 // {moz:official} expands to "official"
 pref("browser.search.official", true);
 #endif
 
-// Control media casting feature
-pref("browser.casting.enabled", false);
-
 // Enable sparse localization by setting a few package locale overrides
 pref("chrome.override_package.global", "browser");
 pref("chrome.override_package.mozapps", "browser");
 pref("chrome.override_package.passwordmgr", "browser");
 
 // enable xul error pages
 pref("browser.xul.error_pages.enabled", true);
 
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -151,17 +151,16 @@ abstract public class BrowserApp extends
         @Override
         public float getInterpolation(float t) {
             t -= 1.0f;
             return t * t * t * t * t + 1.0f;
         }
     };
 
     private FindInPageBar mFindInPageBar;
-    private MediaCastingBar mMediaCastingBar;
 
     private boolean mAccessibilityEnabled = false;
 
     // We'll ask for feedback after the user launches the app this many times.
     private static final int FEEDBACK_LAUNCH_COUNT = 15;
 
     // Whether the dynamic toolbar pref is enabled.
     private boolean mDynamicToolbarEnabled = false;
@@ -526,17 +525,16 @@ abstract public class BrowserApp extends
         mBrowserToolbar.setOnKeyListener(this);
 
         if (mTabsPanel != null) {
             mTabsPanel.setTabsLayoutChangeListener(this);
             updateSideBarState();
         }
 
         mFindInPageBar = (FindInPageBar) findViewById(R.id.find_in_page);
-        mMediaCastingBar = (MediaCastingBar) findViewById(R.id.media_casting);
 
         registerEventListener("CharEncoding:Data");
         registerEventListener("CharEncoding:State");
         registerEventListener("Feedback:LastUrl");
         registerEventListener("Feedback:OpenPlayStore");
         registerEventListener("Feedback:MaybeLater");
         registerEventListener("Telemetry:Gather");
         registerEventListener("Settings:Show");
@@ -827,21 +825,16 @@ abstract public class BrowserApp extends
         if (mBrowserToolbar != null)
             mBrowserToolbar.onDestroy();
 
         if (mFindInPageBar != null) {
             mFindInPageBar.onDestroy();
             mFindInPageBar = null;
         }
 
-        if (mMediaCastingBar != null) {
-            mMediaCastingBar.onDestroy();
-            mMediaCastingBar = null;
-        }
-
         if (mSharedPreferencesHelper != null) {
             mSharedPreferencesHelper.uninit();
             mSharedPreferencesHelper = null;
         }
 
         if (mOrderedBroadcastHelper != null) {
             mOrderedBroadcastHelper.uninit();
             mOrderedBroadcastHelper = null;
deleted file mode 100644
--- a/mobile/android/base/MediaCastingBar.java
+++ /dev/null
@@ -1,118 +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/. */
-
-package org.mozilla.gecko;
-
-import org.mozilla.gecko.util.GeckoEventListener;
-import org.mozilla.gecko.util.ThreadUtils;
-
-import org.json.JSONObject;
-
-import android.content.Context;
-import android.text.TextUtils;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.ImageButton;
-import android.widget.RelativeLayout;
-import android.widget.TextView;
-
-public class MediaCastingBar extends RelativeLayout implements View.OnClickListener, GeckoEventListener  {
-    private static final String LOGTAG = "MediaCastingBar";
-
-    private TextView mCastingTo;
-    private ImageButton mMediaPlay;
-    private ImageButton mMediaPause;
-    private ImageButton mMediaStop;
-
-    private boolean mInflated = false;
-
-    public MediaCastingBar(Context context, AttributeSet attrs) {
-        super(context, attrs);
-
-        GeckoAppShell.getEventDispatcher().registerEventListener("Casting:Started", this);
-        GeckoAppShell.getEventDispatcher().registerEventListener("Casting:Stopped", this);
-    }
-
-    public void inflateContent() {
-        LayoutInflater inflater = LayoutInflater.from(getContext());
-        View content = inflater.inflate(R.layout.media_casting, this);
-
-        mMediaPlay = (ImageButton) content.findViewById(R.id.media_play);
-        mMediaPlay.setOnClickListener(this);
-        mMediaPause = (ImageButton) content.findViewById(R.id.media_pause);
-        mMediaPause.setOnClickListener(this);
-        mMediaStop = (ImageButton) content.findViewById(R.id.media_stop);
-        mMediaStop.setOnClickListener(this);
-
-        mCastingTo = (TextView) content.findViewById(R.id.media_casting_to);
-
-        // Capture clicks on the rest of the view to prevent them from
-        // leaking into other views positioned below.
-        content.setOnClickListener(this);
-
-        mInflated = true;
-    }
-
-    public void show() {
-        if (!mInflated)
-            inflateContent();
-
-        setVisibility(VISIBLE);
-    }
-
-    public void hide() {
-        setVisibility(GONE);
-    }
-
-    public void onDestroy() {
-        GeckoAppShell.getEventDispatcher().unregisterEventListener("Casting:Started", this);
-        GeckoAppShell.getEventDispatcher().unregisterEventListener("Casting:Stopped", this);
-    }
-
-    // View.OnClickListener implementation
-    @Override
-    public void onClick(View v) {
-        final int viewId = v.getId();
-
-        if (viewId == R.id.media_play) {
-            GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Casting:Play", ""));
-            mMediaPlay.setVisibility(GONE);
-            mMediaPause.setVisibility(VISIBLE);
-        } else if (viewId == R.id.media_pause) {
-            GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Casting:Pause", ""));
-            mMediaPause.setVisibility(GONE);
-            mMediaPlay.setVisibility(VISIBLE);
-        } else if (viewId == R.id.media_stop) {
-            GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Casting:Stop", ""));
-        }
-    }
-
-    // GeckoEventListener implementation
-    @Override
-    public void handleMessage(final String event, final JSONObject message) {
-        final String device = message.optString("device");
-
-        ThreadUtils.postToUiThread(new Runnable() {
-            @Override
-            public void run() {
-                if (event.equals("Casting:Started")) {
-                    show();
-                    if (!TextUtils.isEmpty(device)) {
-                        mCastingTo.setText(device);
-                    } else {
-                        // Should not happen
-                        mCastingTo.setText("");
-                        Log.d(LOGTAG, "Device name is empty.");
-                    }
-                    mMediaPlay.setVisibility(GONE);
-                    mMediaPause.setVisibility(VISIBLE);
-                } else if (event.equals("Casting:Stopped")) {
-                    hide();
-                }
-            }
-        });
-    }
-}
--- a/mobile/android/base/locales/en-US/android_strings.dtd
+++ b/mobile/android/base/locales/en-US/android_strings.dtd
@@ -214,23 +214,16 @@ size. -->
 
 <!-- Localization note (find_text, find_prev, find_next, find_close) : These strings are used
      as alternate text for accessibility. They are not visible in the UI. -->
 <!ENTITY find_text "Find in Page">
 <!ENTITY find_prev "Previous">
 <!ENTITY find_next "Next">
 <!ENTITY find_close "Close">
 
-<!-- Localization note (media_casting_to, media_play, media_pause, media_stop) : These strings are used
-     as alternate text for accessibility. They are not visible in the UI. -->
-<!ENTITY media_casting_to "Casting to Device">
-<!ENTITY media_play "Play">
-<!ENTITY media_pause "Pause">
-<!ENTITY media_stop "Stop">
-
 <!ENTITY contextmenu_open_new_tab "Open in New Tab">
 <!ENTITY contextmenu_open_private_tab "Open in Private Tab">
 <!ENTITY contextmenu_open_in_reader "Open in Reader">
 <!ENTITY contextmenu_remove "Remove">
 <!ENTITY contextmenu_add_to_launcher "Add to Home Screen">
 <!ENTITY contextmenu_share "Share">
 <!ENTITY contextmenu_pasteandgo "Paste &amp; Go">
 <!ENTITY contextmenu_paste "Paste">
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -243,17 +243,16 @@ gbjar.sources += [
     'home/TopSitesPanel.java',
     'home/TopSitesThumbnailView.java',
     'home/TwoLinePageRow.java',
     'InputMethods.java',
     'JavaAddonManager.java',
     'LightweightTheme.java',
     'LightweightThemeDrawable.java',
     'LocaleManager.java',
-    'MediaCastingBar.java',
     'MemoryMonitor.java',
     'menu/GeckoMenu.java',
     'menu/GeckoMenuInflater.java',
     'menu/GeckoMenuItem.java',
     'menu/GeckoSubMenu.java',
     'menu/MenuItemActionBar.java',
     'menu/MenuItemActionView.java',
     'menu/MenuItemDefault.java',
deleted file mode 100644
index 5f635fc10aba60c7360e69170c69507a1f4df38c..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index ac69ea59a43370a3d777570c7e8d5a882a32cf13..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index b1bcd06079dc098921ce1501daf086a839a050ac..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 81712cabed27c3aba37a0789a41f0196af80459d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 77f87b387b96f89fb54374c8452fcdc121a05e20..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 64e7c9a3c200c669ee311ddc1452453e46c9020c..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index bc3930fcc219c390aab75ba2d659264d19254c05..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 2ce52f803941cc582a296542acddb3c94c9ccc7b..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index f00e43782fcc7b279bcc8dd7ffedbf495c55045b..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/mobile/android/base/resources/layout/gecko_app.xml
+++ b/mobile/android/base/resources/layout/gecko_app.xml
@@ -43,23 +43,16 @@
 
         <org.mozilla.gecko.FindInPageBar android:id="@+id/find_in_page"
                                          android:layout_width="fill_parent"
                                          android:layout_height="wrap_content"
                                          android:layout_alignParentBottom="true"
                                          style="@style/FindBar"
                                          android:visibility="gone"/>
 
-        <org.mozilla.gecko.MediaCastingBar android:id="@+id/media_casting"
-                                           android:layout_width="fill_parent"
-                                           android:layout_height="wrap_content"
-                                           android:layout_alignParentBottom="true"
-                                           style="@style/FindBar"
-                                           android:visibility="gone"/>
-
         <RelativeLayout android:id="@+id/camera_layout"
                         android:layout_height="wrap_content"
                         android:layout_width="wrap_content"
                         android:layout_alignParentRight="true"
                         android:layout_alignParentBottom="true">
         </RelativeLayout>
 
         <FrameLayout android:id="@+id/search_container"
deleted file mode 100644
--- a/mobile/android/base/resources/layout/media_casting.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <RelativeLayout android:id="@+id/media_controls"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerInParent="true">
-
-        <ImageButton android:id="@+id/media_play"
-                     style="@style/FindBar.ImageButton"
-                     android:contentDescription="@string/media_play"
-                     android:src="@drawable/media_bar_play"
-                     android:visibility="gone"/>
-
-        <ImageButton android:id="@+id/media_pause"
-                     style="@style/FindBar.ImageButton"
-                     android:contentDescription="@string/media_pause"
-                     android:src="@drawable/media_bar_pause"/>
-
-    </RelativeLayout>
-
-    <TextView android:id="@+id/media_casting_to"
-              android:layout_width="wrap_content"
-              android:layout_height="wrap_content"
-              android:layout_marginLeft="5dip"
-              android:layout_marginRight="5dip"
-              android:layout_alignParentLeft="true"
-              android:layout_toLeftOf="@id/media_controls"
-              android:layout_centerVertical="true"
-              android:singleLine="true"
-              android:ellipsize="end"
-              android:textColor="#FFFFFFFF"
-              android:contentDescription="@string/media_casting_to"/>
-
-    <ImageButton android:id="@+id/media_stop"
-                 style="@style/FindBar.ImageButton"
-                 android:contentDescription="@string/media_stop"
-                 android:layout_alignParentRight="true"
-                 android:src="@drawable/media_bar_stop"/>
-
-</merge>
--- a/mobile/android/base/strings.xml.in
+++ b/mobile/android/base/strings.xml.in
@@ -78,21 +78,16 @@
   <string name="desktop_mode">&desktop_mode;</string>
   <string name="tools">&tools;</string>
 
   <string name="find_text">&find_text;</string>
   <string name="find_prev">&find_prev;</string>
   <string name="find_next">&find_next;</string>
   <string name="find_close">&find_close;</string>
 
-  <string name="media_casting_to">&media_casting_to;</string>
-  <string name="media_play">&media_play;</string>
-  <string name="media_pause">&media_pause;</string>
-  <string name="media_stop">&media_stop;</string>
-
   <string name="settings">&settings;</string>
   <string name="settings_title">&settings_title;</string>
   <string name="pref_category_advanced">&pref_category_advanced;</string>
   <string name="pref_category_customize">&pref_category_customize;</string>
   <string name="pref_category_search">&pref_category_search2;</string>
   <string name="pref_category_display">&pref_category_display;</string>
   <string name="pref_category_privacy_short">&pref_category_privacy_short;</string>
   <string name="pref_category_vendor">&pref_category_vendor;</string>
--- a/mobile/android/base/tests/robocop.ini
+++ b/mobile/android/base/tests/robocop.ini
@@ -74,17 +74,16 @@ skip-if = processor == "x86"
 [testBrowserDiscovery]
 [testDeviceSearchEngine]
 [testJNI]
 # [testMozPay] # see bug 945675
 [testOrderedBroadcast]
 [testSharedPreferences]
 [testSimpleDiscovery]
 [testUITelemetry]
-[testVideoDiscovery]
 
 # Used for Talos, please don't use in mochitest
 #[testPan]
 #[testCheck]
 #[testCheck2]
 #[testBrowserProviderPerf]
 
 # Using UITest
deleted file mode 100644
--- a/mobile/android/base/tests/testVideoDiscovery.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.mozilla.gecko.tests;
-
-import org.mozilla.gecko.*;
-
-
-public class testVideoDiscovery extends JavascriptTest {
-    public testVideoDiscovery() {
-        super("testVideoDiscovery.js");
-    }
-}
deleted file mode 100644
--- a/mobile/android/base/tests/testVideoDiscovery.js
+++ /dev/null
@@ -1,84 +0,0 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
-/* 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 { classes: Cc, interfaces: Ci, utils: Cu } = Components;
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-function ok(passed, text) {
-  do_report_result(passed, text, Components.stack.caller, false);
-}
-
-// The chrome window
-let chromeWin;
-
-// Track the <browser> where the tests are happening
-let browser;
-
-function middle(element) {
-  let rect = element.getBoundingClientRect();
-  let x = (rect.right - rect.left) / 2 + rect.left;
-  let y = (rect.bottom - rect.top) / 2 + rect.top;
-  return [x, y];
-}
-
-add_test(function setup_browser() {
-  chromeWin = Services.wm.getMostRecentWindow("navigator:browser");
-  let BrowserApp = chromeWin.BrowserApp;
-
-  do_register_cleanup(function cleanup() {
-    BrowserApp.closeTab(BrowserApp.getTabForBrowser(browser));
-  });
-
-  let url = "http://mochi.test:8888/tests/robocop/video_discovery.html";
-  browser = BrowserApp.addTab(url, { selected: true, parentId: BrowserApp.selectedTab.id }).browser;
-  browser.addEventListener("load", function startTests(event) {
-    browser.removeEventListener("load", startTests, true);
-    Services.tm.mainThread.dispatch(run_next_test, Ci.nsIThread.DISPATCH_NORMAL);
-  }, true);
-});
-
-let videoDiscoveryTests = [
-  { id: "simple-mp4", source: "http://mochi.test:8888/simple.mp4", poster: "http://mochi.test:8888/simple.png", text: "simple video with mp4 src" },
-  { id: "simple-fail", pass: false, text: "simple video with no mp4 src" },
-  { id: "with-sources-mp4", source: "http://mochi.test:8888/simple.mp4", text: "video with mp4 extension source child" },
-  { id: "with-sources-fail", pass: false, text: "video with no mp4 extension source child" },
-  { id: "with-sources-mimetype", source: "http://mochi.test:8888/simple-video-mp4", text: "video with mp4 mimetype source child" },
-  { id: "video-overlay", source: "http://mochi.test:8888/simple.mp4", text: "div overlay covering a simple video with mp4 src" }
-];
-
-function execute_video_test(test) {
-  let element = browser.contentDocument.getElementById(test.id);
-  if (element) {
-    let [x, y] = middle(element);
-    let video = chromeWin.CastApps.getVideo(element, x, y);
-    if (video) {
-      let matchPoster = (test.poster == video.poster);
-      let matchSource = (test.source == video.source);
-      ok(matchPoster && matchSource && test.pass, test.text);
-    } else {
-      ok(!test.pass, test.text);
-    }
-  } else {
-    ok(false, "test element not found: [" + test.id + "]");
-  }
-  run_next_test();
-}
-
-let videoTest;
-while ((videoTest = videoDiscoveryTests.shift())) {
-  if (!("poster" in videoTest)) {
-    videoTest.poster = "";
-  }
-  if (!("pass" in videoTest)) {
-    videoTest.pass = true;
-  }
-
-  add_test(execute_video_test.bind(this, videoTest));
-}
-
-run_next_test();
deleted file mode 100644
--- a/mobile/android/base/tests/video_discovery.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-  <head>
-    <title>Video Discovery Test</title>
-    <style type="text/css">
-      #video-box {
-        float: left;
-      }
-      #video-overlay, #video-player {
-        width: 640px;
-        min-height: 370px;
-      }
-      #video-overlay {
-        position: absolute;
-        float: left;
-        background-color:#f00;
-        z-index:10;
-      }
-    </style>
-  </head>
-  <body>
-    <!-- PASS: src uses a mp4 extension -->
-    <video id="simple-mp4" poster="/simple.png" src="/simple.mp4"></video>
-
-    <!-- FAIL: src uses a ogg extension -->
-    <video id="simple-fail" src="/simple.ogg"></video>
-
-    <!-- PASS: source list uses a mp4 extension -->
-    <video id="with-sources-mp4">
-      <source src="/simple.ogg">
-      <source src="/simple.mp4">
-    </video>
-
-    <!-- FAIL: source list uses a mp4 extension -->
-    <video id="with-sources-fail">
-      <source src="/simple.ogg">
-      <source src="/simple.webm">
-    </video>
-
-    <!-- PASS: source list uses a mp4 mimetype -->
-    <video id="with-sources-mimetype">
-      <source src="/simple-video-ogg" type="video/ogg">
-      <source src="/simple-video-mp4" type="video/mp4">
-    </video>
-
-    <!-- PASS: source list uses a mp4 mimetype and extra data -->
-    <video id="with-sources-mimetype-plus">
-      <source src="/simple-video-ogg" type="video/ogg">
-      <source src="/simple-video-mp4" type="video/mp4; codecs='avc1.42E01E, mp4a.40.2'">
-    </video>
-
-    <!-- PASS: div overlay covers a video with mp4 src -->
-    <div id="video-box">
-      <div id="video-overlay"></div>
-      <div>
-        <video id="video-player" src="/simple.mp4"></video>
-      </div>
-    </div>
-  </body>
-</html>
deleted file mode 100644
--- a/mobile/android/chrome/content/CastingApps.js
+++ /dev/null
@@ -1,243 +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/. */
-"use strict";
-
-var CastingApps = {
-  _castMenuId: -1,
-
-  init: function ca_init() {
-    if (!this.isEnabled()) {
-      return;
-    }
-
-    // Search for devices continuously every 120 seconds
-    SimpleServiceDiscovery.search(120 * 1000);
-
-    this._castMenuId = NativeWindow.contextmenus.add(
-      Strings.browser.GetStringFromName("contextmenu.castToScreen"),
-      this.filterCast,
-      this.openExternal.bind(this)
-    );
-
-    Services.obs.addObserver(this, "Casting:Play", false);
-    Services.obs.addObserver(this, "Casting:Pause", false);
-    Services.obs.addObserver(this, "Casting:Stop", false);
-  },
-
-  uninit: function ca_uninit() {
-    Services.obs.removeObserver(this, "Casting:Play");
-    Services.obs.removeObserver(this, "Casting:Pause");
-    Services.obs.removeObserver(this, "Casting:Stop");
-
-    NativeWindow.contextmenus.remove(this._castMenuId);
-  },
-
-  isEnabled: function isEnabled() {
-    return Services.prefs.getBoolPref("browser.casting.enabled");
-  },
-
-  observe: function (aSubject, aTopic, aData) {
-    switch (aTopic) {
-      case "Casting:Play":
-        if (this.session && this.session.remoteMedia.status == "paused") {
-          this.session.remoteMedia.play();
-        }
-        break;
-      case "Casting:Pause":
-        if (this.session && this.session.remoteMedia.status == "started") {
-          this.session.remoteMedia.pause();
-        }
-        break;
-      case "Casting:Stop":
-        if (this.session) {
-          this.closeExternal();
-        }
-        break;
-    }
-  },
-
-  makeURI: function makeURI(aURL, aOriginCharset, aBaseURI) {
-    return Services.io.newURI(aURL, aOriginCharset, aBaseURI);
-  },
-
-  getVideo: function(aElement, aX, aY) {
-    // Fast path: Is the given element a video element
-    let video = this._getVideo(aElement);
-    if (video) {
-      return video;
-    }
-
-    // The context menu system will keep walking up the DOM giving us a chance
-    // to find an element we match. When it hits <html> things can go BOOM.
-    try {
-      // Maybe this is an overlay, with the video element under it
-      // Use the (x, y) location to guess at a <video> element
-      let elements = aElement.ownerDocument.querySelectorAll("video");
-      for (let element of elements) {
-        // Look for a video element contained in the overlay bounds
-        let rect = element.getBoundingClientRect();
-        if (aY >= rect.top && aX >= rect.left && aY <= rect.bottom && aX <= rect.right) {
-          video = this._getVideo(element);
-          if (video) {
-            break;
-          }
-        }
-      }
-    } catch(e) {}
-
-    // Could be null
-    return video;
-  },
-
-  _getVideo: function(aElement) {
-    // Given the hardware support for H264, let's only look for 'mp4' sources
-    if (!aElement instanceof HTMLVideoElement) {
-      return null;
-    }
-
-    function allowableExtension(aURI) {
-      if (aURI && aURI instanceof Ci.nsIURL) {
-        return (aURI.fileExtension == "mp4");
-      }
-      return false;
-    }
-
-    // Grab the poster attribute from the <video>
-    let posterURL = aElement.poster;
-
-    // First, look to see if the <video> has a src attribute
-    let sourceURL = aElement.src;
-
-    // If empty, try the currentSrc
-    if (!sourceURL) {
-      sourceURL = aElement.currentSrc;
-    }
-
-    if (sourceURL) {
-      // Use the file extension to guess the mime type
-      let sourceURI = this.makeURI(sourceURL, null, this.makeURI(aElement.baseURI));
-      if (allowableExtension(sourceURI)) {
-        return { video: aElement, source: sourceURI.spec, poster: posterURL };
-      }
-    }
-
-    // Next, look to see if there is a <source> child element that meets
-    // our needs
-    let sourceNodes = aElement.getElementsByTagName("source");
-    for (let sourceNode of sourceNodes) {
-      let sourceURI = this.makeURI(sourceNode.src, null, this.makeURI(sourceNode.baseURI));
-
-      // Using the type attribute is our ideal way to guess the mime type. Otherwise,
-      // fallback to using the file extension to guess the mime type
-      if (sourceNode.type == "video/mp4" || allowableExtension(sourceURI)) {
-        return { video: aElement, source: sourceURI.spec, poster: posterURL };
-      }
-    }
-
-    return null;
-  },
-
-  filterCast: {
-    matches: function(aElement, aX, aY) {
-      if (SimpleServiceDiscovery.services.length == 0)
-        return false;
-      let video = CastingApps.getVideo(aElement, aX, aY);
-      if (CastingApps.session) {
-        return (video && CastingApps.session.data.source != video.source);
-      }
-      return (video != null);
-    }
-  },
-
-  prompt: function(aCallback) {
-    let items = [];
-    SimpleServiceDiscovery.services.forEach(function(aService) {
-      let item = {
-        label: aService.friendlyName,
-        selected: false
-      };
-      items.push(item);
-    });
-
-    let prompt = new Prompt({
-      title: Strings.browser.GetStringFromName("casting.prompt")
-    }).setSingleChoiceItems(items).show(function(data) {
-      let selected = data.button;
-      let service = selected == -1 ? null : SimpleServiceDiscovery.services[selected];
-      if (aCallback)
-        aCallback(service);
-    });
-  },
-
-  openExternal: function(aElement, aX, aY) {
-    // Start a second screen media service
-    let video = this.getVideo(aElement, aX, aY);
-    if (!video) {
-      return;
-    }
-
-    this.prompt(function(aService) {
-      if (!aService)
-        return;
-
-      // Make sure we have a player app for the given service
-      let app = SimpleServiceDiscovery.findAppForService(aService, "video-sharing");
-      if (!app)
-        return;
-
-      video.title = aElement.ownerDocument.defaultView.top.document.title;
-      if (video.element) {
-        // If the video is currently playing on the device, pause it
-        if (!video.element.paused) {
-          video.element.pause();
-        }
-      }
-
-      app.stop(function() {
-        app.start("", function() {
-          app.remoteMedia(function(aRemoteMedia) {
-            this.session = {
-              service: aService,
-              app: app,
-              remoteMedia: aRemoteMedia,
-              data: {
-                title: video.title,
-                source: video.source,
-                poster: video.poster
-              }
-            };
-          }.bind(this), this);
-        }.bind(this));
-      }.bind(this));
-    }.bind(this));
-  },
-
-  // RemoteMedia callback API methods
-  onRemoteMediaStart: function(aRemoteMedia) {
-    if (!this.session) {
-      return;
-    }
-
-    aRemoteMedia.load(this.session.data);
-    sendMessageToJava({ type: "Casting:Started", device: this.session.service.friendlyName });
-  },
-
-  onRemoteMediaStop: function(aRemoteMedia) {
-    sendMessageToJava({ type: "Casting:Stopped" });
-  },
-
-  onRemoteMediaStatus: function(aRemoteMedia) {
-    if (!this.session) {
-      return;
-    }
-
-    let status = aRemoteMedia.status;
-    if (status == "completed") {
-      aRemoteMedia.shutdown();
-      this.session.app.stop();
-      delete this.session;
-    }
-  }
-};
-
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -58,19 +58,16 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 
 XPCOMUtils.defineLazyModuleGetter(this, "FormHistory",
                                   "resource://gre/modules/FormHistory.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this, "uuidgen",
                                    "@mozilla.org/uuid-generator;1",
                                    "nsIUUIDGenerator");
 
-XPCOMUtils.defineLazyModuleGetter(this, "SimpleServiceDiscovery",
-                                  "resource://gre/modules/SimpleServiceDiscovery.jsm");
-
 #ifdef NIGHTLY_BUILD
 XPCOMUtils.defineLazyModuleGetter(this, "ShumwayUtils",
                                   "resource://shumway/ShumwayUtils.jsm");
 #endif
 
 #ifdef MOZ_ANDROID_SYNTHAPKS
 XPCOMUtils.defineLazyModuleGetter(this, "WebappManager",
                                   "resource://gre/modules/WebappManager.jsm");
@@ -80,17 +77,16 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 [
   ["SelectHelper", "chrome://browser/content/SelectHelper.js"],
   ["InputWidgetHelper", "chrome://browser/content/InputWidgetHelper.js"],
   ["AboutReader", "chrome://browser/content/aboutReader.js"],
   ["MasterPassword", "chrome://browser/content/MasterPassword.js"],
   ["PluginHelper", "chrome://browser/content/PluginHelper.js"],
   ["OfflineApps", "chrome://browser/content/OfflineApps.js"],
   ["Linkifier", "chrome://browser/content/Linkify.js"],
-  ["CastingApps", "chrome://browser/content/CastingApps.js"],
 ].forEach(function (aScript) {
   let [name, script] = aScript;
   XPCOMUtils.defineLazyGetter(window, name, function() {
     let sandbox = {};
     Services.scriptloader.loadSubScript(script, sandbox);
     return sandbox[name];
   });
 });
@@ -385,17 +381,16 @@ var BrowserApp = {
     Cu.import("resource://gre/modules/AppsUtils.jsm");
 #else
     WebappsUI.init();
 #endif
     RemoteDebugger.init();
     Reader.init();
     UserAgentOverrides.init();
     DesktopUserAgent.init();
-    CastingApps.init();
     Distribution.init();
     Tabs.init();
 #ifdef ACCESSIBILITY
     AccessFu.attach(window);
 #endif
 #ifdef NIGHTLY_BUILD
     ShumwayUtils.init();
 #endif
@@ -727,17 +722,16 @@ var BrowserApp = {
 #ifndef MOZ_ANDROID_SYNTHAPKS
     WebappsUI.uninit();
 #endif
     RemoteDebugger.uninit();
     Reader.uninit();
     UserAgentOverrides.uninit();
     DesktopUserAgent.uninit();
     ExternalApps.uninit();
-    CastingApps.uninit();
     Distribution.uninit();
     Tabs.uninit();
   },
 
   // This function returns false during periods where the browser displayed document is
   // different from the browser content document, so user actions and some kinds of viewport
   // updates should be ignored. This period starts when we start loading a new page or
   // switch tabs, and ends when the new browser content document has been drawn and handed
--- a/mobile/android/chrome/jar.mn
+++ b/mobile/android/chrome/jar.mn
@@ -48,17 +48,16 @@ chrome.jar:
   content/PluginHelper.js              (content/PluginHelper.js)
   content/OfflineApps.js               (content/OfflineApps.js)
   content/MasterPassword.js            (content/MasterPassword.js)
   content/FindHelper.js                (content/FindHelper.js)
   content/PermissionsHelper.js         (content/PermissionsHelper.js)
   content/FeedHandler.js               (content/FeedHandler.js)
   content/Feedback.js                  (content/Feedback.js)
   content/Linkify.js                   (content/Linkify.js)
-  content/CastingApps.js               (content/CastingApps.js)
 #ifdef MOZ_SERVICES_HEALTHREPORT
   content/aboutHealthReport.xhtml      (content/aboutHealthReport.xhtml)
 * content/aboutHealthReport.js         (content/aboutHealthReport.js)
 #endif
   content/aboutAccounts.xhtml          (content/aboutAccounts.xhtml)
 * content/aboutAccounts.js             (content/aboutAccounts.js)
 
 % content branding %content/branding/
--- a/mobile/android/locales/en-US/chrome/browser.properties
+++ b/mobile/android/locales/en-US/chrome/browser.properties
@@ -154,19 +154,16 @@ browser.menu.showCharacterEncoding=false
 
 # LOCALIZATION NOTE (intl.charsetmenu.browser.static): Set to a series of comma separated
 # values for charsets that the user can select from in the Character Encoding menu.
 intl.charsetmenu.browser.static=iso-8859-1,utf-8,big5,iso-2022-jp,shift_jis,euc-jp
 
 # Text Selection
 selectionHelper.textCopied=Text copied to clipboard
 
-# Casting
-casting.prompt=Cast to Device
-
 # Context menu
 contextmenu.openInNewTab=Open Link in New Tab
 contextmenu.openInPrivateTab=Open Link in Private Tab
 contextmenu.addToReadingList=Add to Reading List
 contextmenu.share=Share
 contextmenu.copyLink=Copy Link
 contextmenu.shareLink=Share Link
 contextmenu.bookmarkLink=Bookmark Link
@@ -189,17 +186,16 @@ contextmenu.playMedia=Play
 contextmenu.pauseMedia=Pause
 contextmenu.shareMedia=Share Video
 contextmenu.showControls2=Show Controls
 contextmenu.mute=Mute
 contextmenu.unmute=Unmute
 contextmenu.saveVideo=Save Video
 contextmenu.saveAudio=Save Audio
 contextmenu.addToContacts=Add to Contacts
-contextmenu.castToScreen=Cast to Screen
 
 contextmenu.copy=Copy
 contextmenu.cut=Cut
 contextmenu.selectAll=Select All
 contextmenu.paste=Paste
 
 # Select UI
 selectHelper.closeMultipleSelectDialog=Done