Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: chrome/browser/ui/webui/webui_webview_browsertest.cc

Issue 1058113002: Implement <webview>.addContentScript/removeContentScript API [3] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webui_api_1
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698