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

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: Add comments. 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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 NO_TEST_SERVER); 1080 NO_TEST_SERVER);
1081 } 1081 }
1082 1082
1083 IN_PROC_BROWSER_TEST_F(WebViewTest, 1083 IN_PROC_BROWSER_TEST_F(WebViewTest,
1084 Shim_TestPartitionRemovalAfterNavigationFails) { 1084 Shim_TestPartitionRemovalAfterNavigationFails) {
1085 TestHelper("testPartitionRemovalAfterNavigationFails", 1085 TestHelper("testPartitionRemovalAfterNavigationFails",
1086 "web_view/shim", 1086 "web_view/shim",
1087 NO_TEST_SERVER); 1087 NO_TEST_SERVER);
1088 } 1088 }
1089 1089
1090 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAddContentScript) {
1091 TestHelper("testAddContentScript", "web_view/shim", NEEDS_TEST_SERVER);
1092 }
1093
1094 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAddMultipleContentScripts) {
1095 TestHelper("testAddMultipleContentScripts", "web_view/shim",
1096 NEEDS_TEST_SERVER);
1097 }
1098
1099 IN_PROC_BROWSER_TEST_F(
1100 WebViewTest,
1101 Shim_TestAddContentScriptWithSameNameShouldOverwriteTheExistingOne) {
1102 TestHelper("testAddContentScriptWithSameNameShouldOverwriteTheExistingOne",
1103 "web_view/shim", NEEDS_TEST_SERVER);
1104 }
1105
1106 IN_PROC_BROWSER_TEST_F(
1107 WebViewTest,
1108 Shim_TestAddContentScriptToOneWebViewShouldNotInjectToTheOtherWebView) {
1109 TestHelper("testAddContentScriptToOneWebViewShouldNotInjectToTheOtherWebView",
1110 "web_view/shim", NEEDS_TEST_SERVER);
1111 }
1112
1113 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAddAndRemoveContentScripts) {
1114 TestHelper("testAddAndRemoveContentScripts", "web_view/shim",
1115 NEEDS_TEST_SERVER);
1116 }
1117
1118 IN_PROC_BROWSER_TEST_F(WebViewTest,
1119 Shim_TestAddContentScriptsWithNewWindowAPI) {
1120 TestHelper("testAddContentScriptsWithNewWindowAPI", "web_view/shim",
1121 NEEDS_TEST_SERVER);
1122 }
1123
1124 IN_PROC_BROWSER_TEST_F(
1125 WebViewTest,
1126 Shim_TestContentScriptIsInjectedAfterTerminateAndReloadWebView) {
1127 TestHelper("testContentScriptIsInjectedAfterTerminateAndReloadWebView",
1128 "web_view/shim", NEEDS_TEST_SERVER);
1129 }
1130
1090 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestExecuteScriptFail) { 1131 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestExecuteScriptFail) {
1091 #if defined(OS_WIN) 1132 #if defined(OS_WIN)
1092 // Flaky on XP bot http://crbug.com/266185 1133 // Flaky on XP bot http://crbug.com/266185
1093 if (base::win::GetVersion() <= base::win::VERSION_XP) 1134 if (base::win::GetVersion() <= base::win::VERSION_XP)
1094 return; 1135 return;
1095 #endif 1136 #endif
1096 1137
1097 TestHelper("testExecuteScriptFail", "web_view/shim", NEEDS_TEST_SERVER); 1138 TestHelper("testExecuteScriptFail", "web_view/shim", NEEDS_TEST_SERVER);
1098 } 1139 }
1099 1140
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
2730 // http://crbug.com/403325 2771 // http://crbug.com/403325
2731 #define MAYBE_WebViewInBackgroundPage \ 2772 #define MAYBE_WebViewInBackgroundPage \
2732 DISABLED_WebViewInBackgroundPage 2773 DISABLED_WebViewInBackgroundPage
2733 #else 2774 #else
2734 #define MAYBE_WebViewInBackgroundPage WebViewInBackgroundPage 2775 #define MAYBE_WebViewInBackgroundPage WebViewInBackgroundPage
2735 #endif 2776 #endif
2736 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_WebViewInBackgroundPage) { 2777 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_WebViewInBackgroundPage) {
2737 ASSERT_TRUE(RunExtensionTest("platform_apps/web_view/background")) 2778 ASSERT_TRUE(RunExtensionTest("platform_apps/web_view/background"))
2738 << message_; 2779 << message_;
2739 } 2780 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698