diff --git a/browser/components/uitour/test/browser_UITour_loop.js b/browser/components/uitour/test/browser_UITour_loop.js index 0f6a6ba38c1..97b4093a4e8 100644 --- a/browser/components/uitour/test/browser_UITour_loop.js +++ b/browser/components/uitour/test/browser_UITour_loop.js @@ -9,8 +9,8 @@ var gContentWindow; var loopButton; var loopPanel = document.getElementById("loop-notification-panel"); -const { LoopRooms } = Components.utils.import("resource:///modules/loop/LoopRooms.jsm", {}); -const { MozLoopServiceInternal } = Cu.import("resource:///modules/loop/MozLoopService.jsm", {}); +const { LoopRooms } = Components.utils.import("chrome://loop/content/modules/LoopRooms.jsm", {}); +const { MozLoopServiceInternal } = Cu.import("chrome://loop/content/modules/MozLoopService.jsm", {}); function test() { UITourTest(); diff --git a/browser/extensions/loop/README.txt b/browser/extensions/loop/README.txt index 4903e0866a1..7b23f46e2e2 100644 --- a/browser/extensions/loop/README.txt +++ b/browser/extensions/loop/README.txt @@ -22,9 +22,9 @@ using npm in order to compile the .jsx files into regular .js ones: npm install -g react-tools@0.12.2 Once installed, run build-jsx with the --watch option from -browser/components/loop, eg.: +browser/extensions/loop, eg.: - cd browser/components/loop + cd browser/extensions/loop ./build-jsx --watch build-jsx can also be do a one-time compile pass instead of watching if @@ -36,7 +36,7 @@ Hacking ======= Please be sure to execute - browser/components/loop/run-all-loop-tests.sh + browser/extensions/loop/run-all-loop-tests.sh from the top level before requesting review on a patch. @@ -52,7 +52,7 @@ If you install eslint and the react plugin globally: npm install -g eslint npm install -g eslint-plugin-react -You can also run it by hand in the browser/components/loop directory: +You can also run it by hand in the browser/extensions/loop directory: eslint --ext .js --ext .jsx --ext .jsm . @@ -88,7 +88,7 @@ install that is properly configured. From the top-level gecko directory, execute: export LOOP_SERVER=/Users/larry/src/loop-server - ./mach marionette-test browser/components/loop/test/functional/manifest.ini + ./mach marionette-test browser/extensions/loop/test/functional/manifest.ini Once the automation is complete, we'll include this in run-all-loop-tests.sh as well. diff --git a/browser/extensions/loop/bootstrap.js b/browser/extensions/loop/bootstrap.js index 90be7de3e68..3626102d6a2 100644 --- a/browser/extensions/loop/bootstrap.js +++ b/browser/extensions/loop/bootstrap.js @@ -409,7 +409,7 @@ var WindowListener = { } this.activeSound = new window.Audio(); - this.activeSound.src = `chrome://browser/content/loop/shared/sounds/${name}.ogg`; + this.activeSound.src = `chrome://loop/content/shared/sounds/${name}.ogg`; this.activeSound.load(); this.activeSound.play(); @@ -610,9 +610,9 @@ var WindowListener = { }; XPCOMUtils.defineLazyModuleGetter(LoopUI, "hookWindowCloseForPanelClose", "resource://gre/modules/MozSocialAPI.jsm"); - XPCOMUtils.defineLazyModuleGetter(LoopUI, "LoopAPI", "resource:///modules/loop/MozLoopAPI.jsm"); - XPCOMUtils.defineLazyModuleGetter(LoopUI, "LoopRooms", "resource:///modules/loop/LoopRooms.jsm"); - XPCOMUtils.defineLazyModuleGetter(LoopUI, "MozLoopService", "resource:///modules/loop/MozLoopService.jsm"); + XPCOMUtils.defineLazyModuleGetter(LoopUI, "LoopAPI", "chrome://loop/content/modules/MozLoopAPI.jsm"); + XPCOMUtils.defineLazyModuleGetter(LoopUI, "LoopRooms", "chrome://loop/content/modules/LoopRooms.jsm"); + XPCOMUtils.defineLazyModuleGetter(LoopUI, "MozLoopService", "chrome://loop/content/modules/MozLoopService.jsm"); XPCOMUtils.defineLazyModuleGetter(LoopUI, "PanelFrame", "resource:///modules/PanelFrame.jsm"); XPCOMUtils.defineLazyModuleGetter(LoopUI, "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm"); } diff --git a/browser/extensions/loop/build-jsx b/browser/extensions/loop/build-jsx index be95fd1a06b..e8bc4801229 100755 --- a/browser/extensions/loop/build-jsx +++ b/browser/extensions/loop/build-jsx @@ -74,7 +74,7 @@ def find_react_command(): return [node, jsx_path] -SHARED_LIBS_DIR=os.path.join(os.path.dirname(__file__), "content", "shared", "libs") +SHARED_LIBS_DIR=os.path.join(os.path.dirname(__file__), "content", "shared", "vendor") REACT_VERSION=find_react_version(SHARED_LIBS_DIR) src_files = [] # files to be compiled @@ -99,7 +99,7 @@ else: # parse the CLI arguments description = 'Loop build tool for JSX files. ' + \ 'Will scan entire loop directory and compile them in place. ' + \ - 'Must be executed from browser/components/loop directory.' + 'Must be executed from browser/extensions/loop directory.' parser = argparse.ArgumentParser(description=description) parser.add_argument('--watch', '-w', action='store_true', help='continuous' + diff --git a/browser/extensions/loop/content/modules/LoopRooms.jsm b/browser/extensions/loop/content/modules/LoopRooms.jsm index 22b5541e270..7665ef5e961 100644 --- a/browser/extensions/loop/content/modules/LoopRooms.jsm +++ b/browser/extensions/loop/content/modules/LoopRooms.jsm @@ -10,7 +10,7 @@ Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/Task.jsm"); Cu.import("resource://gre/modules/Timer.jsm"); -const { MozLoopService, LOOP_SESSION_TYPE } = Cu.import("resource:///modules/loop/MozLoopService.jsm", {}); +const { MozLoopService, LOOP_SESSION_TYPE } = Cu.import("chrome://loop/content/modules/MozLoopService.jsm", {}); XPCOMUtils.defineLazyModuleGetter(this, "Promise", "resource://gre/modules/Promise.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "CommonUtils", @@ -27,11 +27,11 @@ XPCOMUtils.defineLazyGetter(this, "gLoopBundle", function() { }); XPCOMUtils.defineLazyModuleGetter(this, "LoopRoomsCache", - "resource:///modules/loop/LoopRoomsCache.jsm"); + "chrome://loop/content/modules/LoopRoomsCache.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "loopUtils", - "resource:///modules/loop/utils.js", "utils"); + "chrome://loop/content/modules/utils.js", "utils"); XPCOMUtils.defineLazyModuleGetter(this, "loopCrypto", - "resource:///modules/loop/crypto.js", "LoopCrypto"); + "chrome://loop/content/shared/js/crypto.js", "LoopCrypto"); XPCOMUtils.defineLazyModuleGetter(this, "ObjectUtils", "resource://gre/modules/ObjectUtils.jsm"); diff --git a/browser/extensions/loop/content/modules/LoopRoomsCache.jsm b/browser/extensions/loop/content/modules/LoopRoomsCache.jsm index f1265a6611b..de123d2e3d6 100644 --- a/browser/extensions/loop/content/modules/LoopRoomsCache.jsm +++ b/browser/extensions/loop/content/modules/LoopRoomsCache.jsm @@ -9,7 +9,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/Task.jsm"); const { MozLoopService, LOOP_SESSION_TYPE } = - Cu.import("resource:///modules/loop/MozLoopService.jsm", {}); + Cu.import("chrome://loop/content/modules/MozLoopService.jsm", {}); XPCOMUtils.defineLazyModuleGetter(this, "CommonUtils", "resource://services-common/utils.js"); XPCOMUtils.defineLazyModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm"); diff --git a/browser/extensions/loop/content/modules/MozLoopAPI.jsm b/browser/extensions/loop/content/modules/MozLoopAPI.jsm index 70638ee9fe3..49f4a30b260 100644 --- a/browser/extensions/loop/content/modules/MozLoopAPI.jsm +++ b/browser/extensions/loop/content/modules/MozLoopAPI.jsm @@ -9,8 +9,8 @@ const { classes: Cc, interfaces: Ci, utils: Cu } = Components; Cu.import("resource://services-common/utils.js"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -Cu.import("resource:///modules/loop/MozLoopService.jsm"); -Cu.import("resource:///modules/loop/LoopRooms.jsm"); +Cu.import("chrome://loop/content/modules/MozLoopService.jsm"); +Cu.import("chrome://loop/content/modules/LoopRooms.jsm"); Cu.importGlobalProperties(["Blob"]); XPCOMUtils.defineLazyModuleGetter(this, "PageMetadata", diff --git a/browser/extensions/loop/content/modules/MozLoopPushHandler.jsm b/browser/extensions/loop/content/modules/MozLoopPushHandler.jsm index 8be93ff80f7..cb10cea3f6a 100644 --- a/browser/extensions/loop/content/modules/MozLoopPushHandler.jsm +++ b/browser/extensions/loop/content/modules/MozLoopPushHandler.jsm @@ -10,7 +10,7 @@ Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Timer.jsm"); -const { MozLoopService } = Cu.import("resource:///modules/loop/MozLoopService.jsm", {}); +const { MozLoopService } = Cu.import("chrome://loop/content/modules/MozLoopService.jsm", {}); const consoleLog = MozLoopService.log; this.EXPORTED_SYMBOLS = ["MozLoopPushHandler"]; diff --git a/browser/extensions/loop/content/modules/MozLoopService.jsm b/browser/extensions/loop/content/modules/MozLoopService.jsm index 15c8bae3077..43e3c560937 100644 --- a/browser/extensions/loop/content/modules/MozLoopService.jsm +++ b/browser/extensions/loop/content/modules/MozLoopService.jsm @@ -121,14 +121,14 @@ XPCOMUtils.defineConstant(this, "ROOM_DELETE", ROOM_DELETE); XPCOMUtils.defineConstant(this, "ROOM_CONTEXT_ADD", ROOM_CONTEXT_ADD); XPCOMUtils.defineLazyModuleGetter(this, "LoopAPI", - "resource:///modules/loop/MozLoopAPI.jsm"); + "chrome://loop/content/modules/MozLoopAPI.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "convertToRTCStatsReport", "resource://gre/modules/media/RTCStatsReport.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "loopUtils", - "resource:///modules/loop/utils.js", "utils"); + "chrome://loop/content/modules/utils.js", "utils"); XPCOMUtils.defineLazyModuleGetter(this, "loopCrypto", - "resource:///modules/loop/crypto.js", "LoopCrypto"); + "chrome://loop/content/shared/js/crypto.js", "LoopCrypto"); XPCOMUtils.defineLazyModuleGetter(this, "Chat", "resource:///modules/Chat.jsm"); @@ -151,13 +151,13 @@ XPCOMUtils.defineLazyModuleGetter(this, "hookWindowCloseForPanelClose", "resource://gre/modules/MozSocialAPI.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "LoopRooms", - "resource:///modules/loop/LoopRooms.jsm"); + "chrome://loop/content/modules/LoopRooms.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "roomsPushNotification", - "resource:///modules/loop/LoopRooms.jsm"); + "chrome://loop/content/modules/LoopRooms.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "MozLoopPushHandler", - "resource:///modules/loop/MozLoopPushHandler.jsm"); + "chrome://loop/content/modules/MozLoopPushHandler.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "UITour", "resource:///modules/UITour.jsm"); diff --git a/browser/extensions/loop/content/panels/conversation.html b/browser/extensions/loop/content/panels/conversation.html index dfc2c8715f9..7cbb81835f2 100644 --- a/browser/extensions/loop/content/panels/conversation.html +++ b/browser/extensions/loop/content/panels/conversation.html @@ -7,9 +7,10 @@ - - - + + + + @@ -17,32 +18,32 @@
- - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/browser/extensions/loop/content/panels/css/panel.css b/browser/extensions/loop/content/panels/css/panel.css index 374d8654302..f875d502bae 100644 --- a/browser/extensions/loop/content/panels/css/panel.css +++ b/browser/extensions/loop/content/panels/css/panel.css @@ -12,7 +12,7 @@ body { /* Beta Ribbon */ .beta-ribbon { - background: url("../shared/img/beta-ribbon.svg") no-repeat; + background: url("../../shared/img/beta-ribbon.svg") no-repeat; background-size: 30px; width: 30px; height: 30px; @@ -158,7 +158,7 @@ body { transform: translateY(-50%); padding-top: 11rem; padding-bottom: 1rem; - background-image: url("../shared/img/empty_conversations.svg"); + background-image: url("../../shared/img/empty_conversations.svg"); background-repeat: no-repeat; background-position: top center; } @@ -324,11 +324,11 @@ body { } .room-list > .room-entry:hover > h2 > .copy-link { - background-image: url(../shared/img/icons-16x16.svg#copy); + background-image: url(../../shared/img/icons-16x16.svg#copy); } .room-list > .room-entry:hover > h2 > .delete-link { - background-image: url(../shared/img/icons-16x16.svg#trash); + background-image: url(../../shared/img/icons-16x16.svg#trash); } /* scale this up to 1.1x and then back to the original size */ @@ -338,7 +338,7 @@ body { } .room-list > .room-entry > h2 > .copy-link.checked { - background: transparent url(../shared/img/icons-16x16.svg#checkmark); + background: transparent url(../../shared/img/icons-16x16.svg#checkmark); animation: pulse .150s; animation-timing-function: ease-in-out; top: 0; @@ -362,7 +362,7 @@ body { /* Room entry edit button */ .room-entry-context-edit-btn { - background-image: url("../shared/img/icons-10x10.svg#edit-darkgrey"); + background-image: url("../../shared/img/icons-10x10.svg#edit-darkgrey"); background-position: center; background-repeat: no-repeat; background-size: 12px; @@ -399,7 +399,7 @@ html[dir="rtl"] .room-entry-context-actions > .dropdown-menu { .button-close { background-color: transparent; - background-image: url(../shared/img/icons-10x10.svg#close); + background-image: url(../../shared/img/icons-10x10.svg#close); background-repeat: no-repeat; background-size: 8px 8px; border: none; @@ -428,7 +428,7 @@ html[dir="rtl"] .room-entry-context-actions > .dropdown-menu { } .spinner.busy { - background-image: url(../shared/img/spinner.png); + background-image: url(../../shared/img/spinner.png); animation-name: spinnerRotate; animation-duration: 1s; animation-timing-function: linear; @@ -437,7 +437,7 @@ html[dir="rtl"] .room-entry-context-actions > .dropdown-menu { @media (min-resolution: 2dppx) { .spinner.busy { - background-image: url(../shared/img/spinner@2x.png); + background-image: url(../../shared/img/spinner@2x.png); } } @@ -502,7 +502,7 @@ html[dir="rtl"] .generate-url-spinner { margin-left: 10px; margin-right: 10px; vertical-align: middle; - background-image: url("../shared/img/telefonica.png"); + background-image: url("../../shared/img/telefonica.png"); background-size: 72px 20px; width: 72px; height: 20px; @@ -510,21 +510,21 @@ html[dir="rtl"] .generate-url-spinner { #powered-by-logo.en-GB, #powered-by-logo.de { - background-image: url("../shared/img/02.png"); + background-image: url("../../shared/img/02.png"); background-size: 21px 20px; width: 21px; height: 20px; } #powered-by-logo.pt-BR { - background-image: url("../shared/img/vivo.png"); + background-image: url("../../shared/img/vivo.png"); background-size: 53px 26px; width: 53px; height: 26px; } #powered-by-logo[class^="es-"] { - background-image: url("../shared/img/movistar.png"); + background-image: url("../../shared/img/movistar.png"); background-size: 92px 20px; width: 92px; height: 20px; @@ -532,20 +532,20 @@ html[dir="rtl"] .generate-url-spinner { @media (min-resolution: 2dppx) { #powered-by-logo { - background-image: url("../shared/img/telefonica@2x.png"); + background-image: url("../../shared/img/telefonica@2x.png"); } #powered-by-logo.en-GB, #powered-by-logo.de { - background-image: url("../shared/img/02@2x.png"); + background-image: url("../../shared/img/02@2x.png"); } #powered-by-logo.pt-BR { - background-image: url("../shared/img/vivo@2x.png"); + background-image: url("../../shared/img/vivo@2x.png"); } #powered-by-logo[class^="es-"] { - background-image: url("../shared/img/movistar@2x.png"); + background-image: url("../../shared/img/movistar@2x.png"); } } @@ -594,7 +594,7 @@ html[dir="rtl"] .generate-url-spinner { border: none; cursor: pointer; vertical-align: middle; - background: transparent url("../shared/img/icons-10x10.svg#settings-cog"); + background: transparent url("../../shared/img/icons-10x10.svg#settings-cog"); background-position: center; background-repeat: no-repeat; background-size: cover; diff --git a/browser/extensions/loop/content/panels/js/panel.js b/browser/extensions/loop/content/panels/js/panel.js index ff4ca198eb3..e5c41a08ceb 100644 --- a/browser/extensions/loop/content/panels/js/panel.js +++ b/browser/extensions/loop/content/panels/js/panel.js @@ -29,7 +29,7 @@ loop.panel = (function(_, mozL10n) { return ( React.createElement("div", {className: "fte-get-started-content"}, React.createElement("header", {className: "fte-title"}, - React.createElement("img", {src: "loop/shared/img/hello_logo.svg"}), + React.createElement("img", {src: "shared/img/hello_logo.svg"}), React.createElement("div", {className: "fte-subheader"}, mozL10n.get("first_time_experience_subheading") ) @@ -379,7 +379,7 @@ loop.panel = (function(_, mozL10n) { _renderDefaultIcon: function() { return ( React.createElement("div", {className: "room-entry-context-item"}, - React.createElement("img", {src: "loop/shared/img/icons-16x16.svg#globe"}) + React.createElement("img", {src: "shared/img/icons-16x16.svg#globe"}) ) ); }, @@ -390,7 +390,7 @@ loop.panel = (function(_, mozL10n) { React.createElement("a", {href: roomUrl.location, onClick: this.handleClick, title: roomUrl.description}, - React.createElement("img", {src: roomUrl.thumbnail || "loop/shared/img/icons-16x16.svg#globe"}) + React.createElement("img", {src: roomUrl.thumbnail || "shared/img/icons-16x16.svg#globe"}) ) ) ); @@ -717,7 +717,7 @@ loop.panel = (function(_, mozL10n) { React.createElement("div", {className: "room-list"}, this._renderNewRoomButton(), React.createElement("div", {className: "room-list-loading"}, - React.createElement("img", {src: "loop/shared/img/animated-spinner.svg"}) + React.createElement("img", {src: "shared/img/animated-spinner.svg"}) ) ) ); @@ -884,7 +884,7 @@ loop.panel = (function(_, mozL10n) { return ( React.createElement("div", {className: "error-content"}, React.createElement("header", {className: "error-title"}, - React.createElement("img", {src: "loop/shared/img/sad_hello_icon_64x64.svg"}), + React.createElement("img", {src: "shared/img/sad_hello_icon_64x64.svg"}), React.createElement("p", {className: "error-subheader"}, mozL10n.get("e10s_not_supported_subheading", { brandShortname: mozL10n.get("clientShortname2") diff --git a/browser/extensions/loop/content/panels/js/panel.jsx b/browser/extensions/loop/content/panels/js/panel.jsx index fb14776745f..d2c11eca60a 100644 --- a/browser/extensions/loop/content/panels/js/panel.jsx +++ b/browser/extensions/loop/content/panels/js/panel.jsx @@ -29,7 +29,7 @@ loop.panel = (function(_, mozL10n) { return (
- +
{mozL10n.get("first_time_experience_subheading")}
@@ -379,7 +379,7 @@ loop.panel = (function(_, mozL10n) { _renderDefaultIcon: function() { return (
- +
); }, @@ -390,7 +390,7 @@ loop.panel = (function(_, mozL10n) { - +
); @@ -717,7 +717,7 @@ loop.panel = (function(_, mozL10n) {
{this._renderNewRoomButton()}
- +
); @@ -884,7 +884,7 @@ loop.panel = (function(_, mozL10n) { return (
- +

{mozL10n.get("e10s_not_supported_subheading", { brandShortname: mozL10n.get("clientShortname2") diff --git a/browser/extensions/loop/content/panels/js/roomViews.js b/browser/extensions/loop/content/panels/js/roomViews.js index 5f49fdbf1f6..67e02207c99 100644 --- a/browser/extensions/loop/content/panels/js/roomViews.js +++ b/browser/extensions/loop/content/panels/js/roomViews.js @@ -346,14 +346,14 @@ loop.roomViews = (function(mozL10n) { "triggered": this.state.copiedUrl }), onClick: this.handleCopyButtonClick}, - React.createElement("img", {src: "loop/shared/img/svg/glyph-link-16x16.svg"}), + React.createElement("img", {src: "shared/img/glyph-link-16x16.svg"}), React.createElement("p", null, mozL10n.get(this.state.copiedUrl ? "invite_copied_link_button" : "invite_copy_link_button")) ), React.createElement("div", {className: "btn-email invite-button", onClick: this.handleEmailButtonClick, onMouseOver: this.resetTriggeredButtons}, - React.createElement("img", {src: "loop/shared/img/svg/glyph-email-16x16.svg"}), + React.createElement("img", {src: "shared/img/glyph-email-16x16.svg"}), React.createElement("p", null, mozL10n.get("invite_email_link_button")) ) ), @@ -536,7 +536,7 @@ loop.roomViews = (function(mozL10n) { } var url = this._getURL(); - var thumbnail = url && url.thumbnail || "loop/shared/img/icons-16x16.svg#globe"; + var thumbnail = url && url.thumbnail || "shared/img/icons-16x16.svg#globe"; var urlDescription = url && url.description || ""; var location = url && url.location || ""; diff --git a/browser/extensions/loop/content/panels/js/roomViews.jsx b/browser/extensions/loop/content/panels/js/roomViews.jsx index 7f5d66f7a6d..5bbbd0fb276 100644 --- a/browser/extensions/loop/content/panels/js/roomViews.jsx +++ b/browser/extensions/loop/content/panels/js/roomViews.jsx @@ -346,14 +346,14 @@ loop.roomViews = (function(mozL10n) { "triggered": this.state.copiedUrl })} onClick={this.handleCopyButtonClick}> - +

{mozL10n.get(this.state.copiedUrl ? "invite_copied_link_button" : "invite_copy_link_button")}

- +

{mozL10n.get("invite_email_link_button")}

@@ -536,7 +536,7 @@ loop.roomViews = (function(mozL10n) { } var url = this._getURL(); - var thumbnail = url && url.thumbnail || "loop/shared/img/icons-16x16.svg#globe"; + var thumbnail = url && url.thumbnail || "shared/img/icons-16x16.svg#globe"; var urlDescription = url && url.description || ""; var location = url && url.location || ""; diff --git a/browser/extensions/loop/content/panels/panel.html b/browser/extensions/loop/content/panels/panel.html index 87fb62711b2..982006f7084 100644 --- a/browser/extensions/loop/content/panels/panel.html +++ b/browser/extensions/loop/content/panels/panel.html @@ -5,31 +5,32 @@ - - - + + + +
- - - - - + + + + + - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/browser/extensions/loop/content/shared/css/conversation.css b/browser/extensions/loop/content/shared/css/conversation.css index b5687642948..aacca74062f 100644 --- a/browser/extensions/loop/content/shared/css/conversation.css +++ b/browser/extensions/loop/content/shared/css/conversation.css @@ -65,7 +65,7 @@ html[dir="rtl"] .conversation-toolbar > li { background-position: center; background-repeat: no-repeat; background-color: transparent; - background-image: url("../img/svg/media-group.svg"); + background-image: url("../img/media-group.svg"); background-size: cover; height: 28px; width: 67px; @@ -73,25 +73,25 @@ html[dir="rtl"] .conversation-toolbar > li { .conversation-toolbar-media-btn-group-box > button:last-child:active, .conversation-toolbar-media-btn-group-box > button:last-child:hover { - background-image: url("../img/svg/media-group-right-hover.svg"); + background-image: url("../img/media-group-right-hover.svg"); background-size: cover; } html[dir="rtl"] .conversation-toolbar-media-btn-group-box > button:last-child:active, html[dir="rtl"] .conversation-toolbar-media-btn-group-box > button:last-child:hover { - background-image: url("../img/svg/media-group-left-hover.svg"); + background-image: url("../img/media-group-left-hover.svg"); background-size: cover; } .conversation-toolbar-media-btn-group-box > button:first-child:active, .conversation-toolbar-media-btn-group-box > button:first-child:hover { - background-image: url("../img/svg/media-group-left-hover.svg"); + background-image: url("../img/media-group-left-hover.svg"); background-size: cover; } html[dir="rtl"] .conversation-toolbar-media-btn-group-box > button:first-child:active, html[dir="rtl"] .conversation-toolbar-media-btn-group-box > button:first-child:hover { - background-image: url("../img/svg/media-group-right-hover.svg"); + background-image: url("../img/media-group-right-hover.svg"); background-size: cover; } @@ -106,76 +106,76 @@ html[dir="rtl"] .conversation-toolbar-btn-box.btn-edit-entry { /* conversationViews.jsx */ .conversation-toolbar .btn-hangup { - background-image: url("../img/svg/exit.svg"); + background-image: url("../img/exit.svg"); border: 0; } /* Audio mute button */ .btn-mute-audio:after { - content: url("../img/svg/audio.svg"); + content: url("../img/audio.svg"); } .btn-mute-audio.muted:after { - content: url("../img/svg/audio-mute.svg"); + content: url("../img/audio-mute.svg"); } .btn-mute-audio:hover:after, .btn-mute-audio:active:after { - content: url("../img/svg/audio-hover.svg"); + content: url("../img/audio-hover.svg"); } .btn-mute-audio.muted:hover:after, .btn-mute-audio.muted:active:after { - content: url("../img/svg/audio-mute-hover.svg"); + content: url("../img/audio-mute-hover.svg"); } /* Video mute button */ .btn-mute-video:after { - content: url("../img/svg/video.svg"); + content: url("../img/video.svg"); } .btn-mute-video:active:after, .btn-mute-video:hover:after { - content: url("../img/svg/video-hover.svg"); + content: url("../img/video-hover.svg"); } .btn-mute-video.muted:after { - content: url("../img/svg/video-mute.svg"); + content: url("../img/video-mute.svg"); } .btn-mute-video.muted:hover:after, .btn-mute-video.muted:active:after { - content: url("../img/svg/video-mute-hover.svg"); + content: url("../img/video-mute-hover.svg"); } .btn-settings { width: 28px; height: 28px; background-size: 28px; - background-image: url("../img/svg/settings.svg"); + background-image: url("../img/settings.svg"); background-color: transparent; } .btn-settings:hover, .btn-settings:active { - background-image: url("../img/svg/settings-hover.svg"); + background-image: url("../img/settings-hover.svg"); } .btn-screen-share { - background-image: url("../img/svg/sharing.svg"); + background-image: url("../img/sharing.svg"); } .btn-screen-share:hover, .btn-screen-share:active { - background-image: url("../img/svg/sharing-hover.svg"); + background-image: url("../img/sharing-hover.svg"); } .btn-screen-share.active { - background-image: url("../img/svg/sharing-active.svg"); + background-image: url("../img/sharing-active.svg"); } .btn-screen-share.disabled { /* The screen share button is in its pending state when its disabled. */ - background-image: url("../img/svg/sharing-pending.svg"); + background-image: url("../img/sharing-pending.svg"); } /* General Call (incoming or outgoing). */ diff --git a/browser/extensions/loop/content/shared/js/crypto.js b/browser/extensions/loop/content/shared/js/crypto.js index b067698f44d..22b0616d245 100644 --- a/browser/extensions/loop/content/shared/js/crypto.js +++ b/browser/extensions/loop/content/shared/js/crypto.js @@ -18,7 +18,7 @@ var inChrome = typeof Components != "undefined" && "utils" in Components; rootObject = { crypto: crypto }; - sharedUtils = Cu.import("resource:///modules/loop/utils.js", {}).utils; + sharedUtils = Cu.import("chrome://loop/content/shared/js/utils.js", {}).utils; } else { sharedUtils = this.shared.utils; } diff --git a/browser/extensions/loop/content/shared/js/views.js b/browser/extensions/loop/content/shared/js/views.js index 34cbc45c5fe..bdb6caea01d 100644 --- a/browser/extensions/loop/content/shared/js/views.js +++ b/browser/extensions/loop/content/shared/js/views.js @@ -854,7 +854,7 @@ loop.shared.views = (function(_, mozL10n) { if (!thumbnail) { thumbnail = this.props.useDesktopPaths ? - "loop/shared/img/icons-16x16.svg#globe" : + "shared/img/icons-16x16.svg#globe" : "shared/img/icons-16x16.svg#globe"; } diff --git a/browser/extensions/loop/content/shared/js/views.jsx b/browser/extensions/loop/content/shared/js/views.jsx index 9eb26b42e6e..723e739f29b 100644 --- a/browser/extensions/loop/content/shared/js/views.jsx +++ b/browser/extensions/loop/content/shared/js/views.jsx @@ -854,7 +854,7 @@ loop.shared.views = (function(_, mozL10n) { if (!thumbnail) { thumbnail = this.props.useDesktopPaths ? - "loop/shared/img/icons-16x16.svg#globe" : + "shared/img/icons-16x16.svg#globe" : "shared/img/icons-16x16.svg#globe"; } diff --git a/browser/extensions/loop/moz.build b/browser/extensions/loop/moz.build index f9124ef2fe2..f53a007a2ca 100644 --- a/browser/extensions/loop/moz.build +++ b/browser/extensions/loop/moz.build @@ -4,7 +4,7 @@ # 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/. -FINAL_TARGET = 'dist/bin/browser/features/loop@test.mozilla.org' +FINAL_TARGET = 'dist/bin/browser/features/loop@mozilla.org' FINAL_TARGET_FILES += [ 'bootstrap.js' diff --git a/browser/extensions/loop/skin/shared/loop.css b/browser/extensions/loop/skin/shared/loop.css index 3a81e96a6fc..e83219f68df 100644 --- a/browser/extensions/loop/skin/shared/loop.css +++ b/browser/extensions/loop/skin/shared/loop.css @@ -17,12 +17,12 @@ } #loop-button { - list-style-image: url(chrome://browser/skin/loop/toolbar.png); + list-style-image: url(chrome://loop/skin/toolbar.png); -moz-image-region: rect(0, 18px, 18px, 0); } toolbar[brighttext] #loop-button { - list-style-image: url(chrome://browser/skin/loop/toolbar-inverted.png); + list-style-image: url(chrome://loop/skin/toolbar-inverted.png); } #loop-button[state="disabled"], @@ -52,12 +52,12 @@ @media (min-resolution: 1.1dppx) { #loop-button { - list-style-image: url("chrome://browser/skin/loop/toolbar@2x.png"); + list-style-image: url("chrome://loop/skin/toolbar@2x.png"); -moz-image-region: rect(0, 36px, 36px, 0); } toolbar[brighttext] #loop-button { - list-style-image: url("chrome://browser/skin/loop/toolbar-inverted@2x.png"); + list-style-image: url("chrome://loop/skin/toolbar-inverted@2x.png"); } #loop-button[state="disabled"], @@ -87,7 +87,7 @@ #loop-button[cui-areatype="menu-panel"], toolbarpaletteitem[place="palette"] > #loop-button { - list-style-image: url(chrome://browser/skin/loop/menuPanel@2x.png); + list-style-image: url(chrome://loop/skin/menuPanel@2x.png); -moz-image-region: rect(0, 64px, 64px, 0); } @@ -125,7 +125,7 @@ @media not all and (min-resolution: 1.1dppx) { #loop-button[cui-areatype="menu-panel"], toolbarpaletteitem[place="palette"] > #loop-button { - list-style-image: url(chrome://browser/skin/loop/menuPanel.png); + list-style-image: url(chrome://loop/skin/menuPanel.png); -moz-image-region: rect(0, 32px, 32px, 0); } diff --git a/browser/extensions/loop/skin/windows/platform.css b/browser/extensions/loop/skin/windows/platform.css index e90639bbd43..417dc6c615e 100644 --- a/browser/extensions/loop/skin/windows/platform.css +++ b/browser/extensions/loop/skin/windows/platform.css @@ -6,13 +6,13 @@ @media (-moz-windows-theme: luna-silver) and (max-resolution: 1dppx) { #loop-button { - list-style-image: url(chrome://browser/skin/loop/toolbar-lunaSilver.png) + list-style-image: url(chrome://loop/skin/toolbar-lunaSilver.png) } } @media (-moz-windows-theme: luna-silver) and (min-resolution: 1.1dppx) { #loop-button { - list-style-image: url(chrome://browser/skin/loop/toolbar-lunaSilver@2x.png) + list-style-image: url(chrome://loop/skin/toolbar-lunaSilver@2x.png) } } diff --git a/browser/extensions/loop/standalone/content/css/webapp.css b/browser/extensions/loop/standalone/content/css/webapp.css index bc46ed3d9e9..525608decf9 100644 --- a/browser/extensions/loop/standalone/content/css/webapp.css +++ b/browser/extensions/loop/standalone/content/css/webapp.css @@ -87,7 +87,7 @@ html[dir="rtl"] .standalone-overlay-wrapper > .general-support-url { background-size: contain; width: 16px; height: 16px; - background: transparent url("../shared/img/svg/glyph-help-16x16.svg") no-repeat; + background: transparent url("../shared/img/glyph-help-16x16.svg") no-repeat; } .standalone-overlay-wrapper > .standalone-moz-logo { @@ -271,7 +271,7 @@ html[dir="rtl"] .standalone-overlay-wrapper > .standalone-moz-logo { } .room-inner-info-area > .room-waiting-area > a >.room-waiting-help { - background: transparent url("../shared/img/svg/glyph-help-16x16.svg") no-repeat; + background: transparent url("../shared/img/glyph-help-16x16.svg") no-repeat; display: inline-block; height: 16px; margin-left: 5px; diff --git a/browser/extensions/loop/standalone/content/webappEntryPoint.js b/browser/extensions/loop/standalone/content/webappEntryPoint.js index 73f7eeec03c..526e3708fe6 100644 --- a/browser/extensions/loop/standalone/content/webappEntryPoint.js +++ b/browser/extensions/loop/standalone/content/webappEntryPoint.js @@ -17,20 +17,20 @@ // The OpenTok SDK tries to do some heuristic detection of require and // assumes a node environment if it's present, which confuses webpack, so // we turn that off by forcing require to false in that context. -require("imports?require=>false!shared/libs/sdk.js"); +require("imports?require=>false!shared/vendor/sdk.js"); // Ultimately, we'll likely want to pull the vendor libraries from npm, as that // makes upgrading easier, and it's generally better practice to minify the // "source" versions of libraries rather than built artifacts. We probably do // want to minify them ourselves since this allows for better dead-code // elimination, but that can be a bit of judgement call. -require("exports?_!shared/libs/lodash-3.9.3.js"); +require("exports?_!shared/vendor/lodash-3.9.3.js"); // Disable Backbone's AMD auto-detection, as described at: // // https://github.com/jashkenas/backbone/wiki/Using-Backbone-without-jQuery // -require("expose?Backbone!imports?define=>false!shared/libs/backbone-1.2.1.js"); +require("expose?Backbone!imports?define=>false!shared/vendor/backbone-1.2.1.js"); /* global: __PROD__ */ if (typeof __PROD__ !== "undefined") { @@ -41,8 +41,8 @@ if (typeof __PROD__ !== "undefined") { require("expose?classNames!classnames"); } else { // our development server setup doesn't yet handle real modules, so for now... - require("shared/libs/react-0.13.3.js"); - require("shared/libs/classnames-2.2.0.js"); + require("shared/vendor/react-0.13.3.js"); + require("shared/vendor/classnames-2.2.0.js"); } diff --git a/browser/extensions/loop/standalone/server.js b/browser/extensions/loop/standalone/server.js index 5c178c34ea7..3c6cb09f4b4 100644 --- a/browser/extensions/loop/standalone/server.js +++ b/browser/extensions/loop/standalone/server.js @@ -90,6 +90,10 @@ app.use("/content/c", express.static(path.join(__dirname, "..", "content"))); // Two lines for the same reason as /content above. app.use("/test", express.static(path.join(__dirname, "test"))); app.use("/test", express.static(path.join(__dirname, "..", "test"))); +// Hacks for desktop to stop errors being raised in the tests for content loading. +app.use("/test/shared/shared", express.static(path.join(__dirname, "..", "content/shared"))); +app.use("/test/desktop-local/shared", express.static(path.join(__dirname, "..", "content/shared"))); + // As we don't have hashes on the urls, the best way to serve the index files // appears to be to be to closely filter the url and match appropriately. diff --git a/browser/extensions/loop/test/desktop-local/README.md b/browser/extensions/loop/test/desktop-local/README.md index 5f459e32fc4..43dc73c5c31 100644 --- a/browser/extensions/loop/test/desktop-local/README.md +++ b/browser/extensions/loop/test/desktop-local/README.md @@ -11,7 +11,7 @@ a file: or HTTP URL to run the tests. Alternately, from the top-level of your Gecko source directory, execute: ``` -./mach marionette-test browser/components/loop/test/manifest.ini +./mach marionette-test browser/extensions/loop/test/manifest.ini ``` Next steps: diff --git a/browser/extensions/loop/test/desktop-local/index.html b/browser/extensions/loop/test/desktop-local/index.html index d5108f26457..f434148925e 100644 --- a/browser/extensions/loop/test/desktop-local/index.html +++ b/browser/extensions/loop/test/desktop-local/index.html @@ -14,17 +14,17 @@
- + - - - - + + + + @@ -50,12 +50,12 @@ - - - - - - + + + + + + diff --git a/browser/extensions/loop/test/karma/karma.coverage.desktop.js b/browser/extensions/loop/test/karma/karma.coverage.desktop.js index 6863e06041e..67f43865cf9 100644 --- a/browser/extensions/loop/test/karma/karma.coverage.desktop.js +++ b/browser/extensions/loop/test/karma/karma.coverage.desktop.js @@ -10,11 +10,11 @@ module.exports = function(config) { // List of files / patterns to load in the browser. baseConfig.files = baseConfig.files.concat([ - "content/libs/l10n.js", - "content/shared/libs/react-0.13.3.js", - "content/shared/libs/classnames-2.2.0.js", - "content/shared/libs/lodash-3.9.3.js", - "content/shared/libs/backbone-1.2.1.js", + "content/panels/vendor/l10n.js", + "content/shared/vendor/react-0.13.3.js", + "content/shared/vendor/classnames-2.2.0.js", + "content/shared/vendor/lodash-3.9.3.js", + "content/shared/vendor/backbone-1.2.1.js", "test/shared/vendor/*.js", "test/shared/loop_mocha_utils.js", "test/karma/head.js", // Stub out DOM event listener due to races. @@ -31,11 +31,11 @@ module.exports = function(config) { "content/shared/js/views.js", "content/shared/js/textChatStore.js", "content/shared/js/textChatView.js", - "content/js/feedbackViews.js", - "content/js/conversationAppStore.js", - "content/js/roomStore.js", - "content/js/roomViews.js", - "content/js/conversation.js", + "content/panels/js/feedbackViews.js", + "content/panels/js/conversationAppStore.js", + "content/panels/js/roomStore.js", + "content/panels/js/roomViews.js", + "content/panels/js/conversation.js", "test/desktop-local/*.js" ]); @@ -47,7 +47,7 @@ module.exports = function(config) { // Preprocess matching files before serving them to the browser. // Available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor . baseConfig.preprocessors = { - "content/js/*.js": ["coverage"] + "content/panels/js/*.js": ["coverage"] }; baseConfig.coverageReporter.dir = "test/coverage/desktop"; diff --git a/browser/extensions/loop/test/karma/karma.coverage.shared_standalone.js b/browser/extensions/loop/test/karma/karma.coverage.shared_standalone.js index 7bd346cbf17..299c44f2185 100644 --- a/browser/extensions/loop/test/karma/karma.coverage.shared_standalone.js +++ b/browser/extensions/loop/test/karma/karma.coverage.shared_standalone.js @@ -11,11 +11,11 @@ module.exports = function(config) { // List of files / patterns to load in the browser. baseConfig.files = baseConfig.files.concat([ "standalone/content/libs/l10n-gaia-02ca67948fe8.js", - "content/shared/libs/lodash-3.9.3.js", - "content/shared/libs/backbone-1.2.1.js", - "content/shared/libs/react-0.13.3.js", - "content/shared/libs/classnames-2.2.0.js", - "content/shared/libs/sdk.js", + "content/shared/vendor/lodash-3.9.3.js", + "content/shared/vendor/backbone-1.2.1.js", + "content/shared/vendor/react-0.13.3.js", + "content/shared/vendor/classnames-2.2.0.js", + "content/shared/vendor/sdk.js", "test/shared/vendor/*.js", "test/shared/loop_mocha_utils.js", "test/karma/head.js", // Add test fixture container diff --git a/browser/extensions/loop/test/mochitest/browser_LoopRooms_channel.js b/browser/extensions/loop/test/mochitest/browser_LoopRooms_channel.js index ae693218ebc..0ef65728b59 100644 --- a/browser/extensions/loop/test/mochitest/browser_LoopRooms_channel.js +++ b/browser/extensions/loop/test/mochitest/browser_LoopRooms_channel.js @@ -12,7 +12,7 @@ var { WebChannel } = Cu.import("resource://gre/modules/WebChannel.jsm", {}); var { Chat } = Cu.import("resource:///modules/Chat.jsm", {}); const TEST_URI = - "example.com/browser/browser/components/loop/test/mochitest/test_loopLinkClicker_channel.html"; + "example.com/browser/browser/extensions/loop/test/mochitest/test_loopLinkClicker_channel.html"; const TEST_URI_GOOD = Services.io.newURI("https://" + TEST_URI, null, null); const TEST_URI_BAD = Services.io.newURI("http://" + TEST_URI, null, null); diff --git a/browser/extensions/loop/test/mochitest/browser_fxa_login.js b/browser/extensions/loop/test/mochitest/browser_fxa_login.js index 9036c06ad98..0d5e359aff2 100644 --- a/browser/extensions/loop/test/mochitest/browser_fxa_login.js +++ b/browser/extensions/loop/test/mochitest/browser_fxa_login.js @@ -8,7 +8,7 @@ "use strict"; const BASE_URL = Services.prefs.getCharPref("loop.server"); -const { LoopAPI } = Cu.import("resource:///modules/loop/MozLoopAPI.jsm", {}); +const { LoopAPI } = Cu.import("chrome://loop/content/modules/MozLoopAPI.jsm", {}); function* checkFxA401() { let err = MozLoopService.errors.get("login"); diff --git a/browser/extensions/loop/test/mochitest/browser_loop_fxa_server.js b/browser/extensions/loop/test/mochitest/browser_loop_fxa_server.js index ae7f6eeaee1..62c30531b6a 100644 --- a/browser/extensions/loop/test/mochitest/browser_loop_fxa_server.js +++ b/browser/extensions/loop/test/mochitest/browser_loop_fxa_server.js @@ -7,7 +7,7 @@ "use strict"; -const BASE_URL = "http://mochi.test:8888/browser/browser/components/loop/test/mochitest/loop_fxa.sjs?"; +const BASE_URL = "http://mochi.test:8888/browser/browser/extensions/loop/test/mochitest/loop_fxa.sjs?"; registerCleanupFunction(function* () { yield promiseDeletedOAuthParams(BASE_URL); diff --git a/browser/extensions/loop/test/mochitest/browser_mozLoop_appVersionInfo.js b/browser/extensions/loop/test/mochitest/browser_mozLoop_appVersionInfo.js index 5528f9036dd..6c96ebef236 100644 --- a/browser/extensions/loop/test/mochitest/browser_mozLoop_appVersionInfo.js +++ b/browser/extensions/loop/test/mochitest/browser_mozLoop_appVersionInfo.js @@ -2,7 +2,7 @@ http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; -const { LoopAPI } = Cu.import("resource:///modules/loop/MozLoopAPI.jsm", {}); +const { LoopAPI } = Cu.import("chrome://loop/content/modules/MozLoopAPI.jsm", {}); var [, gHandlers] = LoopAPI.inspect(); add_task(function* test_mozLoop_appVersionInfo() { diff --git a/browser/extensions/loop/test/mochitest/browser_mozLoop_context.js b/browser/extensions/loop/test/mochitest/browser_mozLoop_context.js index e5b3bd9563b..424de044dbf 100644 --- a/browser/extensions/loop/test/mochitest/browser_mozLoop_context.js +++ b/browser/extensions/loop/test/mochitest/browser_mozLoop_context.js @@ -7,7 +7,7 @@ */ "use strict"; -const { LoopAPI } = Cu.import("resource:///modules/loop/MozLoopAPI.jsm", {}); +const { LoopAPI } = Cu.import("chrome://loop/content/modules/MozLoopAPI.jsm", {}); var [, gHandlers] = LoopAPI.inspect(); function promiseGetMetadata() { diff --git a/browser/extensions/loop/test/mochitest/browser_mozLoop_sharingListeners.js b/browser/extensions/loop/test/mochitest/browser_mozLoop_sharingListeners.js index 04dc0225608..78aa1428199 100644 --- a/browser/extensions/loop/test/mochitest/browser_mozLoop_sharingListeners.js +++ b/browser/extensions/loop/test/mochitest/browser_mozLoop_sharingListeners.js @@ -6,7 +6,7 @@ */ "use strict"; -const { LoopAPI } = Cu.import("resource:///modules/loop/MozLoopAPI.jsm", {}); +const { LoopAPI } = Cu.import("chrome://loop/content/modules/MozLoopAPI.jsm", {}); var [, gHandlers] = LoopAPI.inspect(); var handlers = [ diff --git a/browser/extensions/loop/test/mochitest/browser_mozLoop_socialShare.js b/browser/extensions/loop/test/mochitest/browser_mozLoop_socialShare.js index 0347ed9d936..21c416962d2 100644 --- a/browser/extensions/loop/test/mochitest/browser_mozLoop_socialShare.js +++ b/browser/extensions/loop/test/mochitest/browser_mozLoop_socialShare.js @@ -4,7 +4,7 @@ Cu.import("resource://gre/modules/Promise.jsm"); const { SocialService } = Cu.import("resource://gre/modules/SocialService.jsm", {}); -const { LoopAPI } = Cu.import("resource:///modules/loop/MozLoopAPI.jsm", {}); +const { LoopAPI } = Cu.import("chrome://loop/content/modules/MozLoopAPI.jsm", {}); var [, gHandlers] = LoopAPI.inspect(); diff --git a/browser/extensions/loop/test/mochitest/browser_mozLoop_telemetry.js b/browser/extensions/loop/test/mochitest/browser_mozLoop_telemetry.js index 8746c2ca579..7a2b4219061 100644 --- a/browser/extensions/loop/test/mochitest/browser_mozLoop_telemetry.js +++ b/browser/extensions/loop/test/mochitest/browser_mozLoop_telemetry.js @@ -7,7 +7,7 @@ "use strict"; -const { LoopAPI } = Cu.import("resource:///modules/loop/MozLoopAPI.jsm", {}); +const { LoopAPI } = Cu.import("chrome://loop/content/modules/MozLoopAPI.jsm", {}); var [, gHandlers] = LoopAPI.inspect(); var gConstants; gHandlers.GetAllConstants({}, constants => gConstants = constants); diff --git a/browser/extensions/loop/test/mochitest/browser_toolbarbutton.js b/browser/extensions/loop/test/mochitest/browser_toolbarbutton.js index 4023ce9db72..707212e5a99 100644 --- a/browser/extensions/loop/test/mochitest/browser_toolbarbutton.js +++ b/browser/extensions/loop/test/mochitest/browser_toolbarbutton.js @@ -8,7 +8,7 @@ "use strict"; Components.utils.import("resource://gre/modules/Promise.jsm", this); -const { LoopRoomsInternal } = Components.utils.import("resource:///modules/loop/LoopRooms.jsm", {}); +const { LoopRoomsInternal } = Components.utils.import("chrome://loop/content/modules/LoopRooms.jsm", {}); Services.prefs.setBoolPref("loop.gettingStarted.seen", true); const fxASampleToken = { diff --git a/browser/extensions/loop/test/mochitest/head.js b/browser/extensions/loop/test/mochitest/head.js index 5f6baa274fe..ba0315b1b91 100644 --- a/browser/extensions/loop/test/mochitest/head.js +++ b/browser/extensions/loop/test/mochitest/head.js @@ -8,8 +8,8 @@ const { LOOP_SESSION_TYPE, MozLoopServiceInternal, MozLoopService -} = Cu.import("resource:///modules/loop/MozLoopService.jsm", {}); -const { LoopRooms } = Cu.import("resource:///modules/loop/LoopRooms.jsm", {}); +} = Cu.import("chrome://loop/content/modules/MozLoopService.jsm", {}); +const { LoopRooms } = Cu.import("chrome://loop/content/modules/LoopRooms.jsm", {}); // Cache this value only once, at the beginning of a // test run, so that it doesn't pick up the offline=true @@ -133,7 +133,7 @@ function promiseOAuthParamsSetup(baseURL, params) { } function* resetFxA() { - let global = Cu.import("resource:///modules/loop/MozLoopService.jsm", {}); + let global = Cu.import("chrome://loop/content/modules/MozLoopService.jsm", {}); global.gHawkClient = null; global.gFxAOAuthClientPromise = null; global.gFxAOAuthClient = null; @@ -152,7 +152,7 @@ function checkFxAOAuthTokenData(aValue) { } function checkLoggedOutState() { - let global = Cu.import("resource:///modules/loop/MozLoopService.jsm", {}); + let global = Cu.import("chrome://loop/content/modules/MozLoopService.jsm", {}); is(global.gFxAOAuthClientPromise, null, "gFxAOAuthClientPromise should be cleared"); is(MozLoopService.userProfile, null, "fxAOAuthProfile should be cleared"); is(global.gFxAOAuthClient, null, "gFxAOAuthClient should be cleared"); diff --git a/browser/extensions/loop/test/shared/index.html b/browser/extensions/loop/test/shared/index.html index 6489871738e..95f94ad1b1f 100644 --- a/browser/extensions/loop/test/shared/index.html +++ b/browser/extensions/loop/test/shared/index.html @@ -14,16 +14,16 @@
- + - - - + + + diff --git a/browser/extensions/loop/test/shared/views_test.js b/browser/extensions/loop/test/shared/views_test.js index 3cf0188aeba..b71ccbcb09b 100644 --- a/browser/extensions/loop/test/shared/views_test.js +++ b/browser/extensions/loop/test/shared/views_test.js @@ -840,7 +840,7 @@ describe("loop.shared.views", function() { }); expect(view.getDOMNode().querySelector(".context-preview").getAttribute("src")) - .eql("loop/shared/img/icons-16x16.svg#globe"); + .eql("shared/img/icons-16x16.svg#globe"); }); it("should not display a title if by default", function() { diff --git a/browser/extensions/loop/test/standalone/index.html b/browser/extensions/loop/test/standalone/index.html index 5af0462cf56..a8ffd06fa7a 100644 --- a/browser/extensions/loop/test/standalone/index.html +++ b/browser/extensions/loop/test/standalone/index.html @@ -14,16 +14,16 @@
- + - - - + + + diff --git a/browser/extensions/loop/test/xpcshell/.eslintrc b/browser/extensions/loop/test/xpcshell/.eslintrc index e61193d5f6c..7732b0d1ce7 100644 --- a/browser/extensions/loop/test/xpcshell/.eslintrc +++ b/browser/extensions/loop/test/xpcshell/.eslintrc @@ -17,6 +17,7 @@ "do_timeout": false, "run_next_test": false, // head.js items. + "FileUtils": false, "MockWebSocketChannel": false, "extend": true, "getLoopString": false, @@ -27,7 +28,8 @@ "mockPushHandler": true, "setupFakeFxAUserProfile": false, "setupFakeLoopServer": false, - "timerHandlers", + "timerHandlers": false, + "updateAppInfo": false, "waitForCondition": true, // Loop specific items "MozLoopServiceInternal": true, diff --git a/browser/extensions/loop/test/xpcshell/head.js b/browser/extensions/loop/test/xpcshell/head.js index 820510ce0d5..3f8f1e00802 100644 --- a/browser/extensions/loop/test/xpcshell/head.js +++ b/browser/extensions/loop/test/xpcshell/head.js @@ -12,15 +12,15 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/Http.jsm"); Cu.import("resource://testing-common/httpd.js"); -Cu.import("resource:///modules/loop/MozLoopService.jsm"); +Cu.import("chrome://loop/content/modules/MozLoopService.jsm"); Cu.import("resource://gre/modules/Promise.jsm"); -Cu.import("resource:///modules/loop/LoopRooms.jsm"); +Cu.import("chrome://loop/content/modules/LoopRooms.jsm"); Cu.import("resource://gre/modules/osfile.jsm"); -const { MozLoopServiceInternal } = Cu.import("resource:///modules/loop/MozLoopService.jsm", {}); -const { LoopRoomsInternal, timerHandlers } = Cu.import("resource:///modules/loop/LoopRooms.jsm", {}); +const { MozLoopServiceInternal } = Cu.import("chrome://loop/content/modules/MozLoopService.jsm", {}); +const { LoopRoomsInternal, timerHandlers } = Cu.import("chrome://loop/content/modules/LoopRooms.jsm", {}); XPCOMUtils.defineLazyModuleGetter(this, "MozLoopPushHandler", - "resource:///modules/loop/MozLoopPushHandler.jsm"); + "chrome://loop/content/modules/MozLoopPushHandler.jsm"); const kMockWebSocketChannelName = "Mock WebSocket Channel"; const kWebSocketChannelContractID = "@mozilla.org/network/protocol;1?name=wss"; diff --git a/browser/extensions/loop/test/xpcshell/test_loopapi_doNotDisturb.js b/browser/extensions/loop/test/xpcshell/test_loopapi_doNotDisturb.js index bb32bfb1034..5a86540b1d3 100644 --- a/browser/extensions/loop/test/xpcshell/test_loopapi_doNotDisturb.js +++ b/browser/extensions/loop/test/xpcshell/test_loopapi_doNotDisturb.js @@ -2,7 +2,7 @@ http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; -const { LoopAPI } = Cu.import("resource:///modules/loop/MozLoopAPI.jsm", {}); +const { LoopAPI } = Cu.import("chrome://loop/content/modules/MozLoopAPI.jsm", {}); var [, gHandlers] = LoopAPI.inspect(); add_task(function* test_mozLoop_doNotDisturb() { diff --git a/browser/extensions/loop/test/xpcshell/test_loopapi_internal.js b/browser/extensions/loop/test/xpcshell/test_loopapi_internal.js index 313b06d82fa..17066b85c27 100644 --- a/browser/extensions/loop/test/xpcshell/test_loopapi_internal.js +++ b/browser/extensions/loop/test/xpcshell/test_loopapi_internal.js @@ -3,7 +3,7 @@ "use strict"; -const { LoopAPI } = Cu.import("resource:///modules/loop/MozLoopAPI.jsm", {}); +const { LoopAPI } = Cu.import("chrome://loop/content/modules/MozLoopAPI.jsm", {}); const [LoopAPIInternal] = LoopAPI.inspect(); add_test(function test_intialize() { diff --git a/browser/extensions/loop/test/xpcshell/test_loopapi_prefs.js b/browser/extensions/loop/test/xpcshell/test_loopapi_prefs.js index 2d84a94a3df..1142acfbdb0 100644 --- a/browser/extensions/loop/test/xpcshell/test_loopapi_prefs.js +++ b/browser/extensions/loop/test/xpcshell/test_loopapi_prefs.js @@ -2,7 +2,7 @@ http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; -const { LoopAPI } = Cu.import("resource:///modules/loop/MozLoopAPI.jsm", {}); +const { LoopAPI } = Cu.import("chrome://loop/content/modules/MozLoopAPI.jsm", {}); var [, gHandlers] = LoopAPI.inspect(); add_task(function* test_mozLoop_charPref() { diff --git a/browser/extensions/loop/test/xpcshell/test_looprooms.js b/browser/extensions/loop/test/xpcshell/test_looprooms.js index 2ead43579f2..6930b3cf07d 100644 --- a/browser/extensions/loop/test/xpcshell/test_looprooms.js +++ b/browser/extensions/loop/test/xpcshell/test_looprooms.js @@ -5,7 +5,7 @@ "use strict"; Cu.import("resource://services-common/utils.js"); -Cu.import("resource:///modules/loop/LoopRooms.jsm"); +Cu.import("chrome://loop/content/modules/LoopRooms.jsm"); Cu.import("resource:///modules/Chat.jsm"); Cu.import("resource://gre/modules/Promise.jsm"); diff --git a/browser/extensions/loop/test/xpcshell/test_looprooms_encryption_in_fxa.js b/browser/extensions/loop/test/xpcshell/test_looprooms_encryption_in_fxa.js index 23ef34e64ee..1d2eb38c0d4 100644 --- a/browser/extensions/loop/test/xpcshell/test_looprooms_encryption_in_fxa.js +++ b/browser/extensions/loop/test/xpcshell/test_looprooms_encryption_in_fxa.js @@ -7,7 +7,7 @@ timerHandlers.startTimer = callback => callback(); Cu.import("resource://services-common/utils.js"); -const { LOOP_ROOMS_CACHE_FILENAME } = Cu.import("resource:///modules/loop/LoopRoomsCache.jsm", {}); +const { LOOP_ROOMS_CACHE_FILENAME } = Cu.import("chrome://loop/content/modules/LoopRoomsCache.jsm", {}); const kContextEnabledPref = "loop.contextInConverations.enabled"; diff --git a/browser/extensions/loop/test/xpcshell/test_looprooms_first_notification.js b/browser/extensions/loop/test/xpcshell/test_looprooms_first_notification.js index daaa6cd8f59..d32321f26a1 100644 --- a/browser/extensions/loop/test/xpcshell/test_looprooms_first_notification.js +++ b/browser/extensions/loop/test/xpcshell/test_looprooms_first_notification.js @@ -4,7 +4,7 @@ "use strict"; Cu.import("resource://services-common/utils.js"); -Cu.import("resource:///modules/loop/LoopRooms.jsm"); +Cu.import("chrome://loop/content/modules/LoopRooms.jsm"); Cu.import("resource:///modules/Chat.jsm"); Cu.import("resource://gre/modules/Promise.jsm"); diff --git a/browser/extensions/loop/test/xpcshell/test_looprooms_getall.js b/browser/extensions/loop/test/xpcshell/test_looprooms_getall.js index 534ec287f1a..b4351e16a7e 100644 --- a/browser/extensions/loop/test/xpcshell/test_looprooms_getall.js +++ b/browser/extensions/loop/test/xpcshell/test_looprooms_getall.js @@ -4,7 +4,6 @@ "use strict"; Cu.import("resource://services-common/utils.js"); -Cu.import("resource:///modules/loop/LoopRooms.jsm"); Cu.import("resource:///modules/Chat.jsm"); Cu.import("resource://gre/modules/Promise.jsm"); diff --git a/browser/extensions/loop/test/xpcshell/test_looprooms_upgrade_to_encryption.js b/browser/extensions/loop/test/xpcshell/test_looprooms_upgrade_to_encryption.js index 36fdac465fb..acd73e23950 100644 --- a/browser/extensions/loop/test/xpcshell/test_looprooms_upgrade_to_encryption.js +++ b/browser/extensions/loop/test/xpcshell/test_looprooms_upgrade_to_encryption.js @@ -6,8 +6,8 @@ Cu.import("resource://services-common/utils.js"); -const loopCrypto = Cu.import("resource:///modules/loop/crypto.js", {}).LoopCrypto; -const { LOOP_ROOMS_CACHE_FILENAME } = Cu.import("resource:///modules/loop/LoopRoomsCache.jsm", {}); +const loopCrypto = Cu.import("chrome://loop/content/shared/js/crypto.js", {}).LoopCrypto; +const { LOOP_ROOMS_CACHE_FILENAME } = Cu.import("chrome://loop/content/modules/LoopRoomsCache.jsm", {}); var gTimerArgs = []; diff --git a/browser/extensions/loop/test/xpcshell/test_loopservice_hawk_errors.js b/browser/extensions/loop/test/xpcshell/test_loopservice_hawk_errors.js index 9cbe314ff0e..96d2f298c21 100644 --- a/browser/extensions/loop/test/xpcshell/test_loopservice_hawk_errors.js +++ b/browser/extensions/loop/test/xpcshell/test_loopservice_hawk_errors.js @@ -10,7 +10,7 @@ "use strict"; -const { INVALID_AUTH_TOKEN } = Cu.import("resource:///modules/loop/MozLoopService.jsm"); +const { INVALID_AUTH_TOKEN } = Cu.import("chrome://loop/content/modules/MozLoopService.jsm"); /** * An HTTP request for /NNN responds with a request with a status of NNN. diff --git a/browser/extensions/loop/ui/README.md b/browser/extensions/loop/ui/README.md index a0025bb5cff..f3912bc0090 100644 --- a/browser/extensions/loop/ui/README.md +++ b/browser/extensions/loop/ui/README.md @@ -5,6 +5,6 @@ This app file showcases all Loop's view components. If you want to modify the app, launch the following command: - browser/components/loop/build-jsx --watch + browser/extensions/loop/build-jsx --watch And start editing the `ui-showcase.jsx` file. diff --git a/browser/extensions/loop/ui/index.html b/browser/extensions/loop/ui/index.html index 1ea6254e327..b0581de67d2 100644 --- a/browser/extensions/loop/ui/index.html +++ b/browser/extensions/loop/ui/index.html @@ -10,7 +10,7 @@ + href="../content/panels/css/panel.css"> @@ -25,10 +25,10 @@
- - - - + + + + @@ -43,16 +43,16 @@ - + - - + + - - + +