| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/views/ash/tab_scrubber.h" | 5 #include "chrome/browser/ui/views/ash/tab_scrubber.h" |
| 6 | 6 |
| 7 #include "ash/display/event_transformation_handler.h" | 7 #include "ash/display/event_transformation_handler.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 namespace { | 33 namespace { |
| 34 | 34 |
| 35 class TabScrubberTest : public InProcessBrowserTest, | 35 class TabScrubberTest : public InProcessBrowserTest, |
| 36 public TabStripModelObserver { | 36 public TabStripModelObserver { |
| 37 public: | 37 public: |
| 38 TabScrubberTest() | 38 TabScrubberTest() |
| 39 : target_index_(-1) { | 39 : target_index_(-1) { |
| 40 } | 40 } |
| 41 | 41 |
| 42 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 42 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 43 #if defined(OS_CHROMEOS) | |
| 44 command_line->AppendSwitch(chromeos::switches::kNaturalScrollDefault); | |
| 45 #endif | |
| 46 command_line->AppendSwitch(switches::kOpenAsh); | 43 command_line->AppendSwitch(switches::kOpenAsh); |
| 47 } | 44 } |
| 48 | 45 |
| 49 virtual void SetUpOnMainThread() OVERRIDE { | 46 virtual void SetUpOnMainThread() OVERRIDE { |
| 50 TabScrubber::GetInstance()->set_activation_delay(0); | 47 TabScrubber::GetInstance()->set_activation_delay(0); |
| 51 | 48 |
| 52 // Disable external monitor scaling of coordinates. | 49 // Disable external monitor scaling of coordinates. |
| 53 ash::Shell* shell = ash::Shell::GetInstance(); | 50 ash::Shell* shell = ash::Shell::GetInstance(); |
| 54 shell->event_transformation_handler()->set_transformation_mode( | 51 shell->event_transformation_handler()->set_transformation_mode( |
| 55 ash::EventTransformationHandler::TRANSFORM_NONE); | 52 ash::EventTransformationHandler::TRANSFORM_NONE); |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 IN_PROC_BROWSER_TEST_F(TabScrubberTest, CloseBrowser) { | 411 IN_PROC_BROWSER_TEST_F(TabScrubberTest, CloseBrowser) { |
| 415 AddTabs(browser(), 1); | 412 AddTabs(browser(), 1); |
| 416 | 413 |
| 417 SendScrubEvent(browser(), 0); | 414 SendScrubEvent(browser(), 0); |
| 418 EXPECT_TRUE(TabScrubber::GetInstance()->IsActivationPending()); | 415 EXPECT_TRUE(TabScrubber::GetInstance()->IsActivationPending()); |
| 419 browser()->window()->Close(); | 416 browser()->window()->Close(); |
| 420 EXPECT_FALSE(TabScrubber::GetInstance()->IsActivationPending()); | 417 EXPECT_FALSE(TabScrubber::GetInstance()->IsActivationPending()); |
| 421 } | 418 } |
| 422 | 419 |
| 423 #endif // defined(OS_CHROMEOS) | 420 #endif // defined(OS_CHROMEOS) |
| OLD | NEW |