Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Side by Side Diff: chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc

Issue 1473233004: Experiment: enable WebView drag-drop test for Ozone. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/location.h" 5 #include "base/location.h"
6 #include "base/single_thread_task_runner.h" 6 #include "base/single_thread_task_runner.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 // repositions popup. 948 // repositions popup.
949 IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, MAYBE_PopupPositioningMoved) { 949 IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, MAYBE_PopupPositioningMoved) {
950 TestHelper("testMoved", "web_view/popup_positioning", NO_TEST_SERVER); 950 TestHelper("testMoved", "web_view/popup_positioning", NO_TEST_SERVER);
951 ASSERT_TRUE(guest_web_contents()); 951 ASSERT_TRUE(guest_web_contents());
952 PopupTestHelper(gfx::Point(20, 0)); 952 PopupTestHelper(gfx::Point(20, 0));
953 } 953 }
954 954
955 // Drag and drop inside a webview is currently only enabled for linux and mac, 955 // Drag and drop inside a webview is currently only enabled for linux and mac,
956 // but the tests don't work on anything except chromeos for now. This is because 956 // but the tests don't work on anything except chromeos for now. This is because
957 // of simulating mouse drag code's dependency on platforms. 957 // of simulating mouse drag code's dependency on platforms.
958 #if defined(OS_CHROMEOS) && !defined(USE_OZONE) 958 #if defined(OS_CHROMEOS)
959 IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, DragDropWithinWebView) { 959 IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, DragDropWithinWebView) {
960 LoadAndLaunchPlatformApp("web_view/dnd_within_webview", "connected"); 960 LoadAndLaunchPlatformApp("web_view/dnd_within_webview", "connected");
961 ASSERT_TRUE(ui_test_utils::ShowAndFocusNativeWindow(GetPlatformAppWindow())); 961 ASSERT_TRUE(ui_test_utils::ShowAndFocusNativeWindow(GetPlatformAppWindow()));
962 962
963 embedder_web_contents_ = GetFirstAppWindowWebContents(); 963 embedder_web_contents_ = GetFirstAppWindowWebContents();
964 gfx::Rect offset = embedder_web_contents_->GetContainerBounds(); 964 gfx::Rect offset = embedder_web_contents_->GetContainerBounds();
965 corner_ = gfx::Point(offset.x(), offset.y()); 965 corner_ = gfx::Point(offset.x(), offset.y());
966 966
967 // In the drag drop test we add 20px padding to the page body because on 967 // In the drag drop test we add 20px padding to the page body because on
968 // windows if we get too close to the edge of the window the resize cursor 968 // windows if we get too close to the edge of the window the resize cursor
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 // this time. 1275 // this time.
1276 for (size_t i = 0; i < 4; ++i) 1276 for (size_t i = 0; i < 4; ++i)
1277 SendKeyPressToPlatformApp(ui::VKEY_TAB); 1277 SendKeyPressToPlatformApp(ui::VKEY_TAB);
1278 ExtensionTestMessageListener webview_button_not_focused_listener( 1278 ExtensionTestMessageListener webview_button_not_focused_listener(
1279 "WebViewInteractiveTest.WebViewButtonWasNotFocused", false); 1279 "WebViewInteractiveTest.WebViewButtonWasNotFocused", false);
1280 webview_button_not_focused_listener.set_failure_message( 1280 webview_button_not_focused_listener.set_failure_message(
1281 "WebViewInteractiveTest.WebViewButtonWasFocused"); 1281 "WebViewInteractiveTest.WebViewButtonWasFocused");
1282 SendMessageToEmbedder("verify"); 1282 SendMessageToEmbedder("verify");
1283 EXPECT_TRUE(webview_button_not_focused_listener.WaitUntilSatisfied()); 1283 EXPECT_TRUE(webview_button_not_focused_listener.WaitUntilSatisfied());
1284 } 1284 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698