Index: chrome/browser/ui/webui/webui_webview_browsertest.cc |
diff --git a/chrome/browser/ui/webui/webui_webview_browsertest.cc b/chrome/browser/ui/webui/webui_webview_browsertest.cc |
index 6c3ed9c8cfcaba3787a706d88cad7b4f43af6b81..6fea4921ea0d7732bafe7b7d5803d0ea5fbab4af 100644 |
--- a/chrome/browser/ui/webui/webui_webview_browsertest.cc |
+++ b/chrome/browser/ui/webui/webui_webview_browsertest.cc |
@@ -4,6 +4,8 @@ |
#include "base/macros.h" |
#include "base/path_service.h" |
+#include "chrome/browser/ui/browser.h" |
+#include "chrome/browser/ui/tabs/tab_strip_model.h" |
#include "chrome/common/chrome_paths.h" |
#include "chrome/common/url_constants.h" |
#include "chrome/test/base/ui_test_utils.h" |
@@ -131,3 +133,17 @@ IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, AddContentScriptWithCode) { |
"testAddContentScriptWithCode", |
new base::StringValue(GetTestUrl("empty.html").spec()))); |
} |
+ |
+#if defined(OS_CHROMEOS) |
+IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, AddContentScriptIncognito) { |
Devlin
2015/04/27 17:55:56
Awesome.
Can you:
- Put a comment saying that, ri
Xi Han
2015/04/27 18:17:48
Added. Yes, I modified other tests, which are in i
|
+ Browser* incognito_browser = ui_test_utils::OpenURLOffTheRecord( |
+ browser()->profile(), GetWebViewEnabledWebUIURL()); |
+ |
+ SetWebUIInstance( |
+ incognito_browser->tab_strip_model()->GetActiveWebContents()->GetWebUI()); |
+ |
+ ASSERT_TRUE(WebUIBrowserTest::RunJavascriptAsyncTest( |
+ "testAddContentScript", |
+ new base::StringValue(GetTestUrl("empty.html").spec()))); |
+} |
+#endif |