Closed Bug 1049831 Opened 10 years ago Closed 10 years ago

Remove app_chrome.js dead code

Categories

(Firefox OS Graveyard :: Gaia::System::Browser Chrome, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: vingtetun, Assigned: vingtetun)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch dead.app_chrome.code.patch (obsolete) — Splinter Review
Hey Kevin,

there is a lot of dead code in app_chrome.js. Let's remove it.

At first I didn't really want to do that now but I realized that it ask Chris to do some additional code, and I have to review some code that is pure dead code...

If you want to try out this patch: https://github.com/vingtetun/gaia/tree/app_chrome-cleanup
Attachment #8468712 - Flags: review?(kgrandon)
Oups. I forgot to |git add -u| my last change!
Attachment #8468712 - Attachment is obsolete: true
Attachment #8468712 - Flags: review?(kgrandon)
Attachment #8468714 - Flags: review?(kgrandon)
Comment on attachment 8468714 [details] [diff] [review]
dead.app_chrome.code.patch

Review of attachment 8468714 [details] [diff] [review]:
-----------------------------------------------------------------

Seems fine to me. Thanks!

::: apps/system/style/wrapper/wrapper.css
@@ +27,3 @@
>    pointer-events: auto;
> +  display: none;
> +} 

Extra space?
Attachment #8468714 - Flags: review?(kgrandon) → review+
Comment on attachment 8468714 [details] [diff] [review]
dead.app_chrome.code.patch

Review of attachment 8468714 [details] [diff] [review]:
-----------------------------------------------------------------

::: apps/system/test/unit/app_chrome_test.js
@@ -289,5 @@
> -      var app = new AppWindow(fakeAppConfig1);
> -      var chrome = new AppChrome(app);
> -      var stubAddBookmark = this.sinon.stub(chrome, 'onAddBookmark');
> -      chrome.handleEvent({ type: 'click', target: chrome.bookmarkButton });
> -      assert.isTrue(stubAddBookmark.called);

This test could be converted to use the overflow menu's add-to-home button instead of being removed? Just call showOverflowMenu, replace onAddBookmark with onAddToHome and bookmarkButton with addToHomeButton.
Blocks: 1048927
(In reply to Chris Lord [:cwiiis] from comment #4)
> Comment on attachment 8468714 [details] [diff] [review]
> dead.app_chrome.code.patch
> 
> Review of attachment 8468714 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: apps/system/test/unit/app_chrome_test.js
> @@ -289,5 @@
> > -      var app = new AppWindow(fakeAppConfig1);
> > -      var chrome = new AppChrome(app);
> > -      var stubAddBookmark = this.sinon.stub(chrome, 'onAddBookmark');
> > -      chrome.handleEvent({ type: 'click', target: chrome.bookmarkButton });
> > -      assert.isTrue(stubAddBookmark.called);
> 
> This test could be converted to use the overflow menu's add-to-home button
> instead of being removed? Just call showOverflowMenu, replace onAddBookmark
> with onAddToHome and bookmarkButton with addToHomeButton.

Fixed.
https://github.com/mozilla-b2g/gaia/commit/d2d93b782446fe5d1b4bba9305ce4176669912be
Assignee: nobody → 21
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: