@@ -1141,7 +1025,6 @@ loop.shared.views = (function(_, mozL10n) {
MediaView: MediaView,
LoadingView: LoadingView,
SettingsControlButton: SettingsControlButton,
- ScreenShareControlButton: ScreenShareControlButton,
NotificationListView: NotificationListView
};
})(_, navigator.mozL10n || document.mozL10n);
diff --git a/browser/extensions/loop/standalone/content/l10n/en-US/loop.properties b/browser/extensions/loop/standalone/content/l10n/en-US/loop.properties
index 9a2102b4f16..d27774ab063 100644
--- a/browser/extensions/loop/standalone/content/l10n/en-US/loop.properties
+++ b/browser/extensions/loop/standalone/content/l10n/en-US/loop.properties
@@ -12,8 +12,6 @@ mute_local_audio_button_title=Mute your audio
unmute_local_audio_button_title=Unmute your audio
mute_local_video_button_title2=Disable video
unmute_local_video_button_title2=Enable video
-active_screenshare_button_title=Stop sharing
-inactive_screenshare_button_title=Share your screen
welcome=Welcome to the {{clientShortname}} web client.
incompatible_browser_heading=Oops!
diff --git a/browser/extensions/loop/test/desktop-local/roomViews_test.js b/browser/extensions/loop/test/desktop-local/roomViews_test.js
index 4c9738cd528..58e2cdd6b5f 100644
--- a/browser/extensions/loop/test/desktop-local/roomViews_test.js
+++ b/browser/extensions/loop/test/desktop-local/roomViews_test.js
@@ -400,11 +400,9 @@ describe("loop.roomViews", function() {
expect(muteBtn.classList.contains("muted")).eql(true);
});
- it("should dispatch a `StartScreenShare` action when sharing is not active and the screen share button is pressed", function() {
+ it("should dispatch a `SetMute` action when the mute button is pressed", function() {
view = mountTestComponent();
- view.setState({ screenSharingState: SCREEN_SHARE_STATES.INACTIVE });
-
var muteBtn = view.getDOMNode().querySelector(".btn-mute-video");
React.addons.TestUtils.Simulate.click(muteBtn);
diff --git a/browser/extensions/loop/test/functional/test_1_browser_call.py b/browser/extensions/loop/test/functional/test_1_browser_call.py
index de09997d175..0890762934e 100644
--- a/browser/extensions/loop/test/functional/test_1_browser_call.py
+++ b/browser/extensions/loop/test/functional/test_1_browser_call.py
@@ -186,12 +186,6 @@ class Test1BrowserCall(MarionetteTestCase):
self.switch_to_chatbox()
self.check_received_message("test2")
- def local_enable_screenshare(self):
- self.switch_to_chatbox()
- button = self.marionette.find_element(By.CLASS_NAME, "btn-screen-share")
-
- button.click()
-
def standalone_check_remote_screenshare(self):
self.switch_to_standalone()
self.check_video(".screen-share-video")
@@ -293,10 +287,8 @@ class Test1BrowserCall(MarionetteTestCase):
# the start time
self.local_check_media_start_time_initialized()
- # XXX To enable this, we either need to navigate the permissions prompt
- # or have a route where we don't need the permissions prompt.
- # self.local_enable_screenshare()
- # self.standalone_check_remote_screenshare()
+ # Check that screenshare was automatically started
+ self.standalone_check_remote_screenshare()
# We hangup on the remote (standalone) side, because this also leaves
# the local chatbox with the local publishing media still connected,
diff --git a/browser/extensions/loop/test/shared/activeRoomStore_test.js b/browser/extensions/loop/test/shared/activeRoomStore_test.js
index b9c7dfd3965..fd1a977ce69 100644
--- a/browser/extensions/loop/test/shared/activeRoomStore_test.js
+++ b/browser/extensions/loop/test/shared/activeRoomStore_test.js
@@ -199,9 +199,7 @@ describe("loop.store.ActiveRoomStore", function() {
it("should remove the sharing listener", function() {
// Setup the listener.
- store.startScreenShare(new sharedActions.StartScreenShare({
- type: "browser"
- }));
+ store.startBrowserShare(new sharedActions.StartBrowserShare());
// Now simulate room failure.
store.roomFailure(new sharedActions.RoomFailure({
@@ -1257,9 +1255,7 @@ describe("loop.store.ActiveRoomStore", function() {
it("should remove the sharing listener", function() {
// Setup the listener.
- store.startScreenShare(new sharedActions.StartScreenShare({
- type: "browser"
- }));
+ store.startBrowserShare(new sharedActions.StartBrowserShare());
// Now simulate connection failure.
store.connectionFailure(connectionFailureAction);
@@ -1539,15 +1535,13 @@ describe("loop.store.ActiveRoomStore", function() {
});
});
- describe("#startScreenShare", function() {
+ describe("#startBrowserShare", function() {
afterEach(function() {
store.endScreenShare();
});
it("should set the state to 'pending'", function() {
- store.startScreenShare(new sharedActions.StartScreenShare({
- type: "window"
- }));
+ store.startBrowserShare(new sharedActions.StartBrowserShare());
sinon.assert.calledOnce(dispatcher.dispatch);
sinon.assert.calledWith(dispatcher.dispatch,
@@ -1556,29 +1550,14 @@ describe("loop.store.ActiveRoomStore", function() {
}));
});
- it("should invoke the SDK driver with the correct options for window sharing", function() {
- store.startScreenShare(new sharedActions.StartScreenShare({
- type: "window"
- }));
-
- sinon.assert.calledOnce(fakeSdkDriver.startScreenShare);
- sinon.assert.calledWith(fakeSdkDriver.startScreenShare, {
- videoSource: "window"
- });
- });
-
it("should add a browser sharing listener for tab sharing", function() {
- store.startScreenShare(new sharedActions.StartScreenShare({
- type: "browser"
- }));
+ store.startBrowserShare(new sharedActions.StartBrowserShare());
sinon.assert.calledOnce(requestStubs.AddBrowserSharingListener);
});
it("should invoke the SDK driver with the correct options for tab sharing", function() {
- store.startScreenShare(new sharedActions.StartScreenShare({
- type: "browser"
- }));
+ store.startBrowserShare(new sharedActions.StartBrowserShare());
sinon.assert.calledOnce(fakeSdkDriver.startScreenShare);
sinon.assert.calledWith(fakeSdkDriver.startScreenShare, {
@@ -1593,9 +1572,7 @@ describe("loop.store.ActiveRoomStore", function() {
describe("Screen share Events", function() {
beforeEach(function() {
- store.startScreenShare(new sharedActions.StartScreenShare({
- type: "browser"
- }));
+ store.startBrowserShare(new sharedActions.StartBrowserShare());
store.setStoreState({
screenSharingState: SCREEN_SHARE_STATES.ACTIVE
@@ -1652,9 +1629,7 @@ describe("loop.store.ActiveRoomStore", function() {
it("should remove the sharing listener", function() {
// Setup the listener.
- store.startScreenShare(new sharedActions.StartScreenShare({
- type: "browser"
- }));
+ store.startBrowserShare(new sharedActions.StartBrowserShare());
// Now stop the screen share.
store.endScreenShare();
@@ -1807,9 +1782,7 @@ describe("loop.store.ActiveRoomStore", function() {
it("should remove the sharing listener", function() {
// Setup the listener.
- store.startScreenShare(new sharedActions.StartScreenShare({
- type: "browser"
- }));
+ store.startBrowserShare(new sharedActions.StartBrowserShare());
// Now unload the window.
store.windowUnload();
@@ -1864,9 +1837,7 @@ describe("loop.store.ActiveRoomStore", function() {
it("should remove the sharing listener", function() {
// Setup the listener.
- store.startScreenShare(new sharedActions.StartScreenShare({
- type: "browser"
- }));
+ store.startBrowserShare(new sharedActions.StartBrowserShare());
// Now leave the room.
store.leaveRoom();
diff --git a/browser/extensions/loop/test/shared/views_test.js b/browser/extensions/loop/test/shared/views_test.js
index b71ccbcb09b..5f3036ba5a2 100644
--- a/browser/extensions/loop/test/shared/views_test.js
+++ b/browser/extensions/loop/test/shared/views_test.js
@@ -11,7 +11,6 @@ describe("loop.shared.views", function() {
var sharedActions = loop.shared.actions;
var sharedModels = loop.shared.models;
var sharedViews = loop.shared.views;
- var SCREEN_SHARE_STATES = loop.shared.utils.SCREEN_SHARE_STATES;
var getReactElementByClass = TestUtils.findRenderedDOMComponentWithClass;
var sandbox, fakeAudioXHR, dispatcher, OS, OSVersion;
@@ -109,186 +108,6 @@ describe("loop.shared.views", function() {
});
});
- describe("ScreenShareControlButton", function() {
- it("should render a visible share button", function() {
- var comp = TestUtils.renderIntoDocument(
- React.createElement(sharedViews.ScreenShareControlButton, {
- dispatcher: dispatcher,
- visible: true,
- state: SCREEN_SHARE_STATES.INACTIVE
- }));
-
- expect(comp.getDOMNode().classList.contains("active")).eql(false);
- expect(comp.getDOMNode().classList.contains("disabled")).eql(false);
- });
-
- it("should render a disabled share button when share is pending", function() {
- var comp = TestUtils.renderIntoDocument(
- React.createElement(sharedViews.ScreenShareControlButton, {
- dispatcher: dispatcher,
- visible: true,
- state: SCREEN_SHARE_STATES.PENDING
- }));
-
- var node = comp.getDOMNode().querySelector(".btn-screen-share");
- expect(node.classList.contains("active")).eql(false);
- expect(node.classList.contains("disabled")).eql(true);
- });
-
- it("should render an active share button", function() {
- var comp = TestUtils.renderIntoDocument(
- React.createElement(sharedViews.ScreenShareControlButton, {
- dispatcher: dispatcher,
- visible: true,
- state: SCREEN_SHARE_STATES.ACTIVE
- }));
-
- var node = comp.getDOMNode().querySelector(".btn-screen-share");
- expect(node.classList.contains("active")).eql(true);
- expect(node.classList.contains("disabled")).eql(false);
- });
-
- it("should show the screenshare dropdown on click when the state is not active",
- function() {
- var comp = TestUtils.renderIntoDocument(
- React.createElement(sharedViews.ScreenShareControlButton, {
- dispatcher: dispatcher,
- visible: true,
- state: SCREEN_SHARE_STATES.INACTIVE
- }));
-
- expect(comp.state.showMenu).eql(false);
-
- TestUtils.Simulate.click(comp.getDOMNode().querySelector(".btn-screen-share"));
-
- expect(comp.state.showMenu).eql(true);
- });
-
- it("should dispatch a 'browser' StartScreenShare action on option click",
- function() {
- var comp = TestUtils.renderIntoDocument(
- React.createElement(sharedViews.ScreenShareControlButton, {
- dispatcher: dispatcher,
- visible: true,
- state: SCREEN_SHARE_STATES.INACTIVE
- }));
-
- TestUtils.Simulate.click(comp.getDOMNode().querySelector(
- ".screen-share-menu > li"));
-
- sinon.assert.calledOnce(dispatcher.dispatch);
- sinon.assert.calledWithExactly(dispatcher.dispatch,
- new sharedActions.StartScreenShare({ type: "browser" }));
- });
-
- it("should close the dropdown on 'browser' option click", function() {
- var comp = TestUtils.renderIntoDocument(
- React.createElement(sharedViews.ScreenShareControlButton, {
- dispatcher: dispatcher,
- visible: true,
- state: SCREEN_SHARE_STATES.INACTIVE
- }));
-
- sandbox.stub(comp, "hideDropdownMenu");
-
- TestUtils.Simulate.click(comp.getDOMNode().querySelector(
- ".screen-share-menu > li"));
-
- sinon.assert.calledOnce(comp.hideDropdownMenu);
- });
-
- it("should dispatch a 'window' StartScreenShare action on option click",
- function() {
- var comp = TestUtils.renderIntoDocument(
- React.createElement(sharedViews.ScreenShareControlButton, {
- dispatcher: dispatcher,
- visible: true,
- state: SCREEN_SHARE_STATES.INACTIVE
- }));
-
- TestUtils.Simulate.click(comp.getDOMNode().querySelector(
- ".screen-share-menu > li:last-child"));
-
- sinon.assert.calledOnce(dispatcher.dispatch);
- sinon.assert.calledWithExactly(dispatcher.dispatch,
- new sharedActions.StartScreenShare({ type: "window" }));
- });
-
- it("should close the dropdown on 'window' option click", function() {
- var comp = TestUtils.renderIntoDocument(
- React.createElement(sharedViews.ScreenShareControlButton, {
- dispatcher: dispatcher,
- visible: true,
- state: SCREEN_SHARE_STATES.INACTIVE
- }));
-
- sandbox.stub(comp, "hideDropdownMenu");
-
- TestUtils.Simulate.click(comp.getDOMNode().querySelector(
- ".screen-share-menu > li:last-child"));
-
- sinon.assert.calledOnce(comp.hideDropdownMenu);
- });
-
- it("should have the 'window' option enabled", function() {
- var comp = TestUtils.renderIntoDocument(
- React.createElement(sharedViews.ScreenShareControlButton, {
- dispatcher: dispatcher,
- visible: true,
- state: SCREEN_SHARE_STATES.INACTIVE
- }));
-
- var node = comp.getDOMNode().querySelector(".screen-share-menu > li:last-child");
- expect(node.classList.contains("disabled")).eql(false);
- });
-
- it("should disable the 'window' option on Windows XP", function() {
- OS = "win";
- OSVersion = { major: 5, minor: 1 };
-
- var comp = TestUtils.renderIntoDocument(
- React.createElement(sharedViews.ScreenShareControlButton, {
- dispatcher: dispatcher,
- visible: true,
- state: SCREEN_SHARE_STATES.INACTIVE
- }));
-
- var node = comp.getDOMNode().querySelector(".screen-share-menu > li:last-child");
- expect(node.classList.contains("disabled")).eql(true);
- });
-
- it("should disable the 'window' option on OSX 10.6", function() {
- OS = "mac";
- OSVersion = { major: 10, minor: 6 };
-
- var comp = TestUtils.renderIntoDocument(
- React.createElement(sharedViews.ScreenShareControlButton, {
- dispatcher: dispatcher,
- visible: true,
- state: SCREEN_SHARE_STATES.INACTIVE
- }));
-
- var node = comp.getDOMNode().querySelector(".screen-share-menu > li:last-child");
- expect(node.classList.contains("disabled")).eql(true);
- });
-
- it("should dispatch a EndScreenShare action on click when the state is active",
- function() {
- var comp = TestUtils.renderIntoDocument(
- React.createElement(sharedViews.ScreenShareControlButton, {
- dispatcher: dispatcher,
- visible: true,
- state: SCREEN_SHARE_STATES.ACTIVE
- }));
-
- TestUtils.Simulate.click(comp.getDOMNode().querySelector(".btn-screen-share"));
-
- sinon.assert.calledOnce(dispatcher.dispatch);
- sinon.assert.calledWithExactly(dispatcher.dispatch,
- new sharedActions.EndScreenShare({}));
- });
- });
-
describe("SettingsControlButton", function() {
var requestStubs;
var support_url = "https://support.com";
diff --git a/browser/extensions/loop/ui/ui-showcase.js b/browser/extensions/loop/ui/ui-showcase.js
index 59c984e7b14..eade7818e9e 100644
--- a/browser/extensions/loop/ui/ui-showcase.js
+++ b/browser/extensions/loop/ui/ui-showcase.js
@@ -38,7 +38,6 @@
var ROOM_STATES = loop.store.ROOM_STATES;
var CALL_TYPES = loop.shared.utils.CALL_TYPES;
var FAILURE_DETAILS = loop.shared.utils.FAILURE_DETAILS;
- var SCREEN_SHARE_STATES = loop.shared.utils.SCREEN_SHARE_STATES;
// Local helpers
function returnTrue() {
@@ -743,7 +742,6 @@
dispatcher: dispatcher,
hangup: noop,
publishStream: noop,
- screenShare: { state: SCREEN_SHARE_STATES.INACTIVE, visible: true},
settingsMenuItems: [{ id: "feedback" }],
show: true,
video: { enabled: true, visible: true}})
@@ -751,14 +749,13 @@
),
React.createElement(FramedExample, {dashed: true,
height: 56,
- summary: "Video muted, Screen share pending",
+ summary: "Video muted",
width: 300},
React.createElement("div", {className: "fx-embedded"},
React.createElement(ConversationToolbar, {audio: { enabled: true, visible: true},
dispatcher: dispatcher,
hangup: noop,
publishStream: noop,
- screenShare: { state: SCREEN_SHARE_STATES.PENDING, visible: true},
settingsMenuItems: [{ id: "feedback" }],
show: true,
video: { enabled: false, visible: true}})
@@ -766,14 +763,13 @@
),
React.createElement(FramedExample, {dashed: true,
height: 56,
- summary: "Audio muted, Screen share active",
+ summary: "Audio muted",
width: 300},
React.createElement("div", {className: "fx-embedded"},
React.createElement(ConversationToolbar, {audio: { enabled: false, visible: true},
dispatcher: dispatcher,
hangup: noop,
publishStream: noop,
- screenShare: { state: SCREEN_SHARE_STATES.ACTIVE, visible: true},
settingsMenuItems: [{ id: "feedback" }],
show: true,
video: { enabled: true, visible: true}})
diff --git a/browser/extensions/loop/ui/ui-showcase.jsx b/browser/extensions/loop/ui/ui-showcase.jsx
index 17c24c57f6f..1acd89a7322 100644
--- a/browser/extensions/loop/ui/ui-showcase.jsx
+++ b/browser/extensions/loop/ui/ui-showcase.jsx
@@ -38,7 +38,6 @@
var ROOM_STATES = loop.store.ROOM_STATES;
var CALL_TYPES = loop.shared.utils.CALL_TYPES;
var FAILURE_DETAILS = loop.shared.utils.FAILURE_DETAILS;
- var SCREEN_SHARE_STATES = loop.shared.utils.SCREEN_SHARE_STATES;
// Local helpers
function returnTrue() {
@@ -743,7 +742,6 @@
dispatcher={dispatcher}
hangup={noop}
publishStream={noop}
- screenShare={{ state: SCREEN_SHARE_STATES.INACTIVE, visible: true }}
settingsMenuItems={[{ id: "feedback" }]}
show={true}
video={{ enabled: true, visible: true }} />
@@ -751,14 +749,13 @@
@@ -766,14 +763,13 @@
diff --git a/browser/locales/en-US/chrome/browser/loop/loop.properties b/browser/locales/en-US/chrome/browser/loop/loop.properties
index b27e1e57287..efcdb5247a7 100644
--- a/browser/locales/en-US/chrome/browser/loop/loop.properties
+++ b/browser/locales/en-US/chrome/browser/loop/loop.properties
@@ -104,10 +104,6 @@ mute_local_audio_button_title=Mute your audio
unmute_local_audio_button_title=Unmute your audio
mute_local_video_button_title2=Disable video
unmute_local_video_button_title2=Enable video
-active_screenshare_button_title=Stop sharing
-inactive_screenshare_button_title=Share your screen
-share_tabs_button_title2=Share your Tabs
-share_windows_button_title=Share other Windows
self_view_hidden_message=Self-view hidden but still being sent; resize window to show