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

Side by Side Diff: chrome/browser/extensions/api/automation/automation_apitest.cc

Issue 2911553002: Fix automation API bounding boxes on high-dpi devices (Closed)
Patch Set: Add comment about mutating cache Created 3 years, 6 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 | « no previous file | chrome/renderer/extensions/automation_internal_custom_bindings.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/files/file_path.h" 5 #include "base/files/file_path.h"
6 #include "base/location.h" 6 #include "base/location.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 13 matching lines...) Expand all
24 #include "content/public/browser/web_contents.h" 24 #include "content/public/browser/web_contents.h"
25 #include "extensions/test/extension_test_message_listener.h" 25 #include "extensions/test/extension_test_message_listener.h"
26 #include "net/dns/mock_host_resolver.h" 26 #include "net/dns/mock_host_resolver.h"
27 #include "net/test/embedded_test_server/embedded_test_server.h" 27 #include "net/test/embedded_test_server/embedded_test_server.h"
28 #include "testing/gtest/include/gtest/gtest.h" 28 #include "testing/gtest/include/gtest/gtest.h"
29 #include "ui/accessibility/ax_node.h" 29 #include "ui/accessibility/ax_node.h"
30 #include "ui/accessibility/ax_serializable_tree.h" 30 #include "ui/accessibility/ax_serializable_tree.h"
31 #include "ui/accessibility/ax_tree.h" 31 #include "ui/accessibility/ax_tree.h"
32 #include "ui/accessibility/ax_tree_serializer.h" 32 #include "ui/accessibility/ax_tree_serializer.h"
33 #include "ui/accessibility/tree_generator.h" 33 #include "ui/accessibility/tree_generator.h"
34 #include "ui/display/display_switches.h"
34 35
35 #if defined(OS_CHROMEOS) 36 #if defined(OS_CHROMEOS)
36 #include "ash/accelerators/accelerator_controller.h" 37 #include "ash/accelerators/accelerator_controller.h"
37 #include "ash/shell.h" 38 #include "ash/shell.h"
38 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" 39 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h"
39 #endif 40 #endif
40 41
41 namespace extensions { 42 namespace extensions {
42 43
43 namespace { 44 namespace {
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 RunExtensionSubtest("automation/tests/tabs", "document_selection.html")) 291 RunExtensionSubtest("automation/tests/tabs", "document_selection.html"))
291 << message_; 292 << message_;
292 } 293 }
293 294
294 IN_PROC_BROWSER_TEST_F(AutomationApiTest, HitTest) { 295 IN_PROC_BROWSER_TEST_F(AutomationApiTest, HitTest) {
295 StartEmbeddedTestServer(); 296 StartEmbeddedTestServer();
296 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "hit_test.html")) 297 ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "hit_test.html"))
297 << message_; 298 << message_;
298 } 299 }
299 300
301 #if defined(OS_CHROMEOS)
302
303 class AutomationApiTestWithDeviceScaleFactor : public AutomationApiTest {
304 protected:
305 void SetUpCommandLine(base::CommandLine* command_line) override {
306 AutomationApiTest::SetUpCommandLine(command_line);
307 command_line->AppendSwitchASCII(switches::kForceDeviceScaleFactor, "2.0");
308 }
309 };
310
311 IN_PROC_BROWSER_TEST_F(AutomationApiTestWithDeviceScaleFactor, LocationScaled) {
312 StartEmbeddedTestServer();
313 ASSERT_TRUE(RunPlatformAppTest("automation/tests/location_scaled"))
314 << message_;
315 }
316
317 #endif // defined(OS_CHROMEOS)
318
300 } // namespace extensions 319 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/extensions/automation_internal_custom_bindings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698