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

Side by Side Diff: chrome/browser/apps/guest_view/web_view_browsertest.cc

Issue 959413003: Implement <webview>.addContentScript/removeContentScript API [1] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up in web_view_internal_api.cc. 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/path_service.h" 5 #include "base/path_service.h"
6 #include "base/process/process.h" 6 #include "base/process/process.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/apps/app_browsertest_util.h" 10 #include "chrome/browser/apps/app_browsertest_util.h"
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 NO_TEST_SERVER); 1106 NO_TEST_SERVER);
1107 } 1107 }
1108 1108
1109 IN_PROC_BROWSER_TEST_F(WebViewTest, 1109 IN_PROC_BROWSER_TEST_F(WebViewTest,
1110 Shim_TestPartitionRemovalAfterNavigationFails) { 1110 Shim_TestPartitionRemovalAfterNavigationFails) {
1111 TestHelper("testPartitionRemovalAfterNavigationFails", 1111 TestHelper("testPartitionRemovalAfterNavigationFails",
1112 "web_view/shim", 1112 "web_view/shim",
1113 NO_TEST_SERVER); 1113 NO_TEST_SERVER);
1114 } 1114 }
1115 1115
1116 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAddContentScript) {
1117 TestHelper("testAddContentScript", "web_view/shim", NEEDS_TEST_SERVER);
1118 }
1119
1120 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAddMultipleContentScripts) {
1121 TestHelper("testAddMultipleContentScripts", "web_view/shim",
1122 NEEDS_TEST_SERVER);
1123 }
1124
1125 IN_PROC_BROWSER_TEST_F(
1126 WebViewTest,
1127 Shim_TestAddContentScriptWithSameNameShouldOverwriteTheExistingOne) {
1128 TestHelper("testAddContentScriptWithSameNameShouldOverwriteTheExistingOne",
1129 "web_view/shim", NEEDS_TEST_SERVER);
1130 }
1131
1132 IN_PROC_BROWSER_TEST_F(
1133 WebViewTest,
1134 Shim_TestAddContentScriptToOneWebViewShouldNotInjectToTheOtherWebView) {
1135 TestHelper("testAddContentScriptToOneWebViewShouldNotInjectToTheOtherWebView",
1136 "web_view/shim", NEEDS_TEST_SERVER);
1137 }
1138
1139 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAddAndRemoveContentScripts) {
1140 TestHelper("testAddAndRemoveContentScripts", "web_view/shim",
1141 NEEDS_TEST_SERVER);
1142 }
1143
1144 IN_PROC_BROWSER_TEST_F(WebViewTest,
1145 Shim_TestAddContentScriptsWithNewWindowAPI) {
1146 TestHelper("testAddContentScriptsWithNewWindowAPI", "web_view/shim",
1147 NEEDS_TEST_SERVER);
1148 }
1149
1150 IN_PROC_BROWSER_TEST_F(
1151 WebViewTest,
1152 Shim_TestContentScriptIsInjectedAfterTerminateAndReloadWebView) {
1153 TestHelper("testContentScriptIsInjectedAfterTerminateAndReloadWebView",
1154 "web_view/shim", NEEDS_TEST_SERVER);
1155 }
1156
1157 IN_PROC_BROWSER_TEST_F(WebViewTest,
1158 Shim_TestContentScriptExistsAsLongAsWebViewTagExists) {
1159 TestHelper("testContentScriptExistsAsLongAsWebViewTagExists", "web_view/shim",
1160 NEEDS_TEST_SERVER);
1161 }
1162
1116 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestExecuteScriptFail) { 1163 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestExecuteScriptFail) {
1117 #if defined(OS_WIN) 1164 #if defined(OS_WIN)
1118 // Flaky on XP bot http://crbug.com/266185 1165 // Flaky on XP bot http://crbug.com/266185
1119 if (base::win::GetVersion() <= base::win::VERSION_XP) 1166 if (base::win::GetVersion() <= base::win::VERSION_XP)
1120 return; 1167 return;
1121 #endif 1168 #endif
1122 1169
1123 TestHelper("testExecuteScriptFail", "web_view/shim", NEEDS_TEST_SERVER); 1170 TestHelper("testExecuteScriptFail", "web_view/shim", NEEDS_TEST_SERVER);
1124 } 1171 }
1125 1172
(...skipping 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after
2765 IN_PROC_BROWSER_TEST_F(WebViewTest, AllowTransparencyAndAllowScalingPropagate) { 2812 IN_PROC_BROWSER_TEST_F(WebViewTest, AllowTransparencyAndAllowScalingPropagate) {
2766 LoadAppWithGuest("web_view/simple"); 2813 LoadAppWithGuest("web_view/simple");
2767 2814
2768 ASSERT_TRUE(!!GetGuestWebContents()); 2815 ASSERT_TRUE(!!GetGuestWebContents());
2769 extensions::WebViewGuest* guest = 2816 extensions::WebViewGuest* guest =
2770 extensions::WebViewGuest::FromWebContents(GetGuestWebContents()); 2817 extensions::WebViewGuest::FromWebContents(GetGuestWebContents());
2771 ASSERT_TRUE(guest->allow_transparency()); 2818 ASSERT_TRUE(guest->allow_transparency());
2772 ASSERT_TRUE(guest->allow_scaling()); 2819 ASSERT_TRUE(guest->allow_scaling());
2773 } 2820 }
2774 2821
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698