Index: .hgsubstate
===================================================================
--- .hgsubstate	(revision 1693)
+++ .hgsubstate	(revision 1709)
@@ -1,1 +1,1 @@
-3811959404614e7014b897d3d3b96caad10e214f inc/libs/clearbricks
+7f6890267d808320431acd04f4dae19dcb027a80 inc/libs/clearbricks
Index: admin/js/_post.js
===================================================================
--- admin/js/_post.js	(revision 1714)
+++ admin/js/_post.js	(revision 1717)
@@ -154,5 +154,5 @@
 		});
 		$('#label_comment_tb').toggleWithLegend($('#label_comment_tb').parent().children().not('#label_comment_tb'),{
-			cookie: 'dcx_comment_tb',
+			user_pref: 'dcx_comment_tb',
 			legend_click: true
 		});
Index: tests/functional/fixtures/comments_list.html
===================================================================
--- tests/functional/fixtures/comments_list.html	(revision 1703)
+++ tests/functional/fixtures/comments_list.html	(revision 1703)
@@ -0,0 +1,20 @@
+<form action="comments_actions.php" method="post" id="form-comments">
+  <p>
+    <input type="checkbox" name="comments[]" value="1"/>
+    <a href="comment.php?id=1">title1</a>
+  </p>
+  <p>
+    <input type="checkbox" name="comments[]" value="2"/>
+    <a href="comment.php?id=2">title2</a>
+  </p>
+  <p>
+    <input type="checkbox" name="comments[]" value="4"/>
+    <a href="comment.php?id=4">title</a>
+  </p>
+  <select name="action" id="action" >
+    <option value="publish">Publier</option>
+    <option value="unpublish">Mettre hors ligne</option>
+    <option value="pending">Mettre en attente</option>
+    <option value="delete">Supprimer</option>
+  </select>
+</form>
Index: tests/functional/fixtures/posts_list.html
===================================================================
--- tests/functional/fixtures/posts_list.html	(revision 1703)
+++ tests/functional/fixtures/posts_list.html	(revision 1703)
@@ -0,0 +1,21 @@
+<form action="posts_actions.php" method="post" id="form-entries">
+  <p>
+    <input type="checkbox" name="entries[]" value="1"/>
+    <a href="post.php?id=1">title1</a>
+  </p>
+  <p>
+    <input type="checkbox" name="entries[]" value="2"/>
+    <a href="post.php?id=2">title2</a>
+  </p>
+  <p>
+    <input type="checkbox" name="entries[]" value="4"/>
+    <a href="post.php?id=4">title</a>
+  </p>
+  <select name="action" id="action" >
+    <option value="publish">Publier</option>
+    <option value="unpublish">Mettre hors ligne</option>
+    <option value="schedule">Programmer</option>
+    <option value="pending">Mettre en attente</option>
+    <option value="delete">Supprimer</option>
+  </select>
+</form>
Index: tests/functional/index.html
===================================================================
--- tests/functional/index.html	(revision 1602)
+++ tests/functional/index.html	(revision 1703)
@@ -17,4 +17,6 @@
     <script type="text/javascript" src="spec/users_actions.js"></script>
     <script type="text/javascript" src="spec/toggle_with_legend.js"></script>
+
+    <script type="text/javascript" src="spec/common.js"></script>
   </head>
   <body>
Index: tests/functional/js/fix_include.js
===================================================================
--- tests/functional/js/fix_include.js	(revision 1602)
+++ tests/functional/js/fix_include.js	(revision 1703)
@@ -8,2 +8,4 @@
 jQuery.fn.backgroundFade = function() {};
 
+dotclear.msg.confirm_delete_posts = 'confirm %s delete';
+dotclear.msg.confirm_delete_comments = 'confirm %s delete';
Index: tests/functional/spec/common.js
===================================================================
--- tests/functional/spec/common.js	(revision 1703)
+++ tests/functional/spec/common.js	(revision 1703)
@@ -0,0 +1,83 @@
+describe("Others common methods (admin/js/common.js)", function() {
+    describe("postsActionsHelper", function() {
+	it("A confirm popup must appear if action is \"delete\" and at least on checkbox is checked", function() {
+	    loadFixtures('posts_list.html');
+	    dotclear.postsActionsHelper();
+	    
+	    spyOn(window, 'confirm').andReturn(false);
+	    var submitCallback = jasmine.createSpy().andReturn(false);
+	    $('#form-entries').submit(submitCallback);
+
+	    $('select[name="action"] option[value="delete"]').attr('selected', 'selected');
+	    $('input[type="checkbox"][name="entries[]"][value="2"]').attr('checked', 'checked');
+
+	    $('#form-entries').trigger('submit');
+	    expect(window.confirm).toHaveBeenCalled();
+	});
+	it("Confirm popup doesn't appear if action is \"delete\" but no checkbox is checked", function() {
+	    loadFixtures('posts_list.html');
+	    dotclear.postsActionsHelper();
+	    
+	    spyOn(window, 'confirm').andReturn(false);
+	    var submitCallback = jasmine.createSpy().andReturn(false);
+	    $('#form-entries').submit(submitCallback);
+
+	    $('select[name="action"] option[value="delete"]').attr('selected', 'selected');
+	    $('#form-entries').trigger('submit');
+	    expect(window.confirm).not.toHaveBeenCalled();
+	});
+	it("Others actions don't show confirm popup", function() {
+	    loadFixtures('posts_list.html');
+	    dotclear.postsActionsHelper();
+	    
+	    spyOn(window, 'confirm').andReturn(false);
+	    var submitCallback = jasmine.createSpy().andReturn(false);
+	    $('#form-entries').submit(submitCallback);
+
+	    $('select[name="action"] option[value="publish"]').attr('selected', 'selected');
+	    $('#form-entries').trigger('submit');
+	    expect(window.confirm).not.toHaveBeenCalled();
+	});
+    });
+
+    describe("commentsActionsHelper", function() {
+	it("A confirm popup must appear if action is \"delete\" and at least on checkbox is checked", function() {
+	    loadFixtures('comments_list.html');
+	    dotclear.commentsActionsHelper();
+	    
+	    spyOn(window, 'confirm').andReturn(false);
+	    var submitCallback = jasmine.createSpy().andReturn(false);
+	    $('#form-comments').submit(submitCallback);
+
+	    $('select[name="action"] option[value="delete"]').attr('selected', 'selected');
+	    $('input[type="checkbox"][name="comments[]"][value="2"]').attr('checked', 'checked');
+
+	    $('#form-comments').trigger('submit');
+	    expect(window.confirm).toHaveBeenCalled();
+	});
+	it("Confirm popup doesn't appear if action is \"delete\" but no checkbox is checked", function() {
+	    loadFixtures('comments_list.html');
+	    dotclear.commentsActionsHelper();
+	    
+	    spyOn(window, 'confirm').andReturn(false);
+	    var submitCallback = jasmine.createSpy().andReturn(false);
+	    $('#form-comments').submit(submitCallback);
+
+	    $('select[name="action"] option[value="delete"]').attr('selected', 'selected');
+	    $('#form-comments').trigger('submit');
+	    expect(window.confirm).not.toHaveBeenCalled();
+	});
+	it("Others actions don't show confirm popup", function() {
+	    loadFixtures('comments_list.html');
+	    dotclear.commentsActionsHelper();
+	    
+	    spyOn(window, 'confirm').andReturn(false);
+	    var submitCallback = jasmine.createSpy().andReturn(false);
+	    $('#form-comments').submit(submitCallback);
+
+	    $('select[name="action"] option[value="publish"]').attr('selected', 'selected');
+	    $('#form-comments').trigger('submit');
+	    expect(window.confirm).not.toHaveBeenCalled();
+	});
+    });
+});
Index: tests/functional/spec/toggle_with_legend.js
===================================================================
--- tests/functional/spec/toggle_with_legend.js	(revision 1606)
+++ tests/functional/spec/toggle_with_legend.js	(revision 1703)
@@ -1,3 +1,3 @@
-describe("Label clickable", function() {
+describe("toggleWithLegend method (admin/js/common.js)", function() {
     it("Click arrow must make target visible", function() {
 	loadFixtures('menu.html');
Index: tests/functional/spec/users_actions.js
===================================================================
--- tests/functional/spec/users_actions.js	(revision 1602)
+++ tests/functional/spec/users_actions.js	(revision 1703)
@@ -1,3 +1,3 @@
-describe("Permissions feature", function() {
+describe("updatePermissionsForm method (admin/js/_users_actions.js)", function() {
     it("Click admin persmission must checked all associated permissions", function() {
 	loadFixtures('normal.html');
