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

Side by Side Diff: content/browser/renderer_host/input/interaction_mq_dynamic_browsertest.cc

Issue 2690323002: Make Interaction Media Features MQ dynamic on Windows. (Closed)
Patch Set: Added Trace Created 3 years, 8 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/macros.h"
6 #include "base/strings/utf_string_conversions.h"
7 #include "content/browser/renderer_host/render_view_host_impl.h"
8 #include "content/public/browser/web_contents.h"
9 #include "content/public/test/browser_test_utils.h"
10 #include "content/public/test/content_browser_test.h"
11 #include "content/public/test/content_browser_test_utils.h"
12 #include "content/public/test/test_utils.h"
13 #include "content/shell/browser/shell.h"
14 #include "ui/base/touch/touch_device.h"
15
16 namespace content {
17
18 namespace {
19
20 class InteractionMediaQueriesDynamicTest : public ContentBrowserTest {
21 public:
22 InteractionMediaQueriesDynamicTest() = default;
23 ~InteractionMediaQueriesDynamicTest() override = default;
24 };
25
26 } // namespace
27
28 #if defined(OS_WIN)
29 IN_PROC_BROWSER_TEST_F(InteractionMediaQueriesDynamicTest,
30 PointerMediaQueriesDynamic) {
31 GURL test_url = GetTestUrl("", "interaction-mq-dynamic.html");
32 const base::string16 kSuccessTitle(base::ASCIIToUTF16("SUCCESS"));
33 TitleWatcher title_watcher(shell()->web_contents(), kSuccessTitle);
34 NavigateToURL(shell(), test_url);
35 RenderViewHost* rvh = shell()->web_contents()->GetRenderViewHost();
36 ui::SetAvailablePointerAndHoverTypesForTesting(ui::POINTER_TYPE_COARSE,
37 ui::HOVER_TYPE_HOVER);
38 rvh->OnWebkitPreferencesChanged();
jam 2017/04/10 15:01:06 why do you need to call this? I thought the observ
39 EXPECT_EQ(kSuccessTitle, title_watcher.WaitAndGetTitle());
40 }
41 #endif
42
43 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698