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

Side by Side Diff: chrome/browser/tab_contents/render_view_context_menu_browsertest.cc

Issue 14818007: [Aura] Ignore selection changes when a menu is closing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 7 years, 7 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 5 #include <string>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 GURL())); 78 GURL()));
79 79
80 ASSERT_FALSE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_OPENLINKNEWTAB)); 80 ASSERT_FALSE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_OPENLINKNEWTAB));
81 ASSERT_FALSE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_OPENLINKNEWWINDOW)); 81 ASSERT_FALSE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_OPENLINKNEWWINDOW));
82 ASSERT_TRUE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_COPYLINKLOCATION)); 82 ASSERT_TRUE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_COPYLINKLOCATION));
83 } 83 }
84 84
85 // GTK requires a X11-level mouse event to open a context menu correctly. 85 // GTK requires a X11-level mouse event to open a context menu correctly.
86 #if defined(TOOLKIT_GTK) 86 #if defined(TOOLKIT_GTK)
87 #define MAYBE_RealMenu DISABLED_RealMenu 87 #define MAYBE_RealMenu DISABLED_RealMenu
88 #elif defined(OS_CHROMEOS)
89 // Flaky on linux_chromeos try bot. http://crbug.com/237819
90 #define MAYBE_RealMenu DISABLED_RealMenu
91 #else 88 #else
92 #define MAYBE_RealMenu RealMenu 89 #define MAYBE_RealMenu RealMenu
93 #endif 90 #endif
94 // Opens a link in a new tab via a "real" context menu. 91 // Opens a link in a new tab via a "real" context menu.
95 IN_PROC_BROWSER_TEST_F(ContextMenuBrowserTest, 92 IN_PROC_BROWSER_TEST_F(ContextMenuBrowserTest,
96 MAYBE_RealMenu) { 93 MAYBE_RealMenu) {
97 ContextMenuNotificationObserver menu_observer( 94 ContextMenuNotificationObserver menu_observer(
98 IDC_CONTENT_CONTEXT_OPENLINKNEWTAB); 95 IDC_CONTENT_CONTEXT_OPENLINKNEWTAB);
99 ui_test_utils::WindowedTabAddedNotificationObserver tab_observer( 96 ui_test_utils::WindowedTabAddedNotificationObserver tab_observer(
100 content::NotificationService::AllSources()); 97 content::NotificationService::AllSources());
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 // Verify that the referrer on the page matches |kEmptyReferrer|. 263 // Verify that the referrer on the page matches |kEmptyReferrer|.
267 std::string page_referrer; 264 std::string page_referrer;
268 ASSERT_TRUE(content::ExecuteScriptAndExtractString( 265 ASSERT_TRUE(content::ExecuteScriptAndExtractString(
269 tab, 266 tab,
270 "window.domAutomationController.send(window.document.referrer);", 267 "window.domAutomationController.send(window.document.referrer);",
271 &page_referrer)); 268 &page_referrer));
272 ASSERT_EQ(kEmptyReferrer, page_referrer); 269 ASSERT_EQ(kEmptyReferrer, page_referrer);
273 } 270 }
274 271
275 } // namespace 272 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/referrer_policy_browsertest.cc ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698