| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "chrome/browser/autocomplete/autocomplete_match.h" | 10 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, PopupBlockedPostBlank) { | 108 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, PopupBlockedPostBlank) { |
| 109 BasicTest(browser(), GetTestURL()); | 109 BasicTest(browser(), GetTestURL()); |
| 110 } | 110 } |
| 111 | 111 |
| 112 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, | 112 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, |
| 113 PopupBlockedPostBlankIncognito) { | 113 PopupBlockedPostBlankIncognito) { |
| 114 BasicTest(CreateIncognitoBrowser(), GetTestURL()); | 114 BasicTest(CreateIncognitoBrowser(), GetTestURL()); |
| 115 } | 115 } |
| 116 | 116 |
| 117 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, PopupBlockedFakeClickOnAnchor) { | 117 // http://crbug.com/233404 |
| 118 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, |
| 119 DISABLED_PopupBlockedFakeClickOnAnchor) { |
| 118 GURL url(ui_test_utils::GetTestUrl( | 120 GURL url(ui_test_utils::GetTestUrl( |
| 119 base::FilePath(kTestDir), | 121 base::FilePath(kTestDir), |
| 120 base::FilePath(FILE_PATH_LITERAL("popup-fake-click-on-anchor.html")))); | 122 base::FilePath(FILE_PATH_LITERAL("popup-fake-click-on-anchor.html")))); |
| 121 BasicTest(browser(), url); | 123 BasicTest(browser(), url); |
| 122 } | 124 } |
| 123 | 125 |
| 124 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, MultiplePopups) { | 126 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, MultiplePopups) { |
| 125 GURL url(ui_test_utils::GetTestUrl(base::FilePath( | 127 GURL url(ui_test_utils::GetTestUrl(base::FilePath( |
| 126 kTestDir), base::FilePath(FILE_PATH_LITERAL("popup-many.html")))); | 128 kTestDir), base::FilePath(FILE_PATH_LITERAL("popup-many.html")))); |
| 127 ui_test_utils::NavigateToURL(browser(), url); | 129 ui_test_utils::NavigateToURL(browser(), url); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 browser()->profile()); | 178 browser()->profile()); |
| 177 ui_test_utils::WaitForTemplateURLServiceToLoad(service); | 179 ui_test_utils::WaitForTemplateURLServiceToLoad(service); |
| 178 LocationBar* location_bar = browser()->window()->GetLocationBar(); | 180 LocationBar* location_bar = browser()->window()->GetLocationBar(); |
| 179 ui_test_utils::SendToOmniboxAndSubmit(location_bar, search_string); | 181 ui_test_utils::SendToOmniboxAndSubmit(location_bar, search_string); |
| 180 OmniboxEditModel* model = location_bar->GetLocationEntry()->model(); | 182 OmniboxEditModel* model = location_bar->GetLocationEntry()->model(); |
| 181 EXPECT_EQ(GURL(search_string), model->CurrentMatch().destination_url); | 183 EXPECT_EQ(GURL(search_string), model->CurrentMatch().destination_url); |
| 182 EXPECT_EQ(ASCIIToUTF16(search_string), model->CurrentMatch().contents); | 184 EXPECT_EQ(ASCIIToUTF16(search_string), model->CurrentMatch().contents); |
| 183 } | 185 } |
| 184 | 186 |
| 185 } // namespace | 187 } // namespace |
| OLD | NEW |