summaryrefslogtreecommitdiffstats
path: root/components/test
diff options
context:
space:
mode:
authoryfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-03 17:26:14 +0000
committeryfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-03 17:26:14 +0000
commit290570034ffb0dfcfd404996edebfb5b148aa4cb (patch)
tree0c117a800485a00f2ef85363b4793f017514ad63 /components/test
parentb102c081232ef7f619c92f7030df98290d98bb1f (diff)
downloadchromium_src-290570034ffb0dfcfd404996edebfb5b148aa4cb.zip
chromium_src-290570034ffb0dfcfd404996edebfb5b148aa4cb.tar.gz
chromium_src-290570034ffb0dfcfd404996edebfb5b148aa4cb.tar.bz2
Make DistillerPageWebContentsTest a real test that uses the distiller.
Previously, the test used a hardcoded distiller template which didn't help test the distiller. Updates the test to use the real distiller and adds tests for relativization of images and anchors. In the process, attempts to handle a few failure modes of the distiller. BUG=353349,354737 TBR=blundell Review URL: https://codereview.chromium.org/211493008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261463 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/test')
-rw-r--r--components/test/data/dom_distiller/simple_article.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/components/test/data/dom_distiller/simple_article.html b/components/test/data/dom_distiller/simple_article.html
new file mode 100644
index 0000000..ed6b1e2
--- /dev/null
+++ b/components/test/data/dom_distiller/simple_article.html
@@ -0,0 +1,21 @@
+<html>
+<head><title>Test Page Title</title></head>
+<body>
+<div>
+<p>Lorem ipsum dolor sit amet, at alia aliquip vel. Quas inani labore an vel. Sed an nemore minimum accusata. Sint inermis tacimates est ex, ad movet iracundia mei, delicata iracundia laboramus ei eos. Illud principes complectitur te nec, ius alienum insolens ea, cu quo oratio omnesque.
+<img src="/relativeimage.png">
+<img src="http://www.google.com/absoluteimage.png">
+
+<a href="/relativelink.html">Relative link should be made absolute</a>
+<a href="http://www.google.com/absolutelink.html">Absolute link should be unchanged.</a>
+<p>Lorem ipsum dolor sit amet, at alia aliquip vel. Quas inani labore an vel. Sed an nemore minimum accusata. Sint inermis tacimates est ex, ad movet iracundia mei, delicata iracundia laboramus ei eos. Illud principes complectitur te nec, ius alienum insolens ea, cu quo oratio omnesque.
+
+<p>Lorem ipsum dolor sit amet, at alia aliquip vel. Quas inani labore an vel. Sed an nemore minimum accusata. Sint inermis tacimates est ex, ad movet iracundia mei, delicata iracundia laboramus ei eos. Illud principes complectitur te nec, ius alienum insolens ea, cu quo oratio omnesque.
+
+</div>
+<br>
+<div>
+ I am questiontable content. <a href="http://some.questionable.content">Go here</a>
+</div>
+</body>
+</html>