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

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: Make the sync_IPC handled in IO thread. 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/strings/stringprintf.h" 6 #include "base/strings/stringprintf.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/apps/app_browsertest_util.h" 9 #include "chrome/browser/apps/app_browsertest_util.h"
10 #include "chrome/browser/chrome_content_browser_client.h" 10 #include "chrome/browser/chrome_content_browser_client.h"
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 NO_TEST_SERVER); 1079 NO_TEST_SERVER);
1080 } 1080 }
1081 1081
1082 IN_PROC_BROWSER_TEST_F(WebViewTest, 1082 IN_PROC_BROWSER_TEST_F(WebViewTest,
1083 Shim_TestPartitionRemovalAfterNavigationFails) { 1083 Shim_TestPartitionRemovalAfterNavigationFails) {
1084 TestHelper("testPartitionRemovalAfterNavigationFails", 1084 TestHelper("testPartitionRemovalAfterNavigationFails",
1085 "web_view/shim", 1085 "web_view/shim",
1086 NO_TEST_SERVER); 1086 NO_TEST_SERVER);
1087 } 1087 }
1088 1088
1089 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAddContentScript) {
1090 TestHelper("testAddContentScript", "web_view/shim", NEEDS_TEST_SERVER);
1091 }
1092
1093 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAddMultiContentScripts) {
Fady Samuel 2015/03/31 23:40:11 AddMultipleContentScripts
Xi Han 2015/04/01 22:14:40 Done.
1094 TestHelper("testAddMultiContentScripts", "web_view/shim", NEEDS_TEST_SERVER);
1095 }
1096
1097 IN_PROC_BROWSER_TEST_F(
1098 WebViewTest,
1099 Shim_TestAddContentScriptWithSameNameShouldOverwriteTheExistingOne) {
1100 TestHelper("testAddContentScriptWithSameNameShouldOverwriteTheExistingOne",
1101 "web_view/shim", NEEDS_TEST_SERVER);
1102 }
1103
1104 IN_PROC_BROWSER_TEST_F(
1105 WebViewTest,
1106 Shim_TestAddContentScriptToOneWebViewShouldNotInjectToTheOtherWebView) {
1107 TestHelper("testAddContentScriptToOneWebViewShouldNotInjectToTheOtherWebView",
1108 "web_view/shim", NEEDS_TEST_SERVER);
1109 }
1110
1111 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAddAndRemoveContentScripts) {
Fady Samuel 2015/03/31 23:41:12 A NewWindow API test would be awesome too!
Xi Han 2015/04/01 22:14:40 Added.
1112 TestHelper("testAddAndRemoveContentScripts", "web_view/shim",
1113 NEEDS_TEST_SERVER);
1114 }
1115
1089 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestExecuteScriptFail) { 1116 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestExecuteScriptFail) {
1090 #if defined(OS_WIN) 1117 #if defined(OS_WIN)
1091 // Flaky on XP bot http://crbug.com/266185 1118 // Flaky on XP bot http://crbug.com/266185
1092 if (base::win::GetVersion() <= base::win::VERSION_XP) 1119 if (base::win::GetVersion() <= base::win::VERSION_XP)
1093 return; 1120 return;
1094 #endif 1121 #endif
1095 1122
1096 TestHelper("testExecuteScriptFail", "web_view/shim", NEEDS_TEST_SERVER); 1123 TestHelper("testExecuteScriptFail", "web_view/shim", NEEDS_TEST_SERVER);
1097 } 1124 }
1098 1125
(...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after
2717 // http://crbug.com/403325 2744 // http://crbug.com/403325
2718 #define MAYBE_WebViewInBackgroundPage \ 2745 #define MAYBE_WebViewInBackgroundPage \
2719 DISABLED_WebViewInBackgroundPage 2746 DISABLED_WebViewInBackgroundPage
2720 #else 2747 #else
2721 #define MAYBE_WebViewInBackgroundPage WebViewInBackgroundPage 2748 #define MAYBE_WebViewInBackgroundPage WebViewInBackgroundPage
2722 #endif 2749 #endif
2723 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_WebViewInBackgroundPage) { 2750 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_WebViewInBackgroundPage) {
2724 ASSERT_TRUE(RunExtensionTest("platform_apps/web_view/background")) 2751 ASSERT_TRUE(RunExtensionTest("platform_apps/web_view/background"))
2725 << message_; 2752 << message_;
2726 } 2753 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698