OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extensions/extension_apitest.h" | 5 #include "chrome/browser/extensions/extension_apitest.h" |
6 | 6 |
7 #include "chrome/browser/prefs/pref_service.h" | 7 #include "chrome/browser/prefs/pref_service.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
11 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
12 #include "net/base/mock_host_resolver.h" | 12 #include "net/base/mock_host_resolver.h" |
13 | 13 |
14 // Possible race in ChromeURLDataManager. http://crbug.com/59198 | 14 // Possible race in ChromeURLDataManager. http://crbug.com/59198 |
15 #if defined(OS_MACOSX) || defined(OS_LINUX) | 15 #if defined(OS_MACOSX) || defined(OS_LINUX) |
16 #define MAYBE_TabOnRemoved DISABLED_TabOnRemoved | 16 #define MAYBE_TabOnRemoved DISABLED_TabOnRemoved |
17 #else | 17 #else |
18 #define MAYBE_TabOnRemoved TabOnRemoved | 18 #define MAYBE_TabOnRemoved TabOnRemoved |
19 #endif | 19 #endif |
20 | 20 |
21 // Crashes on linux views. http://crbug.com/61592 | |
22 #if defined(OS_LINUX) && defined(TOOLKIT_VIEWS) | |
23 #define MAYBE_Tabs DISABLED_Tabs | |
24 #else | |
25 #define MAYBE_Tabs Tabs | |
26 #endif | |
27 | |
28 // Window resizes are not completed by the time the callback happens, | 21 // Window resizes are not completed by the time the callback happens, |
29 // so these tests fail on linux. http://crbug.com/72369 | 22 // so these tests fail on linux. http://crbug.com/72369 |
30 #if defined(OS_LINUX) | 23 #if defined(OS_LINUX) |
31 #define MAYBE_FocusWindowDoesNotExitFullscreen \ | 24 #define MAYBE_FocusWindowDoesNotExitFullscreen \ |
32 DISABLED_FocusWindowDoesNotExitFullscreen | 25 DISABLED_FocusWindowDoesNotExitFullscreen |
33 #define MAYBE_UpdateWindowSizeExitsFullscreen \ | 26 #define MAYBE_UpdateWindowSizeExitsFullscreen \ |
34 DISABLED_UpdateWindowSizeExitsFullscreen | 27 DISABLED_UpdateWindowSizeExitsFullscreen |
35 #else | 28 #else |
36 #define MAYBE_FocusWindowDoesNotExitFullscreen FocusWindowDoesNotExitFullscreen | 29 #define MAYBE_FocusWindowDoesNotExitFullscreen FocusWindowDoesNotExitFullscreen |
37 #define MAYBE_UpdateWindowSizeExitsFullscreen UpdateWindowSizeExitsFullscreen | 30 #define MAYBE_UpdateWindowSizeExitsFullscreen UpdateWindowSizeExitsFullscreen |
38 #endif | 31 #endif |
39 | 32 |
40 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_Tabs) { | 33 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Tabs) { |
41 ASSERT_TRUE(StartTestServer()); | 34 ASSERT_TRUE(StartTestServer()); |
42 | 35 |
43 // The test creates a tab and checks that the URL of the new tab | 36 // The test creates a tab and checks that the URL of the new tab |
44 // is that of the new tab page. Make sure the pref that controls | 37 // is that of the new tab page. Make sure the pref that controls |
45 // this is set. | 38 // this is set. |
46 browser()->profile()->GetPrefs()->SetBoolean( | 39 browser()->profile()->GetPrefs()->SetBoolean( |
47 prefs::kHomePageIsNewTabPage, true); | 40 prefs::kHomePageIsNewTabPage, true); |
48 | 41 |
49 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "crud.html")) << message_; | 42 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "crud.html")) << message_; |
50 } | 43 } |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, GetViewsOfCreatedPopup) { | 162 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, GetViewsOfCreatedPopup) { |
170 ASSERT_TRUE(StartTestServer()); | 163 ASSERT_TRUE(StartTestServer()); |
171 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_popup.html")) | 164 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_popup.html")) |
172 << message_; | 165 << message_; |
173 } | 166 } |
174 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, GetViewsOfCreatedWindow) { | 167 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, GetViewsOfCreatedWindow) { |
175 ASSERT_TRUE(StartTestServer()); | 168 ASSERT_TRUE(StartTestServer()); |
176 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html")) | 169 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html")) |
177 << message_; | 170 << message_; |
178 } | 171 } |
OLD | NEW |