OLD | NEW |
---|---|
(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) | |
Rick Byers
2017/04/05 18:45:50
Since this doesn't actually use the InputDeviceObs
| |
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(); | |
39 EXPECT_EQ(kSuccessTitle, title_watcher.WaitAndGetTitle()); | |
40 } | |
41 #endif | |
42 | |
43 } // namespace content | |
OLD | NEW |