| 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 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 class TabScrubberTest : public InProcessBrowserTest, | 34 class TabScrubberTest : public InProcessBrowserTest, |
| 35 public TabStripModelObserver { | 35 public TabStripModelObserver { |
| 36 public: | 36 public: |
| 37 TabScrubberTest() | 37 TabScrubberTest() |
| 38 : target_index_(-1) { | 38 : target_index_(-1) { |
| 39 } | 39 } |
| 40 | 40 |
| 41 void SetUpCommandLine(CommandLine* command_line) override { | 41 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 42 #if defined(OS_CHROMEOS) | 42 #if defined(OS_CHROMEOS) |
| 43 command_line->AppendSwitch(chromeos::switches::kNaturalScrollDefault); | 43 command_line->AppendSwitch(chromeos::switches::kNaturalScrollDefault); |
| 44 #endif | 44 #endif |
| 45 command_line->AppendSwitch(switches::kOpenAsh); | 45 command_line->AppendSwitch(switches::kOpenAsh); |
| 46 } | 46 } |
| 47 | 47 |
| 48 void SetUpOnMainThread() override { | 48 void SetUpOnMainThread() override { |
| 49 TabScrubber::GetInstance()->set_activation_delay(0); | 49 TabScrubber::GetInstance()->set_activation_delay(0); |
| 50 | 50 |
| 51 // Disable external monitor scaling of coordinates. | 51 // Disable external monitor scaling of coordinates. |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 IN_PROC_BROWSER_TEST_F(TabScrubberTest, CloseBrowser) { | 411 IN_PROC_BROWSER_TEST_F(TabScrubberTest, CloseBrowser) { |
| 412 AddTabs(browser(), 1); | 412 AddTabs(browser(), 1); |
| 413 | 413 |
| 414 SendScrubEvent(browser(), 0); | 414 SendScrubEvent(browser(), 0); |
| 415 EXPECT_TRUE(TabScrubber::GetInstance()->IsActivationPending()); | 415 EXPECT_TRUE(TabScrubber::GetInstance()->IsActivationPending()); |
| 416 browser()->window()->Close(); | 416 browser()->window()->Close(); |
| 417 EXPECT_FALSE(TabScrubber::GetInstance()->IsActivationPending()); | 417 EXPECT_FALSE(TabScrubber::GetInstance()->IsActivationPending()); |
| 418 } | 418 } |
| 419 | 419 |
| 420 #endif // defined(OS_CHROMEOS) | 420 #endif // defined(OS_CHROMEOS) |
| OLD | NEW |