Index: src/test/it/org/xwiki/test/ui/administration/elements/AdministrationPage.java
===================================================================
--- src/test/it/org/xwiki/test/ui/administration/elements/AdministrationPage.java	(revision 32528)
+++ src/test/it/org/xwiki/test/ui/administration/elements/AdministrationPage.java	(working copy)
@@ -46,6 +46,9 @@
     @FindBy(xpath = "//li[@class='Rights']/a/span/img")
     WebElement rightsLink;
 
+    @FindBy(xpath = "//li[@class='Annotations']/a/span/img")
+    WebElement annotationsLink;
+
     public void gotoPage()
     {
         getUtil().gotoPage("XWiki", "XWikiPreferences", "admin");
@@ -80,4 +83,10 @@
         this.rightsLink.click();
         return new GlobalRightsAdministrationSectionPage();
     }
+
+    public AnnotationsPage clickAnnotationsSection()
+    {
+        this.annotationsLink.click();
+        return new AnnotationsPage();
+    }
 }
Index: src/test/it/org/xwiki/test/ui/administration/elements/AnnotationsPage.java
===================================================================
--- src/test/it/org/xwiki/test/ui/administration/elements/AnnotationsPage.java	(revision 0)
+++ src/test/it/org/xwiki/test/ui/administration/elements/AnnotationsPage.java	(revision 0)
@@ -0,0 +1,91 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.xwiki.test.ui.administration.elements;
+
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.FindBy;
+
+/**
+ * Represents the actions possible on the Annotations Administration Page.
+ * 
+ * @version $Id$
+ * @since 2.7RC1
+ */
+
+public class AnnotationsPage extends AdministrationSectionPage
+{
+    public AnnotationsPage()
+    {
+        super("Annotations");
+    }
+
+    @FindBy(id = "AnnotationCode.AnnotationConfig_AnnotationCode.AnnotationConfig_0_activated")
+    private WebElement annotationsAreActivatedRadioYes;
+
+    @FindBy(id = "AnnotationCode.AnnotationConfig_AnnotationCode.AnnotationConfig_0_activated_false")
+    private WebElement annotationsAreActivatedRadioNo;
+
+    @FindBy(id = "AnnotationCode.AnnotationConfig_AnnotationCode.AnnotationConfig_0_displayed")
+    private WebElement displayAnnotationsByDefaultRadioYes;
+
+    @FindBy(id = "AnnotationCode.AnnotationConfig_AnnotationCode.AnnotationConfig_0_displayed_false")
+    private WebElement displayAnnotationsByDefaultRadioNo;
+
+    @FindBy(id = "AnnotationCode.AnnotationConfig_AnnotationCode.AnnotationConfig_0_displayHighlight")
+    private WebElement displayAnnotationsHighlightByDefaultRadioYes;
+
+    @FindBy(id = "AnnotationCode.AnnotationConfig_AnnotationCode.AnnotationConfig_0_displayHighlight_false")
+    private WebElement displayAnnotationsHighlightByDefaultRadioNo;
+
+    public void gotoPage()
+    {
+        getUtil().gotoPage("XWiki", "XWikiPreferences", "admin", "section=Annotations");
+    }
+
+    public void activateAnnotations()
+    {
+        this.annotationsAreActivatedRadioYes.click();
+    }
+
+    public void deactivateAnnotations()
+    {
+        this.annotationsAreActivatedRadioNo.click();
+    }
+
+    public void displayAnnotationsByDefault()
+    {
+        this.displayAnnotationsByDefaultRadioYes.click();
+    }
+
+    public void hideAnnotationsByDefault()
+    {
+        this.displayAnnotationsByDefaultRadioNo.click();
+    }
+
+    public void displayAnnotationsHighlightByDefault()
+    {
+        this.displayAnnotationsHighlightByDefaultRadioYes.click();
+    }
+
+    public void hideAnnotationsHighlightByDefault()
+    {
+        this.displayAnnotationsHighlightByDefaultRadioNo.click();
+    }
+}
Index: src/test/it/org/xwiki/test/ui/annotations/elements/AnnotationsPane.java
===================================================================
--- src/test/it/org/xwiki/test/ui/annotations/elements/AnnotationsPane.java	(revision 0)
+++ src/test/it/org/xwiki/test/ui/annotations/elements/AnnotationsPane.java	(revision 0)
@@ -0,0 +1,82 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.xwiki.test.ui.annotations.elements;
+
+import junit.framework.Assert;
+
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebElement;
+import org.xwiki.test.ui.framework.elements.ViewPage;
+
+/**
+ * Represents the actions possible on the Attachment Pane at the bottom of a page.
+ * 
+ * @version $Id$
+ * @since 2.7RC1
+ */
+public class AnnotationsPane extends ViewPage
+{
+    private boolean isVisible = false;
+
+    /**
+     * Toggles visible/invisible the Annotations Tab
+     */
+    public void toggleAnnotationsPane()
+    {
+        WebElement annotationsPane = getDriver().findElement(By.xpath("//div[@id='tmAnnotations']//a[@class='tme']"));
+        annotationsPane.click();
+        if (this.isVisible == true) {
+            this.isVisible = false;
+        }
+        if (this.isVisible == false) {
+            this.isVisible = true;
+        }
+    }
+
+    /**
+     * Checks the "Show Annotations" check box
+     */
+    public void showAnnotations()
+    {
+        if (this.isVisible == false) {
+            Assert.fail("Annotation Pane is hidden");
+        }
+        waitUntilElementIsVisible(By.className("annotationsettings"));
+        WebElement checkBox = getDriver().findElement(By.id("annotationsdisplay"));
+        if (checkBox.isSelected() == false) {
+            checkBox.setSelected();
+        }
+    }
+
+    /**
+     * Un-Checks the "Show Annotations" checkbox
+     */
+    public void hideAnnotations()
+    {
+        if (this.isVisible == false) {
+            Assert.fail("Annotation Pane is hidden");
+        }
+        waitUntilElementIsVisible(By.className("annotationsettings"));
+        WebElement checkBox = getDriver().findElement(By.id("annotationsdisplay"));
+        if (checkBox.isSelected() == true) {
+            checkBox.toggle();
+        }
+    }
+}
Index: src/test/it/org/xwiki/test/ui/annotations/elements/AnnotationsWindow.java
===================================================================
--- src/test/it/org/xwiki/test/ui/annotations/elements/AnnotationsWindow.java	(revision 0)
+++ src/test/it/org/xwiki/test/ui/annotations/elements/AnnotationsWindow.java	(revision 0)
@@ -0,0 +1,134 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.xwiki.test.ui.annotations.elements;
+
+import org.openqa.selenium.By;
+import org.openqa.selenium.JavascriptExecutor;
+import org.openqa.selenium.Keys;
+import org.openqa.selenium.RenderedWebElement;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.FindBy;
+import org.xwiki.test.ui.framework.elements.ViewPage;
+
+/**
+ * Represents the Annotation window that appears when selecting a text and simulating CTRL+M.
+ * 
+ * @version $Id$
+ * @since 2.7RC1
+ */
+public class AnnotationsWindow extends ViewPage
+{
+    @FindBy(xpath = "//div[@class='buttons']//input[@type='submit']")
+    private WebElement submitButton;
+
+    @FindBy(xpath = "//div[@class='buttons']//input[@type='reset']")
+    private WebElement cancelButton;
+
+    @FindBy(xpath = "//textarea[@id='annotation']")
+    private WebElement inputText;
+
+    private StringBuilder script;
+
+    /**
+     * the super() constructor + injection of the js function that selects the text from the page (drag-over with mouse
+     * simulation)
+     */
+    public AnnotationsWindow()
+    {
+        super();
+        script = new StringBuilder();
+        script.append("function findString (str) {\n");
+        script.append("var strFound;\n");
+        script.append("if (window.find) {\n");
+        script.append("if (parseInt(navigator.appVersion)<4) return;\n");
+        script.append("// CODE FOR BROWSERS THAT SUPPORT window.find\n");
+        script.append("strFound=self.find(str);\n");
+        script.append("if (strFound && self.getSelection && !self.getSelection().anchorNode) {\n");
+        script.append("strFound=self.find(str);\n");
+        script.append("}\n");
+        script.append("if (!strFound) {\n");
+        script.append("strFound=self.find(str,0,1);\n");
+        script.append("while (self.find(str,0,1)) continue;\n");
+        script.append("}\n");
+        script.append("}\n");
+        script.append("else if (navigator.appName.indexOf(\"Microsoft\")!=-1) {\n");
+        script.append("// EXPLORER-SPECIFIC CODE\n");
+        script.append("if (TRange!=null)\n");
+        script.append("{\n");
+        script.append("TRange.collapse(false);\n");
+        script.append("strFound=TRange.findText(str);\n");
+        script.append("if (strFound) TRange.select();\n");
+        script.append("}\n");
+        script.append("if (TRange==null || strFound==0) {\n");
+        script.append("TRange=self.document.body.createTextRange();\n");
+        script.append("strFound=TRange.findText(str);\n");
+        script.append(" if (strFound) TRange.select();\n");
+        script.append("}\n");
+        script.append("}\n");
+        script.append("else if (navigator.appName==\"Opera\") {\n");
+        script.append("alert (\"Opera browsers not supported, sorry...\");\n");
+        script.append("return;\n");
+        script.append("}\n");
+        script.append("if (!strFound) \n");
+        script.append("return;\n");
+        script.append("}\n");
+        JavascriptExecutor js = (JavascriptExecutor) getDriver();
+        js.executeScript(script.toString());
+    }
+
+    /**
+     * @param annotationWord string that will be selected on the screen
+     */
+    public void selectAnnotationWord(String annotationWord)
+    {
+        JavascriptExecutor js = (JavascriptExecutor) getDriver();
+        js.executeScript(script + "findString('" + annotationWord + "');");
+    }
+
+    public void enterAnnotationText(String annotationText)
+    {
+        waitUntilElementIsVisible(By.className("annotation-box-create"));
+        this.inputText.sendKeys(annotationText);
+    }
+
+    public void saveAnnotation()
+    {
+        this.submitButton.click();
+    }
+
+    public void cancelAnnotation()
+    {
+        this.cancelButton.click();
+    }
+
+    public void addAnnotation(String selectedText, String annotationText)
+    {
+        this.selectAnnotationWord(selectedText);
+        this.simulateCTRL_M();
+        this.enterAnnotationText(annotationText);
+        this.saveAnnotation();
+    }
+
+    public void simulateCTRL_M()
+    {
+        RenderedWebElement body = (RenderedWebElement) getDriver().findElement(By.id("body"));
+        body.sendKeys(Keys.CONTROL, "m");
+    }
+}
Index: src/test/it/org/xwiki/test/ui/annotations/elements/AnnotationsLabel.java
===================================================================
--- src/test/it/org/xwiki/test/ui/annotations/elements/AnnotationsLabel.java	(revision 0)
+++ src/test/it/org/xwiki/test/ui/annotations/elements/AnnotationsLabel.java	(revision 0)
@@ -0,0 +1,110 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.xwiki.test.ui.annotations.elements;
+
+import org.openqa.selenium.By;
+import org.openqa.selenium.Keys;
+import org.openqa.selenium.RenderedWebElement;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.FindBy;
+import org.xwiki.test.ui.framework.elements.ViewPage;
+
+/**
+ * Implements the Annotation window that appears when selecting an annotation
+ * 
+ * @version $Id$
+ * @since 2.7RC1
+ */
+
+public class AnnotationsLabel extends ViewPage
+{
+
+    @FindBy(xpath = "//a[@title='Delete this annotation']")
+    private WebElement deleteAnnotation;
+
+    @FindBy(xpath = "//span[@class='annotationAuthor']")
+    private WebElement annotationAuthor;
+
+    @FindBy(xpath = "annotationDate")
+    private WebElement annotationDate;
+
+    private void selectAnnotationByText(String searchText)
+    {
+        String classId = this.getAnnotationIdByText(searchText);
+        WebElement annotationPanel = getDriver().findElement(By.xpath("//span[@id='" + classId + "']"));
+        annotationPanel.click();
+    }
+
+    private void selectAnnotationById(String idText)
+    {
+        WebElement annotationPanel = getDriver().findElement(By.xpath("//span[@id='" + idText + "']"));
+        annotationPanel.click();
+    }
+
+    public void deleteAnnotationByText(String searchText)
+    {
+        this.selectAnnotationByText(searchText);
+        this.deleteAnnotation.click();
+        waitUntilElementIsVisible(By.xpath("//input[@value='Yes']"));
+        getDriver().findElement(By.xpath("//input[@value='Yes']")).click();
+    }
+
+    public void deleteAnnotationById(String idText)
+    {
+        this.selectAnnotationById(idText);
+        this.deleteAnnotation.click();
+        waitUntilElementIsVisible(By.xpath("//input[@value='Yes']"));
+        getDriver().findElement(By.xpath("//input[@value='Yes']")).click();
+    }
+
+    public String getAnnotationAuthorById(String idText)
+    {
+        WebElement annotationPanel = getDriver().findElement(By.xpath("//span[@id='" + idText + "']"));
+        annotationPanel.click();
+        return this.annotationAuthor.getText();
+    }
+
+    public String getAnnotationsAuthorByText(String searchText)
+    {
+        this.selectAnnotationByText(searchText);
+        return this.annotationAuthor.getText();
+    }
+
+    public String getAnnotationIdByText(String searchText)
+    {
+        waitUntilElementIsVisible(By.xpath("//span[contains(.,'" + searchText + "')]"));
+        WebElement annotation = getDriver().findElement(By.xpath("//span[contains(.,'" + searchText + "')]"));
+        String classId = annotation.getAttribute("class");
+        classId = classId.split("\\s+")[1];
+        return classId;
+    }
+
+    public String getAnnotationContentByText(String searchText)
+    {
+        String classId = this.getAnnotationIdByText(searchText);
+        getDriver().findElement(By.xpath("//span[@id='" + classId + "']")).click();
+        waitUntilElementIsVisible(By.xpath("//div[@class='annotationText']/p"));
+        String annotationContent = getDriver().findElement(By.xpath("//div[@class='annotationText']/p")).getText();
+        RenderedWebElement body = (RenderedWebElement) getDriver().findElement(By.id("body"));
+        body.sendKeys(Keys.ESCAPE);
+        waitUntilElementDisappears(By.className("annotation-box-view"));
+        return annotationContent;
+    }
+}
Index: src/test/it/org/xwiki/test/ui/annotations/AnnotationsTest.java
===================================================================
--- src/test/it/org/xwiki/test/ui/annotations/AnnotationsTest.java	(revision 0)
+++ src/test/it/org/xwiki/test/ui/annotations/AnnotationsTest.java	(revision 0)
@@ -0,0 +1,230 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.xwiki.test.ui.annotations;
+
+import junit.framework.Assert;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.NoSuchElementException;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.ui.Select;
+import org.xwiki.test.ui.administration.elements.AdministrationPage;
+import org.xwiki.test.ui.administration.elements.AnnotationsPage;
+import org.xwiki.test.ui.annotations.elements.AnnotationsLabel;
+import org.xwiki.test.ui.annotations.elements.AnnotationsPane;
+import org.xwiki.test.ui.annotations.elements.AnnotationsWindow;
+import org.xwiki.test.ui.framework.AbstractAdminAuthenticatedTest;
+import org.xwiki.test.ui.framework.elements.ViewPage;
+import org.xwiki.test.ui.framework.elements.editor.WikiEditPage;
+import org.xwiki.test.ui.xe.elements.HomePage;
+
+/**
+ * Annotation Test.
+ * 
+ * @version $Id$
+ * @since 2.7RC1
+ */
+public class AnnotationsTest extends AbstractAdminAuthenticatedTest
+{
+    private static final String CONTENT =
+        "It's an easy-to-edit website that will help you work better together. This Wiki is made of pages "
+            + "sorted by spaces. You're currently in the Main space, looking at its home page (WebHome).";
+
+    private static final String DOC_NAME = "AnnotationsTestPage";
+
+    private static final String SPACE_NAME = "Main";
+
+    private static final String DOC_TITLE = "AnnotationsTest";
+
+    private static final String ANNOTATED_TEXT_1 = "work better together";
+
+    private static final String ANNOTATION_TEXT_1 = "XWiki motto";
+
+    private static final String ANNOTATED_TEXT_2 = "WebHome";
+
+    private static final String ANNOTATION_TEXT_2 = "Every Space has it's own webhome";
+
+    private static final String ANNOTATED_TEXT_3 = "Main space";
+
+    private static final String ANNOTATION_TEXT_3 = "Each XWiki instance has a Main space";
+
+    private static final String ANNOTATED_TEXT_4 = "easy-to-edit website";
+
+    private static final String ANNOTATION_TEXT_4 = "Yes, we have our WYSIWYG";
+
+    private static final String XWIKI_SYNTAX_1_WARNING =
+        "Annotations are not available for documents in XWiki/1.0 syntax.";
+
+    private static final String XWIKI_ANNOTATION_ADD_SUCCESS = "Annotation has been successfully added";
+
+    private static final String XWIKI_ANNOTATION_DELETE_SUCCESS = "Annotation deleted";
+
+    private ViewPage vp;
+
+    private HomePage homePage;
+
+    private AnnotationsPane annotationsPane;
+
+    private AnnotationsWindow annotationsWindow;
+
+    private AnnotationsLabel annotationsLabel;
+
+    AdministrationPage adminPage;
+
+    AnnotationsPage annotationsAdminPage;
+
+    WebElement save;
+
+    @Before
+    @Override
+    public void setUp()
+    {
+        super.setUp();
+        getUtil().deletePage(SPACE_NAME, DOC_NAME);
+
+    }
+
+    void addAnnotation(String annotatedText, String annotationText)
+    {
+        annotationsWindow.addAnnotation(annotatedText, annotationText);
+        // waiting for the notification that the operation is done
+        vp.waitUntilElementIsVisible(By.className("xnotification-done"), 20);
+        // check is the saved successfully message is displayed
+        save = getDriver().findElement(By.className("xnotification-done"));
+        Assert.assertEquals(XWIKI_ANNOTATION_ADD_SUCCESS, save.getText());
+        save.click();
+        Assert.assertEquals(annotationText, annotationsLabel.getAnnotationContentByText(annotatedText));
+        // wait until the notification disappears
+    }
+
+    void deleteAnnotationByID(String id)
+    {
+        annotationsLabel.deleteAnnotationById(id);
+        vp.waitUntilElementIsVisible(By.className("xnotification-done"), 20);
+        WebElement delete = getDriver().findElement(By.className("xnotification-done"));
+        Assert.assertEquals(XWIKI_ANNOTATION_DELETE_SUCCESS, delete.getText());
+        delete.click();
+    }
+
+    void deleteAnnotationByText(String annotatedText)
+    {
+        annotationsLabel.deleteAnnotationByText(annotatedText);
+        vp.waitUntilElementIsVisible(By.className("xnotification-done"), 20);
+        WebElement delete = getDriver().findElement(By.className("xnotification-done"));
+        delete = getDriver().findElement(By.className("xnotification-done"));
+        Assert.assertEquals(XWIKI_ANNOTATION_DELETE_SUCCESS, delete.getText());
+        delete.click();
+    }
+
+    @Test
+    public void defaultAnnotationsTest()
+    {
+        homePage = new HomePage();
+        homePage.gotoPage();
+
+        WikiEditPage wep = new WikiEditPage();
+        wep.switchToEdit(SPACE_NAME, DOC_NAME);
+        wep.setTitle(DOC_TITLE);
+        wep.setContent(CONTENT);
+        vp = wep.clickSaveAndView();
+        annotationsPane = new AnnotationsPane();
+
+        annotationsPane.toggleAnnotationsPane();
+        annotationsPane.showAnnotations();
+
+        annotationsWindow = new AnnotationsWindow();
+        annotationsLabel = new AnnotationsLabel();
+        this.addAnnotation(ANNOTATED_TEXT_1, ANNOTATION_TEXT_1);
+        this.addAnnotation(ANNOTATED_TEXT_2, ANNOTATION_TEXT_2);
+        this.addAnnotation(ANNOTATED_TEXT_3, ANNOTATION_TEXT_3);
+        this.addAnnotation(ANNOTATED_TEXT_4, ANNOTATION_TEXT_4);
+
+        // delete annotations
+        this.deleteAnnotationByID("ID0");
+        this.deleteAnnotationByText(ANNOTATED_TEXT_2);
+        this.deleteAnnotationByText(ANNOTATED_TEXT_3);
+        this.deleteAnnotationByText(ANNOTATED_TEXT_4);
+
+    }
+
+    // This test creates a XWiki 1.0 syntax page, and tries to add annotations to it, and checks if the warning messages
+    // are shown
+    // This test is against XAANNOTATIONS-17
+    @Test
+    public void xwikiPageSyntaxAnnotationsTest()
+    {
+        homePage = new HomePage();
+        homePage.gotoPage();
+        adminPage = new AdministrationPage();
+        annotationsPane = new AnnotationsPane();
+        annotationsWindow = new AnnotationsWindow();
+        annotationsLabel = new AnnotationsLabel();
+        homePage.gotoPage();
+        WikiEditPage wep = new WikiEditPage();
+        wep.switchToEdit(SPACE_NAME, DOC_NAME);
+        wep.setTitle(DOC_TITLE);
+        wep.setContent(CONTENT);
+        Select select = new Select(getDriver().findElement(By.xpath("//select[@id='xwikidocsyntaxinput2']")));
+        select.selectByVisibleText("XWiki 1.0");
+        ViewPage vp = wep.clickSaveAndView();
+        annotationsPane.toggleAnnotationsPane();
+        try {
+            Assert.assertEquals(0, getDriver().findElements(By.id("annotationsdisplay")).size());
+            getDriver().findElement(By.id("annotationsdisplay"));
+            Assert.fail("Annotations are disabled in 1.0 Pages. This element should no be here");
+        } catch (NoSuchElementException e) {
+            // This is normal, test passes
+        }
+        annotationsWindow.simulateCTRL_M();
+        try {
+            vp = new ViewPage();
+            vp.waitUntilElementIsVisible(By.className("xnotification-warning"), 20);
+            WebElement warning = getDriver().findElement(By.className("xnotification-warning"));
+            Assert.assertEquals(2, getDriver().findElements(By.className("xnotification-warning")).size());
+            Assert.assertEquals(XWIKI_SYNTAX_1_WARNING, warning.getText());
+        } catch (NoSuchElementException e) {
+            // This should not happen. THe warning that Annotations are disabled in 1.0 syntax should appear.
+            Assert.fail("There is no warning that annotations are disabled for 1.0 pages");
+        }
+        adminPage.gotoPage();
+        annotationsAdminPage = adminPage.clickAnnotationsSection();
+        annotationsAdminPage.activateAnnotations();
+        annotationsAdminPage.displayAnnotationsByDefault();
+        annotationsAdminPage.displayAnnotationsHighlightByDefault();
+        annotationsAdminPage.clickSave();
+
+        getUtil().gotoPage(SPACE_NAME, DOC_NAME);
+        // Landing directly on this page might result in notification not to be displayed
+        getDriver().navigate().refresh();
+        vp.waitUntilElementIsVisible(By.id("body"), 20);
+        try {
+            vp = new ViewPage();
+            vp.waitUntilElementIsVisible(By.className("xnotification-warning"), 20);
+            WebElement warning = getDriver().findElement(By.className("xnotification-warning"));
+            Assert.assertEquals(XWIKI_SYNTAX_1_WARNING, warning.getText());
+            Assert.assertEquals(1, getDriver().findElements(By.className("xnotification-warning")).size());
+        } catch (NoSuchElementException e) {
+            // This should not happen. The warning that Annotations are disabled in 1.0 syntax should appear.
+            Assert.fail("There is no warning that annotations are disabled for 1.0 pages");
+        }
+    }
+}
