| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/views/event.h" | 16 #include "chrome/views/event.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 | 19 |
| 20 | 20 |
| 21 class TabDraggingTest : public UITest { | 21 class TabDraggingTest : public UITest { |
| 22 protected: | 22 protected: |
| 23 TabDraggingTest() { | 23 TabDraggingTest() { |
| 24 show_window_ = true; | 24 show_window_ = true; |
| 25 } | 25 } |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 // Automated UI test to open three tabs in a new window, and drag Tab_1 into | 28 // Automated UI test to open three tabs in a new window, and drag Tab_1 into |
| 29 // the position of Tab_2. | 29 // the position of Tab_2. |
| 30 TEST_F(TabDraggingTest, Tab1Tab2) { | 30 // Disabled as per http://crbug.com/10941 |
| 31 TEST_F(TabDraggingTest, DISABLED_Tab1Tab2) { |
| 31 scoped_ptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); | 32 scoped_ptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); |
| 32 ASSERT_TRUE(browser.get()); | 33 ASSERT_TRUE(browser.get()); |
| 33 scoped_ptr<WindowProxy> window(browser->GetWindow()); | 34 scoped_ptr<WindowProxy> window(browser->GetWindow()); |
| 34 ASSERT_TRUE(window.get()); | 35 ASSERT_TRUE(window.get()); |
| 35 | 36 |
| 36 // Get initial tab count. | 37 // Get initial tab count. |
| 37 int initial_tab_count = 0; | 38 int initial_tab_count = 0; |
| 38 ASSERT_TRUE(browser->GetTabCount(&initial_tab_count)); | 39 ASSERT_TRUE(browser->GetTabCount(&initial_tab_count)); |
| 39 ASSERT_TRUE(1 == initial_tab_count); | 40 ASSERT_TRUE(1 == initial_tab_count); |
| 40 | 41 |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 scoped_ptr<TabProxy> tab1_2(browser2->GetTab(0)); | 481 scoped_ptr<TabProxy> tab1_2(browser2->GetTab(0)); |
| 481 ASSERT_TRUE(tab1_2.get()); | 482 ASSERT_TRUE(tab1_2.get()); |
| 482 GURL tab1_2_url; | 483 GURL tab1_2_url; |
| 483 ASSERT_TRUE(tab1_2->GetCurrentURL(&tab1_2_url)); | 484 ASSERT_TRUE(tab1_2->GetCurrentURL(&tab1_2_url)); |
| 484 | 485 |
| 485 // Tab_1_2 of Window 2 should essentially be Tab_2 of Window 1. | 486 // Tab_1_2 of Window 2 should essentially be Tab_2 of Window 1. |
| 486 EXPECT_EQ(tab1_2_url.spec(), tab2_url.spec()); | 487 EXPECT_EQ(tab1_2_url.spec(), tab2_url.spec()); |
| 487 EXPECT_NE(tab1_2_url.spec(), tab1_url.spec()); | 488 EXPECT_NE(tab1_2_url.spec(), tab1_url.spec()); |
| 488 EXPECT_NE(tab1_2_url.spec(), tab3_url.spec()); | 489 EXPECT_NE(tab1_2_url.spec(), tab3_url.spec()); |
| 489 } | 490 } |
| OLD | NEW |