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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 | 108 |
109 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, | 109 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, |
110 ContentScriptIsInjectedAfterTerminateAndReloadWebView) { | 110 ContentScriptIsInjectedAfterTerminateAndReloadWebView) { |
111 ui_test_utils::NavigateToURL(browser(), GetWebViewEnabledWebUIURL()); | 111 ui_test_utils::NavigateToURL(browser(), GetWebViewEnabledWebUIURL()); |
112 | 112 |
113 ASSERT_TRUE(WebUIBrowserTest::RunJavascriptAsyncTest( | 113 ASSERT_TRUE(WebUIBrowserTest::RunJavascriptAsyncTest( |
114 "testContentScriptIsInjectedAfterTerminateAndReloadWebView", | 114 "testContentScriptIsInjectedAfterTerminateAndReloadWebView", |
115 new base::StringValue(GetTestUrl("empty.html").spec()))); | 115 new base::StringValue(GetTestUrl("empty.html").spec()))); |
116 } | 116 } |
| 117 |
| 118 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, AddContentScriptWithCode) { |
| 119 ui_test_utils::NavigateToURL(browser(), GetWebViewEnabledWebUIURL()); |
| 120 |
| 121 ASSERT_TRUE(WebUIBrowserTest::RunJavascriptAsyncTest( |
| 122 "testAddContentScriptWithCode", |
| 123 new base::StringValue(GetTestUrl("empty.html").spec()))); |
| 124 } |
OLD | NEW |