| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, ContextMenuInspectElement) { | 252 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, ContextMenuInspectElement) { |
| 253 ui_test_utils::NavigateToURL(browser(), GetWebViewEnabledWebUIURL()); | 253 ui_test_utils::NavigateToURL(browser(), GetWebViewEnabledWebUIURL()); |
| 254 content::ContextMenuParams params; | 254 content::ContextMenuParams params; |
| 255 TestRenderViewContextMenu menu( | 255 TestRenderViewContextMenu menu( |
| 256 browser()->tab_strip_model()->GetActiveWebContents()->GetMainFrame(), | 256 browser()->tab_strip_model()->GetActiveWebContents()->GetMainFrame(), |
| 257 params); | 257 params); |
| 258 EXPECT_FALSE(menu.IsItemPresent(IDC_CONTENT_CONTEXT_INSPECTELEMENT)); | 258 EXPECT_FALSE(menu.IsItemPresent(IDC_CONTENT_CONTEXT_INSPECTELEMENT)); |
| 259 } | 259 } |
| 260 | 260 |
| 261 #if !defined(OS_CHROMEOS) && defined(USE_AURA) | 261 #if !defined(OS_CHROMEOS) && defined(USE_AURA) |
| 262 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, DragAndDropToInput) { | 262 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, DISABLED_DragAndDropToInput) { |
| 263 ui_test_utils::NavigateToURL(browser(), GetWebViewEnabledWebUIURL()); | 263 ui_test_utils::NavigateToURL(browser(), GetWebViewEnabledWebUIURL()); |
| 264 ASSERT_TRUE( | 264 ASSERT_TRUE( |
| 265 WebUIBrowserTest::RunJavascriptAsyncTest("testDragAndDropToInput")); | 265 WebUIBrowserTest::RunJavascriptAsyncTest("testDragAndDropToInput")); |
| 266 | 266 |
| 267 content::WebContents* const embedder_web_contents = | 267 content::WebContents* const embedder_web_contents = |
| 268 browser()->tab_strip_model()->GetActiveWebContents(); | 268 browser()->tab_strip_model()->GetActiveWebContents(); |
| 269 | 269 |
| 270 // Flush any pending events to make sure we start with a clean slate. | 270 // Flush any pending events to make sure we start with a clean slate. |
| 271 content::RunAllPendingInMessageLoop(); | 271 content::RunAllPendingInMessageLoop(); |
| 272 content::RenderViewHost* const render_view_host = | 272 content::RenderViewHost* const render_view_host = |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 WebUIMessageListener listener(embedder_web_contents->GetWebUI(), | 343 WebUIMessageListener listener(embedder_web_contents->GetWebUI(), |
| 344 "Step3: destNode gets drop"); | 344 "Step3: destNode gets drop"); |
| 345 render_view_host->DragTargetDrop(dropdata, client_pt, screen_pt, 0); | 345 render_view_host->DragTargetDrop(dropdata, client_pt, screen_pt, 0); |
| 346 ASSERT_TRUE(listener.Wait()); | 346 ASSERT_TRUE(listener.Wait()); |
| 347 // Confirm no navigation | 347 // Confirm no navigation |
| 348 EXPECT_FALSE(observer.Navigated()); | 348 EXPECT_FALSE(observer.Navigated()); |
| 349 EXPECT_EQ(GetWebViewEnabledWebUIURL(), embedder_web_contents->GetURL()); | 349 EXPECT_EQ(GetWebViewEnabledWebUIURL(), embedder_web_contents->GetURL()); |
| 350 } | 350 } |
| 351 } | 351 } |
| 352 #endif | 352 #endif |
| OLD | NEW |