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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/sys_info.h" | 9 #include "base/sys_info.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 GURL url(test_server()->GetURL("files/onload_redirect_to_anchor.html")); | 483 GURL url(test_server()->GetURL("files/onload_redirect_to_anchor.html")); |
484 GURL expected_favicon_url(test_server()->GetURL("files/test.png")); | 484 GURL expected_favicon_url(test_server()->GetURL("files/test.png")); |
485 | 485 |
486 ui_test_utils::NavigateToURL(browser(), url); | 486 ui_test_utils::NavigateToURL(browser(), url); |
487 | 487 |
488 NavigationEntry* entry = browser()->GetSelectedTabContents()-> | 488 NavigationEntry* entry = browser()->GetSelectedTabContents()-> |
489 controller().GetActiveEntry(); | 489 controller().GetActiveEntry(); |
490 EXPECT_EQ(expected_favicon_url.spec(), entry->favicon().url().spec()); | 490 EXPECT_EQ(expected_favicon_url.spec(), entry->favicon().url().spec()); |
491 } | 491 } |
492 | 492 |
493 #if defined(OS_MAC) | 493 #if defined(OS_MACOSX) |
494 // http://crbug.com/83828. On Mac 10.6, the failure rate is 14% | 494 // http://crbug.com/83828. On Mac 10.6, the failure rate is 14% |
495 #define MAYBE_FaviconChange FLAKY_FaviconChange | 495 #define MAYBE_FaviconChange FLAKY_FaviconChange |
496 #else | 496 #else |
497 #define MAYBE_FaviconChange FaviconChange | 497 #define MAYBE_FaviconChange FaviconChange |
498 #endif | 498 #endif |
499 // Test that an icon can be changed from JS. | 499 // Test that an icon can be changed from JS. |
500 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_FaviconChange) { | 500 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_FaviconChange) { |
501 static const FilePath::CharType* kFile = | 501 static const FilePath::CharType* kFile = |
502 FILE_PATH_LITERAL("onload_change_favicon.html"); | 502 FILE_PATH_LITERAL("onload_change_favicon.html"); |
503 GURL file_url(ui_test_utils::GetTestUrl(FilePath(FilePath::kCurrentDirectory), | 503 GURL file_url(ui_test_utils::GetTestUrl(FilePath(FilePath::kCurrentDirectory), |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 | 846 |
847 // The normal browser should now have four. | 847 // The normal browser should now have four. |
848 EXPECT_EQ(4, browser()->tab_count()); | 848 EXPECT_EQ(4, browser()->tab_count()); |
849 | 849 |
850 // Close the additional browsers. | 850 // Close the additional browsers. |
851 popup_browser->CloseAllTabs(); | 851 popup_browser->CloseAllTabs(); |
852 app_browser->CloseAllTabs(); | 852 app_browser->CloseAllTabs(); |
853 app_popup_browser->CloseAllTabs(); | 853 app_popup_browser->CloseAllTabs(); |
854 } | 854 } |
855 #endif | 855 #endif |
OLD | NEW |