| 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 public TabStripModelObserver { | 33 public TabStripModelObserver { |
| 34 public: | 34 public: |
| 35 TabScrubberTest() | 35 TabScrubberTest() |
| 36 : target_index_(-1) { | 36 : target_index_(-1) { |
| 37 } | 37 } |
| 38 | 38 |
| 39 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 39 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 40 #if defined(OS_CHROMEOS) | 40 #if defined(OS_CHROMEOS) |
| 41 command_line->AppendSwitch(switches::kNaturalScrollDefault); | 41 command_line->AppendSwitch(switches::kNaturalScrollDefault); |
| 42 #endif | 42 #endif |
| 43 command_line->AppendSwitch(switches::kAshEnableTabScrubbing); | |
| 44 command_line->AppendSwitch(switches::kOpenAsh); | 43 command_line->AppendSwitch(switches::kOpenAsh); |
| 45 } | 44 } |
| 46 | 45 |
| 47 virtual void SetUpOnMainThread() OVERRIDE { | 46 virtual void SetUpOnMainThread() OVERRIDE { |
| 48 TabScrubber::GetInstance()->set_activation_delay( | 47 TabScrubber::GetInstance()->set_activation_delay( |
| 49 base::TimeDelta::FromMilliseconds(0)); | 48 base::TimeDelta::FromMilliseconds(0)); |
| 50 | 49 |
| 51 // Disable external monitor scaling of coordinates. | 50 // Disable external monitor scaling of coordinates. |
| 52 ash::Shell* shell = ash::Shell::GetInstance(); | 51 ash::Shell* shell = ash::Shell::GetInstance(); |
| 53 shell->event_transformation_handler()->set_transformation_mode( | 52 shell->event_transformation_handler()->set_transformation_mode( |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 IN_PROC_BROWSER_TEST_F(TabScrubberTest, MoveAfter) { | 398 IN_PROC_BROWSER_TEST_F(TabScrubberTest, MoveAfter) { |
| 400 AddTabs(browser(), 2); | 399 AddTabs(browser(), 2); |
| 401 | 400 |
| 402 SendScrubEvent(browser(), 1); | 401 SendScrubEvent(browser(), 1); |
| 403 EXPECT_TRUE(TabScrubber::GetInstance()->IsActivationPending()); | 402 EXPECT_TRUE(TabScrubber::GetInstance()->IsActivationPending()); |
| 404 browser()->tab_strip_model()->MoveSelectedTabsTo(0); | 403 browser()->tab_strip_model()->MoveSelectedTabsTo(0); |
| 405 EXPECT_EQ(2, TabScrubber::GetInstance()->highlighted_tab()); | 404 EXPECT_EQ(2, TabScrubber::GetInstance()->highlighted_tab()); |
| 406 } | 405 } |
| 407 | 406 |
| 408 #endif // OS_CHROMEOS | 407 #endif // OS_CHROMEOS |
| OLD | NEW |