Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: chrome/browser/views/tabs/tab_dragging_test.cc

Issue 2855012: TTF: Renable TabDraggingTest.Tab1Tab{2,3} (Closed)
Patch Set: Really Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_CHROMEOS) 21 #if defined(OS_CHROMEOS)
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 #define MAYBE_Tab2OutOfTabStrip Tab2OutOfTabStrip
27 #endif 27 #endif
28 28
29 #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) 29 #if defined(OS_LINUX)
30 // Disabled on Toolkit views bot. See http://crbug.com/42614 30 // Disabled on Toolkit views bot. See http://crbug.com/42614
31 #define MAYBE_Tab1Tab3Escape DISABLED_Tab1Tab3Escape 31 #define MAYBE_Tab1Tab3Escape DISABLED_Tab1Tab3Escape
32 #else 32 #else
33 // Flaky, see http://crbug.com/21092. 33 // Flaky, see http://crbug.com/21092.
34 #define MAYBE_Tab1Tab3Escape FLAKY_Tab1Tab3Escape 34 #define MAYBE_Tab1Tab3Escape FLAKY_Tab1Tab3Escape
35 #endif 35 #endif
36 36
37 // These tests fail on Linux. See http://crbug.com/10941
38 #if defined(OS_LINUX)
39 #define MAYBE_Tab1Tab2 FAILS_Tab1Tab2
40 #define MAYBE_Tab1Tab3 FAILS_Tab1Tab3
41 #else
42 #define MAYBE_Tab1Tab2 Tab1Tab2
43 #define MAYBE_Tab1Tab3 Tab1Tab3
44 #endif
37 45
38 class TabDraggingTest : public UITest { 46 class TabDraggingTest : public UITest {
39 protected: 47 protected:
40 TabDraggingTest() { 48 TabDraggingTest() {
41 show_window_ = true; 49 show_window_ = true;
42 } 50 }
43 }; 51 };
44 52
45 // Automated UI test to open three tabs in a new window, and drag Tab_1 into 53 // Automated UI test to open three tabs in a new window, and drag Tab_1 into
46 // the position of Tab_2. 54 // the position of Tab_2.
47 // Disabled as per http://crbug.com/10941 55 TEST_F(TabDraggingTest, MAYBE_Tab1Tab2) {
48 TEST_F(TabDraggingTest, DISABLED_Tab1Tab2) {
49 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); 56 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
50 ASSERT_TRUE(browser.get()); 57 ASSERT_TRUE(browser.get());
51 scoped_refptr<WindowProxy> window(browser->GetWindow()); 58 scoped_refptr<WindowProxy> window(browser->GetWindow());
52 ASSERT_TRUE(window.get()); 59 ASSERT_TRUE(window.get());
53 60
54 // Get initial tab count. 61 // Get initial tab count.
55 int initial_tab_count = 0; 62 int initial_tab_count = 0;
56 ASSERT_TRUE(browser->GetTabCount(&initial_tab_count)); 63 ASSERT_TRUE(browser->GetTabCount(&initial_tab_count));
57 ASSERT_TRUE(1 == initial_tab_count); 64 ASSERT_TRUE(1 == initial_tab_count);
58 65
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 tab2 = browser->GetTab(1); 144 tab2 = browser->GetTab(1);
138 ASSERT_TRUE(tab2.get()); 145 ASSERT_TRUE(tab2.get());
139 GURL tab2_new_url; 146 GURL tab2_new_url;
140 ASSERT_TRUE(tab2->GetCurrentURL(&tab2_new_url)); 147 ASSERT_TRUE(tab2->GetCurrentURL(&tab2_new_url));
141 148
142 EXPECT_EQ(tab1_url.spec(), tab2_new_url.spec()); 149 EXPECT_EQ(tab1_url.spec(), tab2_new_url.spec());
143 EXPECT_EQ(tab2_url.spec(), tab1_new_url.spec()); 150 EXPECT_EQ(tab2_url.spec(), tab1_new_url.spec());
144 } 151 }
145 152
146 // Drag Tab_1 into the position of Tab_3. 153 // Drag Tab_1 into the position of Tab_3.
147 // Disabled as per http://crbug.com/10941 154 TEST_F(TabDraggingTest, MAYBE_Tab1Tab3) {
148 TEST_F(TabDraggingTest, DISABLED_Tab1Tab3) {
149 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); 155 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
150 ASSERT_TRUE(browser.get()); 156 ASSERT_TRUE(browser.get());
151 scoped_refptr<WindowProxy> window(browser->GetWindow()); 157 scoped_refptr<WindowProxy> window(browser->GetWindow());
152 ASSERT_TRUE(window.get()); 158 ASSERT_TRUE(window.get());
153 159
154 // Get initial tab count. 160 // Get initial tab count.
155 int initial_tab_count = 0; 161 int initial_tab_count = 0;
156 ASSERT_TRUE(browser->GetTabCount(&initial_tab_count)); 162 ASSERT_TRUE(browser->GetTabCount(&initial_tab_count));
157 ASSERT_TRUE(1 == initial_tab_count); 163 ASSERT_TRUE(1 == initial_tab_count);
158 164
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 scoped_refptr<TabProxy> tab1_2(browser2->GetTab(0)); 505 scoped_refptr<TabProxy> tab1_2(browser2->GetTab(0));
500 ASSERT_TRUE(tab1_2.get()); 506 ASSERT_TRUE(tab1_2.get());
501 GURL tab1_2_url; 507 GURL tab1_2_url;
502 ASSERT_TRUE(tab1_2->GetCurrentURL(&tab1_2_url)); 508 ASSERT_TRUE(tab1_2->GetCurrentURL(&tab1_2_url));
503 509
504 // Tab_1_2 of Window 2 should essentially be Tab_2 of Window 1. 510 // Tab_1_2 of Window 2 should essentially be Tab_2 of Window 1.
505 EXPECT_EQ(tab1_2_url.spec(), tab2_url.spec()); 511 EXPECT_EQ(tab1_2_url.spec(), tab2_url.spec());
506 EXPECT_NE(tab1_2_url.spec(), tab1_url.spec()); 512 EXPECT_NE(tab1_2_url.spec(), tab1_url.spec());
507 EXPECT_NE(tab1_2_url.spec(), tab3_url.spec()); 513 EXPECT_NE(tab1_2_url.spec(), tab3_url.spec());
508 } 514 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698