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

Side by Side Diff: chrome/browser/browser_browsertest.cc

Issue 1747015: Add support for new webkit capability allowing us to update (Closed)
Patch Set: Created 10 years, 7 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 | chrome/browser/fav_icon_helper.cc » ('j') | chrome/browser/fav_icon_helper.cc » ('J')
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 <string> 5 #include <string>
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/sys_info.h" 10 #include "base/sys_info.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 GURL url(server->TestServerPage("files/onload_redirect_to_anchor.html")); 376 GURL url(server->TestServerPage("files/onload_redirect_to_anchor.html"));
377 GURL expected_favicon_url(server->TestServerPage("files/test.png")); 377 GURL expected_favicon_url(server->TestServerPage("files/test.png"));
378 378
379 ui_test_utils::NavigateToURL(browser(), url); 379 ui_test_utils::NavigateToURL(browser(), url);
380 380
381 NavigationEntry* entry = browser()->GetSelectedTabContents()-> 381 NavigationEntry* entry = browser()->GetSelectedTabContents()->
382 controller().GetActiveEntry(); 382 controller().GetActiveEntry();
383 EXPECT_EQ(expected_favicon_url.spec(), entry->favicon().url().spec()); 383 EXPECT_EQ(expected_favicon_url.spec(), entry->favicon().url().spec());
384 } 384 }
385 385
386 IN_PROC_BROWSER_TEST_F(BrowserTest, FaviconChange) {
387 static const FilePath::CharType* kFile =
388 FILE_PATH_LITERAL("onload_change_favicon.html");
389 GURL file_url(ui_test_utils::GetTestUrl(FilePath(FilePath::kCurrentDirectory),
390 FilePath(kFile)));
391 ASSERT_TRUE(file_url.SchemeIs(chrome::kFileScheme));
392 ui_test_utils::NavigateToURL(browser(), file_url);
393
394 NavigationEntry* entry = browser()->GetSelectedTabContents()->
395 controller().GetActiveEntry();
396 static const FilePath::CharType* kIcon =
397 FILE_PATH_LITERAL("test1.png");
398 GURL expected_favicon_url(
399 ui_test_utils::GetTestUrl(FilePath(FilePath::kCurrentDirectory),
400 FilePath(kIcon)));
401 EXPECT_EQ(expected_favicon_url.spec(), entry->favicon().url().spec());
402 }
403
386 // TODO(sky): get these to run on a Mac. 404 // TODO(sky): get these to run on a Mac.
387 #if !defined(OS_MACOSX) 405 #if !defined(OS_MACOSX)
388 IN_PROC_BROWSER_TEST_F(BrowserTest, PhantomTab) { 406 IN_PROC_BROWSER_TEST_F(BrowserTest, PhantomTab) {
389 PhantomTabTest(); 407 PhantomTabTest();
390 } 408 }
391 409
392 IN_PROC_BROWSER_TEST_F(BrowserTest, RevivePhantomTab) { 410 IN_PROC_BROWSER_TEST_F(BrowserTest, RevivePhantomTab) {
393 PhantomTabTest(); 411 PhantomTabTest();
394 412
395 if (HasFatalFailure()) 413 if (HasFatalFailure())
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 EXPECT_TRUE(new_model->IsAppTab(0)); 575 EXPECT_TRUE(new_model->IsAppTab(0));
558 EXPECT_FALSE(new_model->IsAppTab(1)); 576 EXPECT_FALSE(new_model->IsAppTab(1));
559 577
560 EXPECT_TRUE(new_model->IsTabPinned(0)); 578 EXPECT_TRUE(new_model->IsTabPinned(0));
561 EXPECT_TRUE(new_model->IsTabPinned(1)); 579 EXPECT_TRUE(new_model->IsTabPinned(1));
562 580
563 EXPECT_TRUE(new_model->GetTabContentsAt(0)->app_extension() == 581 EXPECT_TRUE(new_model->GetTabContentsAt(0)->app_extension() ==
564 app_extension); 582 app_extension);
565 } 583 }
566 #endif // !defined(OS_CHROMEOS) 584 #endif // !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/fav_icon_helper.cc » ('j') | chrome/browser/fav_icon_helper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698