Index: components/dom_distiller/content/distiller_page_web_contents_browsertest.cc |
diff --git a/components/dom_distiller/content/distiller_page_web_contents_browsertest.cc b/components/dom_distiller/content/distiller_page_web_contents_browsertest.cc |
index e319097bd4196c2b155d0242da97e72e93166e9e..324ddfdcc79f4077e82fe9e3a6d3e273a68ef85d 100644 |
--- a/components/dom_distiller/content/distiller_page_web_contents_browsertest.cc |
+++ b/components/dom_distiller/content/distiller_page_web_contents_browsertest.cc |
@@ -217,6 +217,32 @@ IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest, HandlesRelativeImages) { |
HasSubstr("src=\"http://www.google.com/absoluteimage.png\"")); |
} |
+ |
+IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest, HandlesRelativeVideos) { |
+ DistillerPageWebContents distiller_page( |
+ shell()->web_contents()->GetBrowserContext(), |
+ scoped_ptr<SourcePageHandleWebContents>()); |
+ distiller_page_ = &distiller_page; |
+ |
+ base::RunLoop run_loop; |
+ DistillPage(run_loop.QuitClosure(), kSimpleArticlePath); |
+ run_loop.Run(); |
+ |
+ // A relative source/track should've been updated. |
+ EXPECT_THAT( |
+ page_info_.get()->html, |
+ ContainsRegex("src=\"http://127.0.0.1:.*/relative_video.mp4\"")); |
+ EXPECT_THAT( |
+ page_info_.get()->html, |
+ ContainsRegex("src=\"http://127.0.0.1:.*/relative_track_en.vtt\"")); |
+ EXPECT_THAT( |
+ page_info_.get()->html, |
+ HasSubstr("src=\"http://www.google.com/absolute_video.ogg\"")); |
+ EXPECT_THAT( |
+ page_info_.get()->html, |
+ HasSubstr("src=\"http://www.google.com/absolute_track_fr.vtt\"")); |
+} |
+ |
IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest, VisibilityDetection) { |
DistillerPageWebContents distiller_page( |
shell()->web_contents()->GetBrowserContext(), |