OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #if defined(OS_MACOSX) | 10 #if defined(OS_MACOSX) |
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1219 EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_OPTIONS)); | 1219 EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_OPTIONS)); |
1220 EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_IMPORT_SETTINGS)); | 1220 EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_IMPORT_SETTINGS)); |
1221 // Set Incognito to AVAILABLE. | 1221 // Set Incognito to AVAILABLE. |
1222 IncognitoModePrefs::SetAvailability(popup_browser->profile()->GetPrefs(), | 1222 IncognitoModePrefs::SetAvailability(popup_browser->profile()->GetPrefs(), |
1223 IncognitoModePrefs::ENABLED); | 1223 IncognitoModePrefs::ENABLED); |
1224 // OPTIONS and IMPORT_SETTINGS are still disabled since it is a non-normal UI. | 1224 // OPTIONS and IMPORT_SETTINGS are still disabled since it is a non-normal UI. |
1225 EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_OPTIONS)); | 1225 EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_OPTIONS)); |
1226 EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_IMPORT_SETTINGS)); | 1226 EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_IMPORT_SETTINGS)); |
1227 } | 1227 } |
1228 | 1228 |
1229 IN_PROC_BROWSER_TEST_F(BrowserTest, PageZoom) { | 1229 #if defined(OS_WIN) |
| 1230 // Flakes regularly on Windows XP |
| 1231 // http://crbug.com/146040 |
| 1232 #define MAYBE_PageZoom DISABLED_PageZoom |
| 1233 #else |
| 1234 #define MAYBE_PageZoom PageZoom |
| 1235 #endif |
| 1236 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_PageZoom) { |
1230 WebContents* contents = chrome::GetActiveWebContents(browser()); | 1237 WebContents* contents = chrome::GetActiveWebContents(browser()); |
1231 bool enable_plus, enable_minus; | 1238 bool enable_plus, enable_minus; |
1232 | 1239 |
1233 content::WindowedNotificationObserver zoom_in_observer( | 1240 content::WindowedNotificationObserver zoom_in_observer( |
1234 content::NOTIFICATION_ZOOM_LEVEL_CHANGED, | 1241 content::NOTIFICATION_ZOOM_LEVEL_CHANGED, |
1235 content::NotificationService::AllSources()); | 1242 content::NotificationService::AllSources()); |
1236 chrome::Zoom(browser(), content::PAGE_ZOOM_IN); | 1243 chrome::Zoom(browser(), content::PAGE_ZOOM_IN); |
1237 zoom_in_observer.Wait(); | 1244 zoom_in_observer.Wait(); |
1238 EXPECT_EQ(contents->GetZoomPercent(&enable_plus, &enable_minus), 110); | 1245 EXPECT_EQ(contents->GetZoomPercent(&enable_plus, &enable_minus), 110); |
1239 EXPECT_TRUE(enable_plus); | 1246 EXPECT_TRUE(enable_plus); |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1605 ASSERT_GT(ui_test_utils::FindInPage(tab, ASCIIToUTF16("WebKit"), true, true, | 1612 ASSERT_GT(ui_test_utils::FindInPage(tab, ASCIIToUTF16("WebKit"), true, true, |
1606 NULL, NULL), | 1613 NULL, NULL), |
1607 0); | 1614 0); |
1608 ASSERT_GT(ui_test_utils::FindInPage(tab, ASCIIToUTF16("OS"), true, true, | 1615 ASSERT_GT(ui_test_utils::FindInPage(tab, ASCIIToUTF16("OS"), true, true, |
1609 NULL, NULL), | 1616 NULL, NULL), |
1610 0); | 1617 0); |
1611 ASSERT_GT(ui_test_utils::FindInPage(tab, ASCIIToUTF16("JavaScript"), true, | 1618 ASSERT_GT(ui_test_utils::FindInPage(tab, ASCIIToUTF16("JavaScript"), true, |
1612 true, NULL, NULL), | 1619 true, NULL, NULL), |
1613 0); | 1620 0); |
1614 } | 1621 } |
OLD | NEW |