| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "chrome/app/chrome_dll_resource.h" | 7 #include "chrome/app/chrome_dll_resource.h" |
| 8 #include "chrome/browser/view_ids.h" | 8 #include "chrome/browser/view_ids.h" |
| 9 #include "chrome/common/chrome_paths.h" | 9 #include "chrome/common/chrome_paths.h" |
| 10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| 11 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
| 12 #include "chrome/test/automation/tab_proxy.h" | 12 #include "chrome/test/automation/tab_proxy.h" |
| 13 #include "chrome/test/automation/browser_proxy.h" | 13 #include "chrome/test/automation/browser_proxy.h" |
| 14 #include "chrome/test/automation/window_proxy.h" | 14 #include "chrome/test/automation/window_proxy.h" |
| 15 #include "chrome/test/ui/ui_test.h" | 15 #include "chrome/test/ui/ui_test.h" |
| 16 #include "gfx/rect.h" | 16 #include "gfx/rect.h" |
| 17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
| 18 #include "net/base/net_util.h" | 18 #include "net/base/net_util.h" |
| 19 #include "views/event.h" | 19 #include "views/event.h" |
| 20 | 20 |
| 21 #if defined(OS_CHROMEOS) | 21 #if defined(OS_CHROMEOS) |
| 22 // Disabled, see http://crbug.com/40043. | 22 // Disabled, see http://crbug.com/40043. |
| 23 #define MAYBE_Tab2OutOfTabStrip DISABLED_Tab2OutOfTabStrip | 23 #define MAYBE_Tab2OutOfTabStrip DISABLED_Tab2OutOfTabStrip |
| 24 #else | 24 #else |
| 25 #define MAYBE_Tab2OutOfTabStrip Tab2OutOfTabStrip | 25 #define MAYBE_Tab2OutOfTabStrip Tab2OutOfTabStrip |
| 26 #endif | 26 #endif |
| 27 | 27 |
| 28 #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) && !defined(OS_CHROMEOS) | 28 #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) |
| 29 // Disabled on Toolkit views bot. See http://crbug.com/42614 | 29 // Disabled on Toolkit views bot. See http://crbug.com/42614 |
| 30 #define MAYBE_Tab1Tab3Escape DISABLED_Tab1Tab3Escape | 30 #define MAYBE_Tab1Tab3Escape DISABLED_Tab1Tab3Escape |
| 31 #else | 31 #else |
| 32 // Flaky, see http://crbug.com/21092. | 32 // Flaky, see http://crbug.com/21092. |
| 33 #define MAYBE_Tab1Tab3Escape FLAKY_Tab1Tab3Escape | 33 #define MAYBE_Tab1Tab3Escape FLAKY_Tab1Tab3Escape |
| 34 #endif | 34 #endif |
| 35 | 35 |
| 36 | 36 |
| 37 class TabDraggingTest : public UITest { | 37 class TabDraggingTest : public UITest { |
| 38 protected: | 38 protected: |
| 39 TabDraggingTest() { | 39 TabDraggingTest() { |
| 40 show_window_ = true; | 40 show_window_ = true; |
| 41 } | 41 } |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 // Automated UI test to open three tabs in a new window, and drag Tab_1 into | 44 // Automated UI test to open three tabs in a new window, and drag Tab_1 into |
| 45 // the position of Tab_2. | 45 // the position of Tab_2. |
| 46 // Disabled as per http://crbug.com/10941 | 46 // Disabled as per http://crbug.com/10941 |
| 47 TEST_F(TabDraggingTest, DISABLED_Tab1Tab2) { | 47 TEST_F(TabDraggingTest, DISABLED_Tab1Tab2) { |
| 48 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); | 48 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 scoped_refptr<TabProxy> tab1_2(browser2->GetTab(0)); | 498 scoped_refptr<TabProxy> tab1_2(browser2->GetTab(0)); |
| 499 ASSERT_TRUE(tab1_2.get()); | 499 ASSERT_TRUE(tab1_2.get()); |
| 500 GURL tab1_2_url; | 500 GURL tab1_2_url; |
| 501 ASSERT_TRUE(tab1_2->GetCurrentURL(&tab1_2_url)); | 501 ASSERT_TRUE(tab1_2->GetCurrentURL(&tab1_2_url)); |
| 502 | 502 |
| 503 // Tab_1_2 of Window 2 should essentially be Tab_2 of Window 1. | 503 // Tab_1_2 of Window 2 should essentially be Tab_2 of Window 1. |
| 504 EXPECT_EQ(tab1_2_url.spec(), tab2_url.spec()); | 504 EXPECT_EQ(tab1_2_url.spec(), tab2_url.spec()); |
| 505 EXPECT_NE(tab1_2_url.spec(), tab1_url.spec()); | 505 EXPECT_NE(tab1_2_url.spec(), tab1_url.spec()); |
| 506 EXPECT_NE(tab1_2_url.spec(), tab3_url.spec()); | 506 EXPECT_NE(tab1_2_url.spec(), tab3_url.spec()); |
| 507 } | 507 } |
| OLD | NEW |