OLD | NEW |
1 // Copyright (c) 2010 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_LINUX) | 21 #if defined(OS_LINUX) |
22 // This test doesn't make sense on chromeos as chromeos doesn't allow dragging | 22 // This test doesn't make sense on chromeos as chromeos doesn't allow dragging |
23 // tabs out. | 23 // tabs out. |
24 #define MAYBE_Tab2OutOfTabStrip DISABLED_Tab2OutOfTabStrip | 24 #define MAYBE_Tab2OutOfTabStrip DISABLED_Tab2OutOfTabStrip |
25 #else | 25 #else |
26 #define MAYBE_Tab2OutOfTabStrip Tab2OutOfTabStrip | 26 // Flaky, http://crbug.com/62311. |
| 27 #define MAYBE_Tab2OutOfTabStrip FLAKY_Tab2OutOfTabStrip |
27 #endif | 28 #endif |
28 | 29 |
29 #if defined(OS_LINUX) | 30 #if defined(OS_LINUX) |
30 // Disabled on Toolkit views bot. See http://crbug.com/42614 | 31 // Disabled on Toolkit views bot. See http://crbug.com/42614 |
31 #define MAYBE_Tab1Tab3Escape DISABLED_Tab1Tab3Escape | 32 #define MAYBE_Tab1Tab3Escape DISABLED_Tab1Tab3Escape |
32 #elif defined(OS_WIN) | 33 #elif defined(OS_WIN) |
33 // Disabled on Windows. See http://crbug.com/57687 | 34 // Disabled on Windows. See http://crbug.com/57687 |
34 #define MAYBE_Tab1Tab3Escape DISABLED_Tab1Tab3Escape | 35 #define MAYBE_Tab1Tab3Escape DISABLED_Tab1Tab3Escape |
35 #else | 36 #else |
36 #define MAYBE_Tab1Tab3Escape Tab1Tab3Escape | 37 #define MAYBE_Tab1Tab3Escape Tab1Tab3Escape |
37 #endif | 38 #endif |
38 | 39 |
39 // These tests fail on Linux because we haven't implemented all of tab dragging | 40 // These tests fail on Linux because we haven't implemented all of tab dragging |
40 // (it's not needed on chromeos). See http://crbug.com/10941 | 41 // (it's not needed on chromeos). See http://crbug.com/10941 |
41 #if defined(OS_LINUX) | 42 #if defined(OS_LINUX) |
42 #define MAYBE_Tab1Tab2 DISABLED_Tab1Tab2 | 43 #define MAYBE_Tab1Tab2 DISABLED_Tab1Tab2 |
43 #define MAYBE_Tab1Tab3 DISABLED_Tab1Tab3 | 44 #define MAYBE_Tab1Tab3 DISABLED_Tab1Tab3 |
44 #else | 45 #else |
45 #define MAYBE_Tab1Tab2 Tab1Tab2 | 46 // Flaky, http://crbug.com/62311. |
46 #define MAYBE_Tab1Tab3 Tab1Tab3 | 47 #define MAYBE_Tab1Tab2 FLAKY_Tab1Tab2 |
| 48 #define MAYBE_Tab1Tab3 FLAKY_Tab1Tab3 |
47 #endif | 49 #endif |
48 | 50 |
49 class TabDraggingTest : public UITest { | 51 class TabDraggingTest : public UITest { |
50 protected: | 52 protected: |
51 TabDraggingTest() { | 53 TabDraggingTest() { |
52 show_window_ = true; | 54 show_window_ = true; |
53 } | 55 } |
54 }; | 56 }; |
55 | 57 |
56 // Automated UI test to open three tabs in a new window, and drag Tab_1 into | 58 // Automated UI test to open three tabs in a new window, and drag Tab_1 into |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 scoped_refptr<TabProxy> tab1_2(browser2->GetTab(0)); | 506 scoped_refptr<TabProxy> tab1_2(browser2->GetTab(0)); |
505 ASSERT_TRUE(tab1_2.get()); | 507 ASSERT_TRUE(tab1_2.get()); |
506 GURL tab1_2_url; | 508 GURL tab1_2_url; |
507 ASSERT_TRUE(tab1_2->GetCurrentURL(&tab1_2_url)); | 509 ASSERT_TRUE(tab1_2->GetCurrentURL(&tab1_2_url)); |
508 | 510 |
509 // Tab_1_2 of Window 2 should essentially be Tab_2 of Window 1. | 511 // Tab_1_2 of Window 2 should essentially be Tab_2 of Window 1. |
510 EXPECT_EQ(tab1_2_url.spec(), tab2_url.spec()); | 512 EXPECT_EQ(tab1_2_url.spec(), tab2_url.spec()); |
511 EXPECT_NE(tab1_2_url.spec(), tab1_url.spec()); | 513 EXPECT_NE(tab1_2_url.spec(), tab1_url.spec()); |
512 EXPECT_NE(tab1_2_url.spec(), tab3_url.spec()); | 514 EXPECT_NE(tab1_2_url.spec(), tab3_url.spec()); |
513 } | 515 } |
OLD | NEW |