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

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

Issue 1004253002: Enable <webview>.executeScript outside of Apps and Extensions [2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 years, 9 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 26 matching lines...) Expand all
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/signin/inline_login_ui.cc ('k') | chrome/test/data/webui/webview_execute_script.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698