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

Side by Side Diff: chrome/browser/chromeos/login/oobe_browsertest.cc

Issue 725293005: We previously had a setting in chrome defaults but this deprecates that for a command line flag and… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2171_62
Patch Set: Created 6 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 | « chrome/browser/about_flags.cc ('k') | chrome/browser/defaults.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/browser/chrome_notification_types.h" 6 #include "chrome/browser/chrome_notification_types.h"
7 #include "chrome/browser/chromeos/login/existing_user_controller.h" 7 #include "chrome/browser/chromeos/login/existing_user_controller.h"
8 #include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h" 8 #include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h"
9 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" 9 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
10 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" 10 #include "chrome/browser/chromeos/login/ui/webui_login_display.h"
11 #include "chrome/browser/chromeos/login/ui/webui_login_view.h"
12 #include "chrome/browser/chromeos/login/wizard_controller.h" 11 #include "chrome/browser/chromeos/login/wizard_controller.h"
13 #include "chrome/browser/defaults.h"
14 #include "chrome/browser/lifetime/application_lifetime.h" 12 #include "chrome/browser/lifetime/application_lifetime.h"
15 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" 13 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
16 #include "chrome/common/chrome_switches.h" 14 #include "chrome/common/chrome_switches.h"
17 #include "chrome/test/base/in_process_browser_test.h" 15 #include "chrome/test/base/in_process_browser_test.h"
18 #include "chromeos/chromeos_switches.h" 16 #include "chromeos/chromeos_switches.h"
19 #include "content/public/browser/web_contents.h"
20 #include "content/public/common/renderer_preferences.h"
21 #include "content/public/test/test_utils.h" 17 #include "content/public/test/test_utils.h"
22 #include "google_apis/gaia/fake_gaia.h" 18 #include "google_apis/gaia/fake_gaia.h"
23 #include "google_apis/gaia/gaia_switches.h" 19 #include "google_apis/gaia/gaia_switches.h"
24 #include "net/test/embedded_test_server/embedded_test_server.h" 20 #include "net/test/embedded_test_server/embedded_test_server.h"
25 #include "net/test/embedded_test_server/http_response.h" 21 #include "net/test/embedded_test_server/http_response.h"
26 #include "testing/gtest/include/gtest/gtest.h" 22 #include "testing/gtest/include/gtest/gtest.h"
27 #include "ui/base/test/ui_controls.h" 23 #include "ui/base/test/ui_controls.h"
28 #include "ui/views/widget/widget.h" 24 #include "ui/views/widget/widget.h"
29 25
30 using namespace net::test_server; 26 using namespace net::test_server;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 114
119 ui_controls::SendKeyPress(login_window, 115 ui_controls::SendKeyPress(login_window,
120 ui::VKEY_E, 116 ui::VKEY_E,
121 true, // control 117 true, // control
122 false, // shift 118 false, // shift
123 true, // alt 119 true, // alt
124 false); // command 120 false); // command
125 OobeScreenWaiter(OobeDisplay::SCREEN_OOBE_ENROLLMENT).Wait(); 121 OobeScreenWaiter(OobeDisplay::SCREEN_OOBE_ENROLLMENT).Wait();
126 } 122 }
127 123
128 IN_PROC_BROWSER_TEST_F(OobeTest, LinkDisambiguationDefaultRespected) {
129 chromeos::LoginDisplayHostImpl* display_host =
130 static_cast<chromeos::LoginDisplayHostImpl*>(
131 chromeos::LoginDisplayHostImpl::default_host());
132 ASSERT_TRUE(display_host);
133 chromeos::WebUILoginView* login_view = display_host->GetWebUILoginView();
134 ASSERT_TRUE(login_view);
135 content::WebContents* web_contents = login_view->GetWebContents();
136 ASSERT_TRUE(web_contents);
137 content::RendererPreferences* prefs = web_contents->GetMutableRendererPrefs();
138 ASSERT_TRUE(prefs);
139 // Per crbug/431163 the WiFi selection dropdown doesn't support the link
140 // disambiguation popup for gesture events, and this feature is disabled
141 // within ChromeOS. Ensure that the web preferences reflect the default.
142 if (browser_defaults::kShowLinkDisambiguationPopup) {
143 EXPECT_EQ(
144 content::TapMultipleTargetsStrategy::
145 TAP_MULTIPLE_TARGETS_STRATEGY_POPUP,
146 prefs->tap_multiple_targets_strategy);
147 } else {
148 EXPECT_EQ(
149 content::TapMultipleTargetsStrategy::TAP_MULTIPLE_TARGETS_STRATEGY_NONE,
150 prefs->tap_multiple_targets_strategy);
151 }
152 }
153
154 } // namespace chromeos 124 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/defaults.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698