| 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/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/utf_string_conversions.h" |
| 10 #include "base/values.h" | 11 #include "base/values.h" |
| 11 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/common/chrome_paths.h" | 13 #include "chrome/common/chrome_paths.h" |
| 13 #include "chrome/common/url_constants.h" | 14 #include "chrome/common/url_constants.h" |
| 14 #include "chrome/test/ui_test_utils.h" | 15 #include "chrome/test/ui_test_utils.h" |
| 15 #include "content/browser/tab_contents/tab_contents.h" | 16 #include "content/browser/tab_contents/tab_contents.h" |
| 16 #include "content/browser/webui/web_ui.h" | 17 #include "content/browser/webui/web_ui.h" |
| 17 #include "ui/base/resource/resource_bundle.h" | 18 #include "ui/base/resource/resource_bundle.h" |
| 18 | 19 |
| 19 static const FilePath::CharType* kWebUILibraryJS = | 20 static const FilePath::CharType* kWebUILibraryJS = |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 AddLibrary(FilePath(FILE_PATH_LITERAL("sample_downloads.js"))); | 197 AddLibrary(FilePath(FILE_PATH_LITERAL("sample_downloads.js"))); |
| 197 | 198 |
| 198 // Navigate to UI. | 199 // Navigate to UI. |
| 199 // TODO(dtseng): make accessor for subclasses to return? | 200 // TODO(dtseng): make accessor for subclasses to return? |
| 200 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIDownloadsURL)); | 201 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIDownloadsURL)); |
| 201 | 202 |
| 202 ASSERT_TRUE(RunJavascriptTest("testAssertFalse")); | 203 ASSERT_TRUE(RunJavascriptTest("testAssertFalse")); |
| 203 ASSERT_TRUE(RunJavascriptTest("testInitialFocus")); | 204 ASSERT_TRUE(RunJavascriptTest("testInitialFocus")); |
| 204 ASSERT_FALSE(RunJavascriptTest("testConsoleError")); | 205 ASSERT_FALSE(RunJavascriptTest("testConsoleError")); |
| 205 } | 206 } |
| OLD | NEW |