Chromium Code Reviews| 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" |
| 11 #include "chrome/browser/signin/signin_promo.h" | 11 #include "chrome/browser/signin/signin_promo.h" |
| 12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
| 13 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 13 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 14 #include "chrome/common/chrome_paths.h" | 14 #include "chrome/common/chrome_paths.h" |
| 15 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
| 16 #include "chrome/test/base/ui_test_utils.h" | 16 #include "chrome/test/base/ui_test_utils.h" |
| 17 #include "chrome/test/base/web_ui_browser_test.h" | 17 #include "chrome/test/base/web_ui_browser_test.h" |
| 18 #include "content/public/browser/render_view_host.h" | 18 #include "content/public/browser/render_view_host.h" |
| 19 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
| 20 #include "content/public/common/context_menu_params.h" | 20 #include "content/public/common/context_menu_params.h" |
| 21 #include "content/public/common/drop_data.h" | 21 #include "content/public/common/drop_data.h" |
| 22 #include "content/public/test/browser_test_utils.h" | 22 #include "content/public/test/browser_test_utils.h" |
| 23 #include "extensions/test/extension_test_message_listener.h" | 23 #include "extensions/test/extension_test_message_listener.h" |
| 24 #include "net/test/embedded_test_server/embedded_test_server.h" | 24 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 25 | 25 |
| 26 #if !defined(OS_MACOSX) | |
|
Lei Zhang
2016/10/12 22:42:06
Can you reference the bug?
| |
| 27 | |
| 26 #if !defined(OS_CHROMEOS) && defined(USE_AURA) | 28 #if !defined(OS_CHROMEOS) && defined(USE_AURA) |
| 27 #include "ui/aura/window.h" | 29 #include "ui/aura/window.h" |
| 28 | 30 |
| 29 namespace { | 31 namespace { |
| 30 | 32 |
| 31 class WebUIMessageListener : public base::SupportsWeakPtr<WebUIMessageListener>{ | 33 class WebUIMessageListener : public base::SupportsWeakPtr<WebUIMessageListener>{ |
| 32 public: | 34 public: |
| 33 WebUIMessageListener(content::WebUI* web_ui, const std::string& message) | 35 WebUIMessageListener(content::WebUI* web_ui, const std::string& message) |
| 34 : message_loop_(new content::MessageLoopRunner) { | 36 : message_loop_(new content::MessageLoopRunner) { |
| 35 web_ui->RegisterMessageCallback( | 37 web_ui->RegisterMessageCallback( |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 343 WebUIMessageListener listener(embedder_web_contents->GetWebUI(), | 345 WebUIMessageListener listener(embedder_web_contents->GetWebUI(), |
| 344 "Step3: destNode gets drop"); | 346 "Step3: destNode gets drop"); |
| 345 render_view_host->DragTargetDrop(dropdata, client_pt, screen_pt, 0); | 347 render_view_host->DragTargetDrop(dropdata, client_pt, screen_pt, 0); |
| 346 ASSERT_TRUE(listener.Wait()); | 348 ASSERT_TRUE(listener.Wait()); |
| 347 // Confirm no navigation | 349 // Confirm no navigation |
| 348 EXPECT_FALSE(observer.Navigated()); | 350 EXPECT_FALSE(observer.Navigated()); |
| 349 EXPECT_EQ(GetWebViewEnabledWebUIURL(), embedder_web_contents->GetURL()); | 351 EXPECT_EQ(GetWebViewEnabledWebUIURL(), embedder_web_contents->GetURL()); |
| 350 } | 352 } |
| 351 } | 353 } |
| 352 #endif | 354 #endif |
| 355 | |
| 356 #endif // !defined(OS_MACOSX) | |
| OLD | NEW |