| 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 "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
| 10 #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_uti
l.h" | 10 #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_uti
l.h" |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 206 |
| 207 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, | 207 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, |
| 208 AddContentScriptsWithNewWindowAPI) { | 208 AddContentScriptsWithNewWindowAPI) { |
| 209 ui_test_utils::NavigateToURL(browser(), GetWebViewEnabledWebUIURL()); | 209 ui_test_utils::NavigateToURL(browser(), GetWebViewEnabledWebUIURL()); |
| 210 | 210 |
| 211 ASSERT_TRUE(WebUIBrowserTest::RunJavascriptAsyncTest( | 211 ASSERT_TRUE(WebUIBrowserTest::RunJavascriptAsyncTest( |
| 212 "testAddContentScriptsWithNewWindowAPI", | 212 "testAddContentScriptsWithNewWindowAPI", |
| 213 new base::StringValue(GetTestUrl("guest_from_opener.html").spec()))); | 213 new base::StringValue(GetTestUrl("guest_from_opener.html").spec()))); |
| 214 } | 214 } |
| 215 | 215 |
| 216 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, | 216 // https://crbug.com/665512. |
| 217 ContentScriptIsInjectedAfterTerminateAndReloadWebView) { | 217 IN_PROC_BROWSER_TEST_F( |
| 218 WebUIWebViewBrowserTest, |
| 219 DISABLED_ContentScriptIsInjectedAfterTerminateAndReloadWebView) { |
| 218 ui_test_utils::NavigateToURL(browser(), GetWebViewEnabledWebUIURL()); | 220 ui_test_utils::NavigateToURL(browser(), GetWebViewEnabledWebUIURL()); |
| 219 | 221 |
| 220 ASSERT_TRUE(WebUIBrowserTest::RunJavascriptAsyncTest( | 222 ASSERT_TRUE(WebUIBrowserTest::RunJavascriptAsyncTest( |
| 221 "testContentScriptIsInjectedAfterTerminateAndReloadWebView", | 223 "testContentScriptIsInjectedAfterTerminateAndReloadWebView", |
| 222 new base::StringValue(GetTestUrl("empty.html").spec()))); | 224 new base::StringValue(GetTestUrl("empty.html").spec()))); |
| 223 } | 225 } |
| 224 | 226 |
| 225 // TODO(crbug.com/662673) Flaky on CrOS trybots. | 227 // TODO(crbug.com/662673) Flaky on CrOS trybots. |
| 226 #if defined(OS_CHROMEOS) | 228 #if defined(OS_CHROMEOS) |
| 227 #define MAYBE_ContentScriptExistsAsLongAsWebViewTagExists \ | 229 #define MAYBE_ContentScriptExistsAsLongAsWebViewTagExists \ |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 dropdata, client_pt, screen_pt, 0); | 366 dropdata, client_pt, screen_pt, 0); |
| 365 ASSERT_TRUE(listener.Wait()); | 367 ASSERT_TRUE(listener.Wait()); |
| 366 // Confirm no navigation | 368 // Confirm no navigation |
| 367 EXPECT_FALSE(observer.Navigated()); | 369 EXPECT_FALSE(observer.Navigated()); |
| 368 EXPECT_EQ(GetWebViewEnabledWebUIURL(), embedder_web_contents->GetURL()); | 370 EXPECT_EQ(GetWebViewEnabledWebUIURL(), embedder_web_contents->GetURL()); |
| 369 } | 371 } |
| 370 } | 372 } |
| 371 #endif | 373 #endif |
| 372 | 374 |
| 373 #endif // !defined(OS_MACOSX) | 375 #endif // !defined(OS_MACOSX) |
| OLD | NEW |