OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/memory/weak_ptr.h" | 5 #include "base/memory/weak_ptr.h" |
6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "components/dom_distiller/content/distiller_page_web_contents.h" | 8 #include "components/dom_distiller/content/distiller_page_web_contents.h" |
9 #include "components/dom_distiller/core/distiller_page.h" | 9 #include "components/dom_distiller/core/distiller_page.h" |
10 #include "content/public/browser/browser_context.h" | 10 #include "content/public/browser/browser_context.h" |
| 11 #include "content/public/test/content_browser_test.h" |
11 #include "content/shell/browser/shell.h" | 12 #include "content/shell/browser/shell.h" |
12 #include "content/test/content_browser_test.h" | |
13 #include "net/test/embedded_test_server/embedded_test_server.h" | 13 #include "net/test/embedded_test_server/embedded_test_server.h" |
14 | 14 |
15 using content::ContentBrowserTest; | 15 using content::ContentBrowserTest; |
16 | 16 |
17 namespace { | 17 namespace { |
18 // TODO(bengr): Once JavaScript has landed to extract article content from | 18 // TODO(bengr): Once JavaScript has landed to extract article content from |
19 // a loaded page, test the interaction of that script with | 19 // a loaded page, test the interaction of that script with |
20 // DistillerPageWebContents. | 20 // DistillerPageWebContents. |
21 static const char kTitle[] = "Test Page Title"; | 21 static const char kTitle[] = "Test Page Title"; |
22 static const char kHtml[] = | 22 static const char kHtml[] = |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 ASSERT_EQ(kTitle, title); | 80 ASSERT_EQ(kTitle, title); |
81 std::string html; | 81 std::string html; |
82 result_list->GetString(1, &html); | 82 result_list->GetString(1, &html); |
83 ASSERT_EQ(kHtml, html); | 83 ASSERT_EQ(kHtml, html); |
84 std::string image_url; | 84 std::string image_url; |
85 result_list->GetString(2, &image_url); | 85 result_list->GetString(2, &image_url); |
86 ASSERT_EQ(kImageUrl, image_url); | 86 ASSERT_EQ(kImageUrl, image_url); |
87 } | 87 } |
88 | 88 |
89 } // namespace dom_distiller | 89 } // namespace dom_distiller |
OLD | NEW |