| 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/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
| 7 #include "chrome/browser/net/url_request_mock_util.h" | 7 #include "chrome/browser/net/url_request_mock_util.h" |
| 8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/browser/ui/browser_commands.h" | 9 #include "chrome/browser/ui/browser_commands.h" |
| 10 #include "chrome/browser/ui/browser_tabstrip.h" | 10 #include "chrome/browser/ui/browser_tabstrip.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 132 } |
| 133 | 133 |
| 134 // See crbug.com/109669 | 134 // See crbug.com/109669 |
| 135 #if defined(USE_AURA) | 135 #if defined(USE_AURA) |
| 136 #define MAYBE_DNSError_GoBack2 DISABLED_DNSError_GoBack2 | 136 #define MAYBE_DNSError_GoBack2 DISABLED_DNSError_GoBack2 |
| 137 #else | 137 #else |
| 138 #define MAYBE_DNSError_GoBack2 DNSError_GoBack2 | 138 #define MAYBE_DNSError_GoBack2 DNSError_GoBack2 |
| 139 #endif | 139 #endif |
| 140 // Test that a DNS error occuring in the main frame does not result in an | 140 // Test that a DNS error occuring in the main frame does not result in an |
| 141 // additional session history entry. | 141 // additional session history entry. |
| 142 IN_PROC_BROWSER_TEST_F(ErrorPageTest, MAYBE_DNSError_GoBack2) { | 142 // Disabled: http://crbug.com/136310 |
| 143 IN_PROC_BROWSER_TEST_F(ErrorPageTest, DISABLED_DNSError_GoBack2) { |
| 143 NavigateToFileURL(FILE_PATH_LITERAL("title2.html")); | 144 NavigateToFileURL(FILE_PATH_LITERAL("title2.html")); |
| 144 | 145 |
| 145 NavigateToURLAndWaitForTitle(GetDnsErrorURL(), "Mock Link Doctor", 2); | 146 NavigateToURLAndWaitForTitle(GetDnsErrorURL(), "Mock Link Doctor", 2); |
| 146 NavigateToFileURL(FILE_PATH_LITERAL("title3.html")); | 147 NavigateToFileURL(FILE_PATH_LITERAL("title3.html")); |
| 147 | 148 |
| 148 GoBackAndWaitForTitle("Mock Link Doctor", 2); | 149 GoBackAndWaitForTitle("Mock Link Doctor", 2); |
| 149 GoBackAndWaitForTitle("Title Of Awesomeness", 1); | 150 GoBackAndWaitForTitle("Title Of Awesomeness", 1); |
| 150 } | 151 } |
| 151 | 152 |
| 152 // See crbug.com/109669 | 153 // See crbug.com/109669 |
| 153 #if defined(USE_AURA) | 154 #if defined(USE_AURA) |
| 154 #define MAYBE_DNSError_GoBack2AndForward DISABLED_DNSError_GoBack2AndForward | 155 #define MAYBE_DNSError_GoBack2AndForward DISABLED_DNSError_GoBack2AndForward |
| 155 #else | 156 #else |
| 156 #define MAYBE_DNSError_GoBack2AndForward DNSError_GoBack2AndForward | 157 #define MAYBE_DNSError_GoBack2AndForward DNSError_GoBack2AndForward |
| 157 #endif | 158 #endif |
| 158 // Test that a DNS error occuring in the main frame does not result in an | 159 // Test that a DNS error occuring in the main frame does not result in an |
| 159 // additional session history entry. | 160 // additional session history entry. |
| 160 IN_PROC_BROWSER_TEST_F(ErrorPageTest, MAYBE_DNSError_GoBack2AndForward) { | 161 // Disabled: http://crbug.com/136310 |
| 162 IN_PROC_BROWSER_TEST_F(ErrorPageTest, DISABLED_DNSError_GoBack2AndForward) { |
| 161 NavigateToFileURL(FILE_PATH_LITERAL("title2.html")); | 163 NavigateToFileURL(FILE_PATH_LITERAL("title2.html")); |
| 162 | 164 |
| 163 NavigateToURLAndWaitForTitle(GetDnsErrorURL(), "Mock Link Doctor", 2); | 165 NavigateToURLAndWaitForTitle(GetDnsErrorURL(), "Mock Link Doctor", 2); |
| 164 NavigateToFileURL(FILE_PATH_LITERAL("title3.html")); | 166 NavigateToFileURL(FILE_PATH_LITERAL("title3.html")); |
| 165 | 167 |
| 166 GoBackAndWaitForTitle("Mock Link Doctor", 2); | 168 GoBackAndWaitForTitle("Mock Link Doctor", 2); |
| 167 GoBackAndWaitForTitle("Title Of Awesomeness", 1); | 169 GoBackAndWaitForTitle("Title Of Awesomeness", 1); |
| 168 | 170 |
| 169 GoForwardAndWaitForTitle("Mock Link Doctor", 2); | 171 GoForwardAndWaitForTitle("Mock Link Doctor", 2); |
| 170 } | 172 } |
| 171 | 173 |
| 172 // See crbug.com/109669 | 174 // See crbug.com/109669 |
| 173 #if defined(USE_AURA) | 175 #if defined(USE_AURA) |
| 174 #define MAYBE_DNSError_GoBack2Forward2 DISABLED_DNSError_GoBack2Forward2 | 176 #define MAYBE_DNSError_GoBack2Forward2 DISABLED_DNSError_GoBack2Forward2 |
| 175 #else | 177 #else |
| 176 #define MAYBE_DNSError_GoBack2Forward2 DNSError_GoBack2Forward2 | 178 #define MAYBE_DNSError_GoBack2Forward2 DNSError_GoBack2Forward2 |
| 177 #endif | 179 #endif |
| 178 // Test that a DNS error occuring in the main frame does not result in an | 180 // Test that a DNS error occuring in the main frame does not result in an |
| 179 // additional session history entry. | 181 // additional session history entry. |
| 180 IN_PROC_BROWSER_TEST_F(ErrorPageTest, MAYBE_DNSError_GoBack2Forward2) { | 182 // Disabled: http://crbug.com/136310 |
| 183 IN_PROC_BROWSER_TEST_F(ErrorPageTest, DISABLED_DNSError_GoBack2Forward2) { |
| 181 NavigateToFileURL(FILE_PATH_LITERAL("title3.html")); | 184 NavigateToFileURL(FILE_PATH_LITERAL("title3.html")); |
| 182 | 185 |
| 183 NavigateToURLAndWaitForTitle(GetDnsErrorURL(), "Mock Link Doctor", 2); | 186 NavigateToURLAndWaitForTitle(GetDnsErrorURL(), "Mock Link Doctor", 2); |
| 184 NavigateToFileURL(FILE_PATH_LITERAL("title2.html")); | 187 NavigateToFileURL(FILE_PATH_LITERAL("title2.html")); |
| 185 | 188 |
| 186 GoBackAndWaitForTitle("Mock Link Doctor", 2); | 189 GoBackAndWaitForTitle("Mock Link Doctor", 2); |
| 187 GoBackAndWaitForTitle("Title Of More Awesomeness", 1); | 190 GoBackAndWaitForTitle("Title Of More Awesomeness", 1); |
| 188 | 191 |
| 189 GoForwardAndWaitForTitle("Mock Link Doctor", 2); | 192 GoForwardAndWaitForTitle("Mock Link Doctor", 2); |
| 190 GoForwardAndWaitForTitle("Title Of Awesomeness", 1); | 193 GoForwardAndWaitForTitle("Title Of Awesomeness", 1); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 } | 232 } |
| 230 | 233 |
| 231 // Checks that the Link Doctor is not loaded when we receive an actual 404 page. | 234 // Checks that the Link Doctor is not loaded when we receive an actual 404 page. |
| 232 IN_PROC_BROWSER_TEST_F(ErrorPageTest, Page404) { | 235 IN_PROC_BROWSER_TEST_F(ErrorPageTest, Page404) { |
| 233 NavigateToURLAndWaitForTitle( | 236 NavigateToURLAndWaitForTitle( |
| 234 URLRequestMockHTTPJob::GetMockUrl( | 237 URLRequestMockHTTPJob::GetMockUrl( |
| 235 FilePath(FILE_PATH_LITERAL("page404.html"))), | 238 FilePath(FILE_PATH_LITERAL("page404.html"))), |
| 236 "SUCCESS", | 239 "SUCCESS", |
| 237 1); | 240 1); |
| 238 } | 241 } |
| OLD | NEW |