| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/macros.h" | 5 #include "base/macros.h" |
| 6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
| 7 #include "chrome/common/chrome_paths.h" | 7 #include "chrome/common/chrome_paths.h" |
| 8 #include "chrome/common/url_constants.h" | 8 #include "chrome/common/url_constants.h" |
| 9 #include "chrome/test/base/ui_test_utils.h" | 9 #include "chrome/test/base/ui_test_utils.h" |
| 10 #include "chrome/test/base/web_ui_browser_test.h" | 10 #include "chrome/test/base/web_ui_browser_test.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 DISALLOW_COPY_AND_ASSIGN(WebUIWebViewBrowserTest); | 37 DISALLOW_COPY_AND_ASSIGN(WebUIWebViewBrowserTest); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, ExecuteScriptCode) { | 40 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, ExecuteScriptCode) { |
| 41 ui_test_utils::NavigateToURL(browser(), GetWebViewEnabledWebUIURL()); | 41 ui_test_utils::NavigateToURL(browser(), GetWebViewEnabledWebUIURL()); |
| 42 | 42 |
| 43 ASSERT_TRUE(WebUIBrowserTest::RunJavascriptAsyncTest( | 43 ASSERT_TRUE(WebUIBrowserTest::RunJavascriptAsyncTest( |
| 44 "testExecuteScriptCode", | 44 "testExecuteScriptCode", |
| 45 new base::StringValue(GetTestUrl("empty.html").spec()))); | 45 new base::StringValue(GetTestUrl("empty.html").spec()))); |
| 46 } | 46 } |
| 47 |
| 48 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, ExecuteScriptCodeFromFile) { |
| 49 ui_test_utils::NavigateToURL(browser(), GetWebViewEnabledWebUIURL()); |
| 50 |
| 51 ASSERT_TRUE(WebUIBrowserTest::RunJavascriptAsyncTest( |
| 52 "testExecuteScriptCodeFromFile", |
| 53 new base::StringValue(GetTestUrl("empty.html").spec()))); |
| 54 } |
| OLD | NEW |