OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_path.h" | 6 #include "base/file_path.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/prerender/prerender_final_status.h" | 8 #include "chrome/browser/prerender/prerender_final_status.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/webui/web_ui_browsertest.h" | 10 #include "chrome/browser/ui/webui/web_ui_browsertest.h" |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 //////////////////////////////////////////////////////////////////////////////// | 263 //////////////////////////////////////////////////////////////////////////////// |
264 | 264 |
265 // Prerender a page and navigate to it, once prerendering starts. | 265 // Prerender a page and navigate to it, once prerendering starts. |
266 IN_PROC_BROWSER_TEST_F(NetInternalsTest, NetInternalsPrerenderViewSucceed) { | 266 IN_PROC_BROWSER_TEST_F(NetInternalsTest, NetInternalsPrerenderViewSucceed) { |
267 ASSERT_TRUE(test_server()->Start()); | 267 ASSERT_TRUE(test_server()->Start()); |
268 RunTestAndWaitForTitle( | 268 RunTestAndWaitForTitle( |
269 "NetInternalsPrerenderView", | 269 "NetInternalsPrerenderView", |
270 // URL that can be prerendered. | 270 // URL that can be prerendered. |
271 Value::CreateStringValue( | 271 Value::CreateStringValue( |
272 test_server()->GetURL("files/title1.html").spec()), | 272 test_server()->GetURL("files/title1.html").spec()), |
273 Value::CreateBooleanValue(true), | 273 base::TrueValue(), |
274 Value::CreateStringValue( | 274 Value::CreateStringValue( |
275 prerender::NameFromFinalStatus(prerender::FINAL_STATUS_USED))); | 275 prerender::NameFromFinalStatus(prerender::FINAL_STATUS_USED))); |
276 } | 276 } |
277 | 277 |
278 // Prerender a page that is expected to fail. | 278 // Prerender a page that is expected to fail. |
279 IN_PROC_BROWSER_TEST_F(NetInternalsTest, NetInternalsPrerenderViewFail) { | 279 IN_PROC_BROWSER_TEST_F(NetInternalsTest, NetInternalsPrerenderViewFail) { |
280 ASSERT_TRUE(test_server()->Start()); | 280 ASSERT_TRUE(test_server()->Start()); |
281 RunTestAndWaitForTitle( | 281 RunTestAndWaitForTitle( |
282 "NetInternalsPrerenderView", | 282 "NetInternalsPrerenderView", |
283 // URL that can't be prerendered, since it triggers a download. | 283 // URL that can't be prerendered, since it triggers a download. |
284 Value::CreateStringValue( | 284 Value::CreateStringValue( |
285 test_server()->GetURL("files/download-test1.lib").spec()), | 285 test_server()->GetURL("files/download-test1.lib").spec()), |
286 Value::CreateBooleanValue(false), | 286 base::FalseValue(), |
287 Value::CreateStringValue( | 287 Value::CreateStringValue( |
288 prerender::NameFromFinalStatus(prerender::FINAL_STATUS_DOWNLOAD))); | 288 prerender::NameFromFinalStatus(prerender::FINAL_STATUS_DOWNLOAD))); |
289 } | 289 } |
290 | 290 |
291 //////////////////////////////////////////////////////////////////////////////// | 291 //////////////////////////////////////////////////////////////////////////////// |
292 // log_view_painter.js | 292 // log_view_painter.js |
293 //////////////////////////////////////////////////////////////////////////////// | 293 //////////////////////////////////////////////////////////////////////////////// |
294 | 294 |
295 // Check that we correctly remove cookies and login information. | 295 // Check that we correctly remove cookies and login information. |
296 IN_PROC_BROWSER_TEST_F(NetInternalsTest, | 296 IN_PROC_BROWSER_TEST_F(NetInternalsTest, |
297 NetInternalsLogViewPainterStripInfo) { | 297 NetInternalsLogViewPainterStripInfo) { |
298 RunTestAndWaitForTitle("NetInternalsLogViewPainterStripInfo"); | 298 RunTestAndWaitForTitle("NetInternalsLogViewPainterStripInfo"); |
299 } | 299 } |
300 | 300 |
301 } // namespace | 301 } // namespace |
OLD | NEW |