| 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 #include "chrome/browser/ui/webui/web_ui_browsertest.h" | 4 #include "chrome/browser/ui/webui/web_ui_browsertest.h" |
| 5 | 5 |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 }; | 272 }; |
| 273 WebUIBrowserTest* WebUIBrowserExpectFailTest::s_test_ = NULL; | 273 WebUIBrowserTest* WebUIBrowserExpectFailTest::s_test_ = NULL; |
| 274 | 274 |
| 275 IN_PROC_BROWSER_TEST_F(WebUIBrowserExpectFailTest, TestFailsFast) { | 275 IN_PROC_BROWSER_TEST_F(WebUIBrowserExpectFailTest, TestFailsFast) { |
| 276 AddLibrary(FilePath(FILE_PATH_LITERAL("sample_downloads.js"))); | 276 AddLibrary(FilePath(FILE_PATH_LITERAL("sample_downloads.js"))); |
| 277 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIDownloadsURL)); | 277 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIDownloadsURL)); |
| 278 EXPECT_FATAL_FAILURE(RunJavascriptTestNoReturn("FAILS_BogusFunctionName"), | 278 EXPECT_FATAL_FAILURE(RunJavascriptTestNoReturn("FAILS_BogusFunctionName"), |
| 279 "WebUITestHandler::Observe"); | 279 "WebUITestHandler::Observe"); |
| 280 } | 280 } |
| 281 | 281 |
| 282 | |
| 283 // crbug.com/88104 - v8_shell#host doesn't build when host=="arm". | 282 // crbug.com/88104 - v8_shell#host doesn't build when host=="arm". |
| 284 #if !defined(ARCH_CPU_ARM_FAMILY) | 283 #if !defined(ARCH_CPU_ARM_FAMILY) |
| 285 // This test framework is used in the generated tests, which are included | 284 // This test framework is used in the generated tests, which are included |
| 286 // below. WebUIBrowserTest requires being on a page which is a WebUI page. Using | 285 // below. WebUIBrowserTest requires being on a page which is a WebUI page. Using |
| 287 // the TestChromeWebUIFactory, we use a dummy URL |kChromeTestBrowserTestPass|, | 286 // the TestChromeWebUIFactory, we use a dummy URL |kChromeTestBrowserTestPass|, |
| 288 // which we force to be a WebUI page. | 287 // which we force to be a WebUI page. |
| 289 class WebUIBrowserTestPass | 288 class WebUIBrowserTestPass |
| 290 : public WebUIBrowserTest, | 289 : public WebUIBrowserTest, |
| 291 public TestChromeWebUIFactory::WebUIProvider { | 290 public TestChromeWebUIFactory::WebUIProvider { |
| 292 private: | 291 private: |
| (...skipping 21 matching lines...) Expand all Loading... |
| 314 TestChromeWebUIFactory::RemoveFactoryOverride( | 313 TestChromeWebUIFactory::RemoveFactoryOverride( |
| 315 GURL(kChromeTestBrowserTestPass).host()); | 314 GURL(kChromeTestBrowserTestPass).host()); |
| 316 } | 315 } |
| 317 | 316 |
| 318 static const char kChromeTestBrowserTestPass[]; | 317 static const char kChromeTestBrowserTestPass[]; |
| 319 }; | 318 }; |
| 320 | 319 |
| 321 const char WebUIBrowserTestPass::kChromeTestBrowserTestPass[] = | 320 const char WebUIBrowserTestPass::kChromeTestBrowserTestPass[] = |
| 322 "chrome://WebUIBrowserTestPass"; | 321 "chrome://WebUIBrowserTestPass"; |
| 323 | 322 |
| 324 #include "chrome/test/data/webui/sample_pass-inl.h" | 323 #include "js2webui/chrome/test/data/webui/sample_pass-inl.h" |
| 325 | 324 |
| 326 #endif // !defined(ARCH_CPU_ARM_FAMILY) | 325 #endif // !defined(ARCH_CPU_ARM_FAMILY) |
| OLD | NEW |