OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/extensions/extension_browsertest.h" | 5 #include "chrome/browser/extensions/extension_browsertest.h" |
6 #include "chrome/browser/ui/browser.h" | 6 #include "chrome/browser/ui/browser.h" |
7 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 7 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
8 #include "chrome/common/extensions/extension.h" | 8 #include "chrome/common/extensions/extension.h" |
9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
10 #include "chrome/test/base/ui_test_utils.h" | 10 #include "chrome/test/base/ui_test_utils.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 const std::string& expected_error) { | 107 const std::string& expected_error) { |
108 if (sniff_xml_type) { | 108 if (sniff_xml_type) { |
109 // TODO(finnur): Implement this is a non-flaky way. | 109 // TODO(finnur): Implement this is a non-flaky way. |
110 } | 110 } |
111 | 111 |
112 // Navigate to the subscribe page directly. | 112 // Navigate to the subscribe page directly. |
113 ui_test_utils::NavigateToURL(browser, | 113 ui_test_utils::NavigateToURL(browser, |
114 GetFeedUrl(server, url, true, extension_id)); | 114 GetFeedUrl(server, url, true, extension_id)); |
115 | 115 |
116 WebContents* tab = browser->tab_strip_model()->GetActiveWebContents(); | 116 WebContents* tab = browser->tab_strip_model()->GetActiveWebContents(); |
117 ASSERT_TRUE(ValidatePageElement(tab, | 117 ASSERT_TRUE(ValidatePageElement( |
118 "", | 118 tab, std::string(), kScriptFeedTitle, expected_feed_title)); |
119 kScriptFeedTitle, | |
120 expected_feed_title)); | |
121 ASSERT_TRUE(ValidatePageElement(tab, | 119 ASSERT_TRUE(ValidatePageElement(tab, |
122 "//html/body/div/iframe[1]", | 120 "//html/body/div/iframe[1]", |
123 kScriptAnchor, | 121 kScriptAnchor, |
124 expected_item_title)); | 122 expected_item_title)); |
125 ASSERT_TRUE(ValidatePageElement(tab, | 123 ASSERT_TRUE(ValidatePageElement(tab, |
126 "//html/body/div/iframe[1]", | 124 "//html/body/div/iframe[1]", |
127 kScriptDesc, | 125 kScriptDesc, |
128 expected_item_desc)); | 126 expected_item_desc)); |
129 ASSERT_TRUE(ValidatePageElement(tab, | 127 ASSERT_TRUE(ValidatePageElement(tab, |
130 "//html/body/div/iframe[1]", | 128 "//html/body/div/iframe[1]", |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 std::string id = extension->id(); | 338 std::string id = extension->id(); |
341 | 339 |
342 // Valid feed but containing no links. | 340 // Valid feed but containing no links. |
343 NavigateToFeedAndValidate( | 341 NavigateToFeedAndValidate( |
344 test_server(), kValidFeedNoLinks, browser(), id, true, | 342 test_server(), kValidFeedNoLinks, browser(), id, true, |
345 "Feed for MyFeedTitle", | 343 "Feed for MyFeedTitle", |
346 "Title with no link", | 344 "Title with no link", |
347 "Desc", | 345 "Desc", |
348 "No error"); | 346 "No error"); |
349 } | 347 } |
OLD | NEW |