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

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

Issue 2827803002: Make Interaction Media Features MQ dynamic on Linux. (Closed)
Patch Set: Patch for landing, added the mojo bits Created 3 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
« no previous file with comments | « content/browser/renderer_host/input/input_device_change_observer.cc ('k') | ui/base/BUILD.gn » ('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 2017 The Chromium Authors. All rights reserved. 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 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/macros.h" 5 #include "base/macros.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "content/browser/renderer_host/render_view_host_impl.h" 7 #include "content/browser/renderer_host/render_view_host_impl.h"
8 #include "content/public/browser/web_contents.h" 8 #include "content/public/browser/web_contents.h"
9 #include "content/public/test/browser_test_utils.h" 9 #include "content/public/test/browser_test_utils.h"
10 #include "content/public/test/content_browser_test.h" 10 #include "content/public/test/content_browser_test.h"
11 #include "content/public/test/content_browser_test_utils.h" 11 #include "content/public/test/content_browser_test_utils.h"
12 #include "content/public/test/test_utils.h" 12 #include "content/public/test/test_utils.h"
13 #include "content/shell/browser/shell.h" 13 #include "content/shell/browser/shell.h"
14 #include "ui/base/touch/touch_device.h" 14 #include "ui/base/touch/touch_device.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 namespace { 18 namespace {
19 19
20 class InteractionMediaQueriesDynamicTest : public ContentBrowserTest { 20 class InteractionMediaQueriesDynamicTest : public ContentBrowserTest {
21 public: 21 public:
22 InteractionMediaQueriesDynamicTest() = default; 22 InteractionMediaQueriesDynamicTest() = default;
23 ~InteractionMediaQueriesDynamicTest() override = default; 23 ~InteractionMediaQueriesDynamicTest() override = default;
24 }; 24 };
25 25
26 } // namespace 26 } // namespace
27 27
28 #if defined(OS_WIN) 28 #if defined(OS_WIN) || defined(OS_LINUX)
29 IN_PROC_BROWSER_TEST_F(InteractionMediaQueriesDynamicTest, 29 IN_PROC_BROWSER_TEST_F(InteractionMediaQueriesDynamicTest,
30 PointerMediaQueriesDynamic) { 30 PointerMediaQueriesDynamic) {
31 GURL test_url = GetTestUrl("", "interaction-mq-dynamic.html"); 31 GURL test_url = GetTestUrl("", "interaction-mq-dynamic.html");
32 const base::string16 kSuccessTitle(base::ASCIIToUTF16("SUCCESS")); 32 const base::string16 kSuccessTitle(base::ASCIIToUTF16("SUCCESS"));
33 TitleWatcher title_watcher(shell()->web_contents(), kSuccessTitle); 33 TitleWatcher title_watcher(shell()->web_contents(), kSuccessTitle);
34 NavigateToURL(shell(), test_url); 34 NavigateToURL(shell(), test_url);
35 RenderViewHost* rvh = shell()->web_contents()->GetRenderViewHost(); 35 RenderViewHost* rvh = shell()->web_contents()->GetRenderViewHost();
36 ui::SetAvailablePointerAndHoverTypesForTesting(ui::POINTER_TYPE_COARSE, 36 ui::SetAvailablePointerAndHoverTypesForTesting(ui::POINTER_TYPE_COARSE,
37 ui::HOVER_TYPE_HOVER); 37 ui::HOVER_TYPE_HOVER);
38 rvh->OnWebkitPreferencesChanged(); 38 rvh->OnWebkitPreferencesChanged();
39 EXPECT_EQ(kSuccessTitle, title_watcher.WaitAndGetTitle()); 39 EXPECT_EQ(kSuccessTitle, title_watcher.WaitAndGetTitle());
40 } 40 }
41 #endif 41 #endif
42 42
43 } // namespace content 43 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/input/input_device_change_observer.cc ('k') | ui/base/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698