Index: quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/browser/views.py
===================================================================
--- quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/browser/views.py	(revision 3223)
+++ quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/browser/views.py	(revision 3224)
@@ -65,5 +65,5 @@
                                                  'Subject', ()),
             "seo_keywords": self.getSEOProperty('qSEO_keywords', default=()),
-            "seo_canonical": self.getCanonical(),
+            "seo_canonical": self.getSEOProperty(CANONICAL_PROPERTY),
             # Add test properties
             "has_seo_title": self.context.hasProperty('qSEO_title'),
@@ -158,7 +158,11 @@
         return result
 
+    # Not used
     def getCanonical(self):
-        canonical = queryAdapter(self.context, ICanonicalLink)
-        return canonical and canonical.canonical_link or ""
+        # TODO: rewrite function structure
+        if self.context.hasProperty(CANONICAL_PROPERTY):
+            canonical = queryAdapter(self.context, ICanonicalLink)
+            return canonical and canonical.canonical_link or ""
+        return ""
 
 
Index: quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/tests/testCanonicalURL.py
===================================================================
--- quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/tests/testCanonicalURL.py	(revision 3223)
+++ quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/tests/testCanonicalURL.py	(revision 3224)
@@ -5,4 +5,6 @@
 import re
 from Products.CMFCore.utils import getToolByName
+from quintagroup.canonicalpath.adapters import PROPERTY_LINK \
+                                        as CANONICAL_PROPERTY
 
 
@@ -20,12 +22,57 @@
                                 re.S | re.M)
 
-    def test_CanonicalURL(self):
+    def test_NoCanonicalURL(self):
         html = self.publish(self.mydoc_path, self.basic_auth).getBody()
         foundcurls = self.curl.findall(html)
-        mydoc_url = self.mydoc.absolute_url()
+        assert not self.mydoc.hasProperty(CANONICAL_PROPERTY)
+        self.assertTrue(not foundcurls, "CANONICAL URL found, " \
+                "but object hasn't '%s' property" % CANONICAL_PROPERTY)
 
-        self.assertTrue([1 for curl in foundcurls if curl == mydoc_url],
+    def test_CanonicalProperty(self):
+        self.assertTrue(not self.mydoc.hasProperty(CANONICAL_PROPERTY),
+                        'Canonical URL property is present in new document.')
+
+    def test_CanonicalPropertyEnable(self):
+        curl = '/newcanonical'
+        res = self.publish(self.mydoc_path + '/@@seo-context-properties?' \
+                     'seo_canonical=%s&seo_canonical_override=checked&'\
+                     'form.submitted=1&form.button.Save=Save' % curl,
+                      self.basic_auth).getBody()
+
+        self.assertTrue(self.mydoc.hasProperty(CANONICAL_PROPERTY),
+                        'Overriding Canonical URL enabled,' \
+                        'but object hasn\'t canonical url property')
+
+        self.assertTrue(self.mydoc.getProperty(CANONICAL_PROPERTY) == curl,
+                        "Wrong Canonical URL for document: %s, all must be: %s"
+                        % (self.mydoc.getProperty(CANONICAL_PROPERTY), curl))
+
+    def test_CanonicalPropertyDisable(self):
+        curl = '/newcanonical'
+        self.mydoc.manage_addProperty(CANONICAL_PROPERTY, curl,
+                                      'string')
+
+        assert self.mydoc.getProperty(CANONICAL_PROPERTY) == curl
+
+        res = self.publish(self.mydoc_path + '/@@seo-context-properties?' \
+                     'seo_canonical=%s&seo_canonical_override=&'\
+                     'form.submitted=1&form.button.Save=Save' % curl,
+                      self.basic_auth).getBody()
+
+        self.assertTrue(not self.mydoc.hasProperty(CANONICAL_PROPERTY),
+                        'Overriding Canonical URL disabled,' \
+                        'but canonical link is present in object properties')
+
+    def test_CanonicalUrlPresent(self):
+        self.mydoc.manage_addProperty(CANONICAL_PROPERTY, self.mydoc_path,
+                                      'string')
+        assert self.mydoc.hasProperty(CANONICAL_PROPERTY)
+
+        html = self.publish(self.mydoc_path, self.basic_auth).getBody()
+        foundcurls = self.curl.findall(html)
+
+        self.assertTrue([1 for curl in foundcurls if curl == self.mydoc_path],
            "Wrong CANONICAL URL for document: %s, all must be: %s" % (
-           foundcurls, mydoc_url))
+           foundcurls, self.mydoc_path))
 
     def test_updateCanonicalURL(self):
