OLD | NEW |
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/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 8 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
9 #include "chrome/common/chrome_paths.h" | 9 #include "chrome/common/chrome_paths.h" |
10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 131 |
132 ASSERT_TRUE(WebUIBrowserTest::RunJavascriptAsyncTest( | 132 ASSERT_TRUE(WebUIBrowserTest::RunJavascriptAsyncTest( |
133 "testAddContentScriptWithCode", | 133 "testAddContentScriptWithCode", |
134 new base::StringValue(GetTestUrl("empty.html").spec()))); | 134 new base::StringValue(GetTestUrl("empty.html").spec()))); |
135 } | 135 } |
136 | 136 |
137 #if defined(OS_CHROMEOS) | 137 #if defined(OS_CHROMEOS) |
138 // Right now we only have incognito WebUI on CrOS, but this should | 138 // Right now we only have incognito WebUI on CrOS, but this should |
139 // theoretically work for all platforms. | 139 // theoretically work for all platforms. |
140 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, AddContentScriptIncognito) { | 140 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, AddContentScriptIncognito) { |
141 Browser* incognito_browser = ui_test_utils::OpenURLOffTheRecord( | 141 Browser* incognito_browser = |
142 browser()->profile(), GetWebViewEnabledWebUIURL()); | 142 OpenURLOffTheRecord(browser()->profile(), GetWebViewEnabledWebUIURL()); |
143 | 143 |
144 SetWebUIInstance( | 144 SetWebUIInstance( |
145 incognito_browser->tab_strip_model()->GetActiveWebContents()->GetWebUI()); | 145 incognito_browser->tab_strip_model()->GetActiveWebContents()->GetWebUI()); |
146 | 146 |
147 ASSERT_TRUE(WebUIBrowserTest::RunJavascriptAsyncTest( | 147 ASSERT_TRUE(WebUIBrowserTest::RunJavascriptAsyncTest( |
148 "testAddContentScript", | 148 "testAddContentScript", |
149 new base::StringValue(GetTestUrl("empty.html").spec()))); | 149 new base::StringValue(GetTestUrl("empty.html").spec()))); |
150 } | 150 } |
151 #endif | 151 #endif |
OLD | NEW |