Gallery: Handle empty splice events in Ribbon view.
commitf2df938e0948f76e3677f264f9d495d7b20f082c
authorhirono <hirono@chromium.org>
Fri, 12 Jun 2015 10:41:49 +0000 (12 03:41 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 12 Jun 2015 10:43:30 +0000 (12 10:43 +0000)
treee65d032a53189095a75946772a5ac1884ae06c09
parentb567a5775e63641d64dd10bf4ebe6f652b5e7743
Gallery: Handle empty splice events in Ribbon view.

Previously Ribbon view crashed if an empty splice evnet is dispatched to.
The CL adds guard closure to the head of event handler.

BUG=489627
TEST=GalleryJsTest.RibbonTest

Review URL: https://codereview.chromium.org/1177393003

Cr-Commit-Position: refs/heads/master@{#334142}
chrome/browser/chromeos/file_manager/gallery_jstest.cc
ui/file_manager/gallery/js/ribbon.js
ui/file_manager/gallery/js/ribbon_unittest.html [new file with mode: 0644]
ui/file_manager/gallery/js/ribbon_unittest.js [new file with mode: 0644]