From 54739ed8dedda522b21311206f5c246dc7b7ed7a Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Thu, 23 Apr 2015 15:57:33 -0400 Subject: [PATCH] Revert "Bug 1152969 - merge pull request #29689 from Cwiiis:bug1152969-can-save-empty-bookmark-name to mozilla-b2g:master" This reverts commit 84de27da21e4cf59b72a716183cf027e6e065866, reversing changes made to 42fd6933c82796870eaaacbed667f86217243d75. --- apps/bookmark/js/bookmark_editor.js | 4 +--- apps/bookmark/test/unit/bookmark_editor_test.js | 7 ------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/apps/bookmark/js/bookmark_editor.js b/apps/bookmark/js/bookmark_editor.js index dee7d68f0ad7..90e62d52b6e7 100644 --- a/apps/bookmark/js/bookmark_editor.js +++ b/apps/bookmark/js/bookmark_editor.js @@ -131,9 +131,7 @@ var BookmarkEditor = { */ _submit: function(event) { event.preventDefault(); - if (!this.saveButton.disabled) { - this.save(); - } + this.save(); }, _clearTitle: function bookmarkEditor_clearTitle(event) { diff --git a/apps/bookmark/test/unit/bookmark_editor_test.js b/apps/bookmark/test/unit/bookmark_editor_test.js index b53e479e3598..7dacbf9539c9 100644 --- a/apps/bookmark/test/unit/bookmark_editor_test.js +++ b/apps/bookmark/test/unit/bookmark_editor_test.js @@ -150,13 +150,6 @@ suite('bookmark_editor.js >', function() { test('Bookmarks with blank title should not be saved >', function() { assert.isTrue(BookmarkEditor.saveButton.disabled, 'Blank title, add button should be disabled'); - - var saveSpy = sinon.spy(BookmarkEditor, 'save'); - - BookmarkEditor.form.dispatchEvent(new CustomEvent('submit')); - assert.equal(saveSpy.callCount, 0); - - BookmarkEditor.save.restore(); }); test('Check save button typing website name ', function() {