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 <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/extensions/extension_browsertest.h" | 13 #include "chrome/browser/extensions/extension_browsertest.h" |
14 #include "chrome/browser/extensions/extension_service.h" | 14 #include "chrome/browser/extensions/extension_service.h" |
15 #include "chrome/browser/extensions/extension_system.h" | 15 #include "chrome/browser/extensions/extension_system.h" |
16 #include "chrome/browser/first_run/first_run.h" | 16 #include "chrome/browser/first_run/first_run.h" |
17 #include "chrome/browser/infobars/infobar_service.h" | 17 #include "chrome/browser/infobars/infobar_service.h" |
18 #include "chrome/browser/managed_mode/managed_mode_navigation_observer.h" | 18 #include "chrome/browser/managed_mode/managed_mode_navigation_observer.h" |
19 #include "chrome/browser/managed_mode/managed_user_service.h" | 19 #include "chrome/browser/managed_mode/managed_user_service.h" |
20 #include "chrome/browser/managed_mode/managed_user_service_factory.h" | 20 #include "chrome/browser/managed_mode/managed_user_service_factory.h" |
21 #include "chrome/browser/prefs/session_startup_pref.h" | 21 #include "chrome/browser/prefs/session_startup_pref.h" |
22 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
23 #include "chrome/browser/profiles/profile_impl.h" | 23 #include "chrome/browser/profiles/profile_impl.h" |
24 #include "chrome/browser/profiles/profile_manager.h" | 24 #include "chrome/browser/profiles/profile_manager.h" |
25 #include "chrome/browser/search/search.h" | |
26 #include "chrome/browser/sessions/session_restore.h" | 25 #include "chrome/browser/sessions/session_restore.h" |
27 #include "chrome/browser/signin/signin_promo.h" | 26 #include "chrome/browser/signin/signin_promo.h" |
28 #include "chrome/browser/ui/browser.h" | 27 #include "chrome/browser/ui/browser.h" |
29 #include "chrome/browser/ui/browser_finder.h" | 28 #include "chrome/browser/ui/browser_finder.h" |
30 #include "chrome/browser/ui/browser_iterator.h" | 29 #include "chrome/browser/ui/browser_iterator.h" |
31 #include "chrome/browser/ui/browser_list.h" | 30 #include "chrome/browser/ui/browser_list.h" |
32 #include "chrome/browser/ui/browser_list_observer.h" | 31 #include "chrome/browser/ui/browser_list_observer.h" |
33 #include "chrome/browser/ui/browser_window.h" | 32 #include "chrome/browser/ui/browser_window.h" |
34 #include "chrome/browser/ui/host_desktop.h" | 33 #include "chrome/browser/ui/host_desktop.h" |
35 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 34 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 | 431 |
433 // This should have created a new browser window. | 432 // This should have created a new browser window. |
434 Browser* new_browser = FindOneOtherBrowser(browser()); | 433 Browser* new_browser = FindOneOtherBrowser(browser()); |
435 ASSERT_TRUE(new_browser); | 434 ASSERT_TRUE(new_browser); |
436 | 435 |
437 TabStripModel* tab_strip = new_browser->tab_strip_model(); | 436 TabStripModel* tab_strip = new_browser->tab_strip_model(); |
438 EXPECT_EQ(4, tab_strip->count()); | 437 EXPECT_EQ(4, tab_strip->count()); |
439 | 438 |
440 EXPECT_EQ("title1.html", | 439 EXPECT_EQ("title1.html", |
441 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); | 440 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); |
442 EXPECT_TRUE(chrome::IsNTPURL(tab_strip->GetWebContentsAt(1)->GetURL(), | 441 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), |
443 browser()->profile())); | 442 tab_strip->GetWebContentsAt(1)->GetURL()); |
444 EXPECT_EQ("title2.html", | 443 EXPECT_EQ("title2.html", |
445 tab_strip->GetWebContentsAt(2)->GetURL().ExtractFileName()); | 444 tab_strip->GetWebContentsAt(2)->GetURL().ExtractFileName()); |
446 EXPECT_EQ(internals::GetWelcomePageURL(), | 445 EXPECT_EQ(internals::GetWelcomePageURL(), |
447 tab_strip->GetWebContentsAt(3)->GetURL()); | 446 tab_strip->GetWebContentsAt(3)->GetURL()); |
448 } | 447 } |
449 | 448 |
450 IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, SyncPromoNoWelcomePage) { | 449 IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, SyncPromoNoWelcomePage) { |
451 // Do a simple non-process-startup browser launch. | 450 // Do a simple non-process-startup browser launch. |
452 CommandLine dummy(CommandLine::NO_PROGRAM); | 451 CommandLine dummy(CommandLine::NO_PROGRAM); |
453 StartupBrowserCreatorImpl launch(base::FilePath(), dummy, | 452 StartupBrowserCreatorImpl launch(base::FilePath(), dummy, |
454 chrome::startup::IS_FIRST_RUN); | 453 chrome::startup::IS_FIRST_RUN); |
455 ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), false, | 454 ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), false, |
456 browser()->host_desktop_type())); | 455 browser()->host_desktop_type())); |
457 | 456 |
458 // This should have created a new browser window. | 457 // This should have created a new browser window. |
459 Browser* new_browser = FindOneOtherBrowser(browser()); | 458 Browser* new_browser = FindOneOtherBrowser(browser()); |
460 ASSERT_TRUE(new_browser); | 459 ASSERT_TRUE(new_browser); |
461 | 460 |
462 TabStripModel* tab_strip = new_browser->tab_strip_model(); | 461 TabStripModel* tab_strip = new_browser->tab_strip_model(); |
463 EXPECT_EQ(1, tab_strip->count()); | 462 EXPECT_EQ(1, tab_strip->count()); |
464 | 463 |
465 if (signin::ShouldShowPromoAtStartup(browser()->profile(), true)) { | 464 if (signin::ShouldShowPromoAtStartup(browser()->profile(), true)) { |
466 EXPECT_EQ(signin::GetPromoURL(signin::SOURCE_START_PAGE, false), | 465 EXPECT_EQ(signin::GetPromoURL(signin::SOURCE_START_PAGE, false), |
467 tab_strip->GetWebContentsAt(0)->GetURL()); | 466 tab_strip->GetWebContentsAt(0)->GetURL()); |
468 } else { | 467 } else { |
469 EXPECT_TRUE(chrome::IsNTPURL(tab_strip->GetWebContentsAt(0)->GetURL(), | 468 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), |
470 browser()->profile())); | 469 tab_strip->GetWebContentsAt(0)->GetURL()); |
471 } | 470 } |
472 } | 471 } |
473 | 472 |
474 IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, SyncPromoWithWelcomePage) { | 473 IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, SyncPromoWithWelcomePage) { |
475 first_run::SetShouldShowWelcomePage(); | 474 first_run::SetShouldShowWelcomePage(); |
476 | 475 |
477 // Do a simple non-process-startup browser launch. | 476 // Do a simple non-process-startup browser launch. |
478 CommandLine dummy(CommandLine::NO_PROGRAM); | 477 CommandLine dummy(CommandLine::NO_PROGRAM); |
479 StartupBrowserCreatorImpl launch(base::FilePath(), dummy, | 478 StartupBrowserCreatorImpl launch(base::FilePath(), dummy, |
480 chrome::startup::IS_FIRST_RUN); | 479 chrome::startup::IS_FIRST_RUN); |
481 ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), false, | 480 ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), false, |
482 browser()->host_desktop_type())); | 481 browser()->host_desktop_type())); |
483 | 482 |
484 // This should have created a new browser window. | 483 // This should have created a new browser window. |
485 Browser* new_browser = FindOneOtherBrowser(browser()); | 484 Browser* new_browser = FindOneOtherBrowser(browser()); |
486 ASSERT_TRUE(new_browser); | 485 ASSERT_TRUE(new_browser); |
487 | 486 |
488 TabStripModel* tab_strip = new_browser->tab_strip_model(); | 487 TabStripModel* tab_strip = new_browser->tab_strip_model(); |
489 EXPECT_EQ(2, tab_strip->count()); | 488 EXPECT_EQ(2, tab_strip->count()); |
490 | 489 |
491 if (signin::ShouldShowPromoAtStartup(browser()->profile(), true)) { | 490 if (signin::ShouldShowPromoAtStartup(browser()->profile(), true)) { |
492 EXPECT_EQ(signin::GetPromoURL(signin::SOURCE_START_PAGE, false), | 491 EXPECT_EQ(signin::GetPromoURL(signin::SOURCE_START_PAGE, false), |
493 tab_strip->GetWebContentsAt(0)->GetURL()); | 492 tab_strip->GetWebContentsAt(0)->GetURL()); |
494 } else { | 493 } else { |
495 EXPECT_TRUE(chrome::IsNTPURL(tab_strip->GetWebContentsAt(0)->GetURL(), | 494 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), |
496 browser()->profile())); | 495 tab_strip->GetWebContentsAt(0)->GetURL()); |
497 } | 496 } |
498 EXPECT_EQ(internals::GetWelcomePageURL(), | 497 EXPECT_EQ(internals::GetWelcomePageURL(), |
499 tab_strip->GetWebContentsAt(1)->GetURL()); | 498 tab_strip->GetWebContentsAt(1)->GetURL()); |
500 } | 499 } |
501 | 500 |
502 IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, SyncPromoWithFirstRunTabs) { | 501 IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, SyncPromoWithFirstRunTabs) { |
503 StartupBrowserCreator browser_creator; | 502 StartupBrowserCreator browser_creator; |
504 browser_creator.AddFirstRunTab(test_server()->GetURL("files/title1.html")); | 503 browser_creator.AddFirstRunTab(test_server()->GetURL("files/title1.html")); |
505 | 504 |
506 // The welcome page should not be shown, even if | 505 // The welcome page should not be shown, even if |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 base::MessageLoop::current()->RunUntilIdle(); | 817 base::MessageLoop::current()->RunUntilIdle(); |
819 | 818 |
820 Browser* new_browser = NULL; | 819 Browser* new_browser = NULL; |
821 // The last open profile (the profile_home1 in this case) will always be | 820 // The last open profile (the profile_home1 in this case) will always be |
822 // launched, even if it will open just the home page. | 821 // launched, even if it will open just the home page. |
823 ASSERT_EQ(1u, chrome::GetBrowserCount(profile_home1, original_desktop_type)); | 822 ASSERT_EQ(1u, chrome::GetBrowserCount(profile_home1, original_desktop_type)); |
824 new_browser = FindOneOtherBrowserForProfile(profile_home1, NULL); | 823 new_browser = FindOneOtherBrowserForProfile(profile_home1, NULL); |
825 ASSERT_TRUE(new_browser); | 824 ASSERT_TRUE(new_browser); |
826 TabStripModel* tab_strip = new_browser->tab_strip_model(); | 825 TabStripModel* tab_strip = new_browser->tab_strip_model(); |
827 ASSERT_EQ(1, tab_strip->count()); | 826 ASSERT_EQ(1, tab_strip->count()); |
828 EXPECT_TRUE(chrome::IsNTPURL(tab_strip->GetWebContentsAt(0)->GetURL(), | 827 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), |
829 browser()->profile())); | 828 tab_strip->GetWebContentsAt(0)->GetURL()); |
830 | 829 |
831 // profile_urls opened the urls. | 830 // profile_urls opened the urls. |
832 ASSERT_EQ(1u, chrome::GetBrowserCount(profile_urls, original_desktop_type)); | 831 ASSERT_EQ(1u, chrome::GetBrowserCount(profile_urls, original_desktop_type)); |
833 new_browser = FindOneOtherBrowserForProfile(profile_urls, NULL); | 832 new_browser = FindOneOtherBrowserForProfile(profile_urls, NULL); |
834 ASSERT_TRUE(new_browser); | 833 ASSERT_TRUE(new_browser); |
835 tab_strip = new_browser->tab_strip_model(); | 834 tab_strip = new_browser->tab_strip_model(); |
836 ASSERT_EQ(1, tab_strip->count()); | 835 ASSERT_EQ(1, tab_strip->count()); |
837 EXPECT_EQ(urls[0], tab_strip->GetWebContentsAt(0)->GetURL()); | 836 EXPECT_EQ(urls[0], tab_strip->GetWebContentsAt(0)->GetURL()); |
838 | 837 |
839 // profile_last opened the last open pages. | 838 // profile_last opened the last open pages. |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 | 919 |
921 // The profile which normally opens the home page displays the new tab page. | 920 // The profile which normally opens the home page displays the new tab page. |
922 Browser* new_browser = NULL; | 921 Browser* new_browser = NULL; |
923 ASSERT_EQ(1u, chrome::GetBrowserCount(profile_home, | 922 ASSERT_EQ(1u, chrome::GetBrowserCount(profile_home, |
924 browser()->host_desktop_type())); | 923 browser()->host_desktop_type())); |
925 new_browser = FindOneOtherBrowserForProfile(profile_home, NULL); | 924 new_browser = FindOneOtherBrowserForProfile(profile_home, NULL); |
926 ASSERT_TRUE(new_browser); | 925 ASSERT_TRUE(new_browser); |
927 TabStripModel* tab_strip = new_browser->tab_strip_model(); | 926 TabStripModel* tab_strip = new_browser->tab_strip_model(); |
928 ASSERT_EQ(1, tab_strip->count()); | 927 ASSERT_EQ(1, tab_strip->count()); |
929 content::WebContents* web_contents = tab_strip->GetWebContentsAt(0); | 928 content::WebContents* web_contents = tab_strip->GetWebContentsAt(0); |
930 EXPECT_TRUE(chrome::IsNTPURL(web_contents->GetURL(), profile_home)); | 929 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), web_contents->GetURL()); |
931 EXPECT_EQ(1U, | 930 EXPECT_EQ(1U, |
932 InfoBarService::FromWebContents(web_contents)->infobar_count()); | 931 InfoBarService::FromWebContents(web_contents)->infobar_count()); |
933 | 932 |
934 // The profile which normally opens last open pages displays the new tab page. | 933 // The profile which normally opens last open pages displays the new tab page. |
935 ASSERT_EQ(1u, chrome::GetBrowserCount(profile_last, | 934 ASSERT_EQ(1u, chrome::GetBrowserCount(profile_last, |
936 browser()->host_desktop_type())); | 935 browser()->host_desktop_type())); |
937 new_browser = FindOneOtherBrowserForProfile(profile_last, NULL); | 936 new_browser = FindOneOtherBrowserForProfile(profile_last, NULL); |
938 ASSERT_TRUE(new_browser); | 937 ASSERT_TRUE(new_browser); |
939 tab_strip = new_browser->tab_strip_model(); | 938 tab_strip = new_browser->tab_strip_model(); |
940 ASSERT_EQ(1, tab_strip->count()); | 939 ASSERT_EQ(1, tab_strip->count()); |
941 web_contents = tab_strip->GetWebContentsAt(0); | 940 web_contents = tab_strip->GetWebContentsAt(0); |
942 EXPECT_TRUE(chrome::IsNTPURL(web_contents->GetURL(), profile_last)); | 941 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), web_contents->GetURL()); |
943 EXPECT_EQ(1U, | 942 EXPECT_EQ(1U, |
944 InfoBarService::FromWebContents(web_contents)->infobar_count()); | 943 InfoBarService::FromWebContents(web_contents)->infobar_count()); |
945 | 944 |
946 // The profile which normally opens URLs displays the new tab page. | 945 // The profile which normally opens URLs displays the new tab page. |
947 ASSERT_EQ(1u, chrome::GetBrowserCount(profile_urls, | 946 ASSERT_EQ(1u, chrome::GetBrowserCount(profile_urls, |
948 browser()->host_desktop_type())); | 947 browser()->host_desktop_type())); |
949 new_browser = FindOneOtherBrowserForProfile(profile_urls, NULL); | 948 new_browser = FindOneOtherBrowserForProfile(profile_urls, NULL); |
950 ASSERT_TRUE(new_browser); | 949 ASSERT_TRUE(new_browser); |
951 tab_strip = new_browser->tab_strip_model(); | 950 tab_strip = new_browser->tab_strip_model(); |
952 ASSERT_EQ(1, tab_strip->count()); | 951 ASSERT_EQ(1, tab_strip->count()); |
953 web_contents = tab_strip->GetWebContentsAt(0); | 952 web_contents = tab_strip->GetWebContentsAt(0); |
954 EXPECT_TRUE(chrome::IsNTPURL(web_contents->GetURL(), profile_urls)); | 953 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), web_contents->GetURL()); |
955 EXPECT_EQ(1U, | 954 EXPECT_EQ(1U, |
956 InfoBarService::FromWebContents(web_contents)->infobar_count()); | 955 InfoBarService::FromWebContents(web_contents)->infobar_count()); |
957 } | 956 } |
958 | 957 |
959 class ManagedModeBrowserCreatorTest : public InProcessBrowserTest { | 958 class ManagedModeBrowserCreatorTest : public InProcessBrowserTest { |
960 protected: | 959 protected: |
961 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 960 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
962 InProcessBrowserTest::SetUpCommandLine(command_line); | 961 InProcessBrowserTest::SetUpCommandLine(command_line); |
963 command_line->AppendSwitch(switches::kEnableManagedUsers); | 962 command_line->AppendSwitch(switches::kEnableManagedUsers); |
964 } | 963 } |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), true, | 1056 ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), true, |
1058 browser()->host_desktop_type())); | 1057 browser()->host_desktop_type())); |
1059 | 1058 |
1060 // This should have created a new browser window. | 1059 // This should have created a new browser window. |
1061 Browser* new_browser = FindOneOtherBrowser(browser()); | 1060 Browser* new_browser = FindOneOtherBrowser(browser()); |
1062 ASSERT_TRUE(new_browser); | 1061 ASSERT_TRUE(new_browser); |
1063 | 1062 |
1064 // Verify that the NTP and the welcome page are shown. | 1063 // Verify that the NTP and the welcome page are shown. |
1065 TabStripModel* tab_strip = new_browser->tab_strip_model(); | 1064 TabStripModel* tab_strip = new_browser->tab_strip_model(); |
1066 ASSERT_EQ(2, tab_strip->count()); | 1065 ASSERT_EQ(2, tab_strip->count()); |
1067 EXPECT_TRUE(chrome::IsNTPURL(tab_strip->GetWebContentsAt(0)->GetURL(), | 1066 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), |
1068 browser()->profile())); | 1067 tab_strip->GetWebContentsAt(0)->GetURL()); |
1069 EXPECT_EQ(internals::GetWelcomePageURL(), | 1068 EXPECT_EQ(internals::GetWelcomePageURL(), |
1070 tab_strip->GetWebContentsAt(1)->GetURL()); | 1069 tab_strip->GetWebContentsAt(1)->GetURL()); |
1071 } | 1070 } |
1072 | 1071 |
1073 IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorFirstRunTest, SyncPromoAllowed) { | 1072 IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorFirstRunTest, SyncPromoAllowed) { |
1074 // Consistently enable the welcome page on all platforms. | 1073 // Consistently enable the welcome page on all platforms. |
1075 first_run::SetShouldShowWelcomePage(); | 1074 first_run::SetShouldShowWelcomePage(); |
1076 | 1075 |
1077 // Simulate the following master_preferences: | 1076 // Simulate the following master_preferences: |
1078 // { | 1077 // { |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1245 browser()->host_desktop_type())); | 1244 browser()->host_desktop_type())); |
1246 | 1245 |
1247 // This should have created a new browser window. | 1246 // This should have created a new browser window. |
1248 Browser* new_browser = FindOneOtherBrowser(browser()); | 1247 Browser* new_browser = FindOneOtherBrowser(browser()); |
1249 ASSERT_TRUE(new_browser); | 1248 ASSERT_TRUE(new_browser); |
1250 | 1249 |
1251 // Verify that the first-run tabs are shown, the NTP that they contain has not | 1250 // Verify that the first-run tabs are shown, the NTP that they contain has not |
1252 // not been replaced by the sync promo and no sync promo has been added. | 1251 // not been replaced by the sync promo and no sync promo has been added. |
1253 TabStripModel* tab_strip = new_browser->tab_strip_model(); | 1252 TabStripModel* tab_strip = new_browser->tab_strip_model(); |
1254 ASSERT_EQ(2, tab_strip->count()); | 1253 ASSERT_EQ(2, tab_strip->count()); |
1255 EXPECT_TRUE(chrome::IsNTPURL(tab_strip->GetWebContentsAt(0)->GetURL(), | 1254 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), |
1256 browser()->profile())); | 1255 tab_strip->GetWebContentsAt(0)->GetURL()); |
1257 EXPECT_EQ("title1.html", | 1256 EXPECT_EQ("title1.html", |
1258 tab_strip->GetWebContentsAt(1)->GetURL().ExtractFileName()); | 1257 tab_strip->GetWebContentsAt(1)->GetURL().ExtractFileName()); |
1259 } | 1258 } |
1260 | 1259 |
1261 IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorFirstRunTest, | 1260 IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorFirstRunTest, |
1262 FirstRunTabsSyncPromoForbidden) { | 1261 FirstRunTabsSyncPromoForbidden) { |
1263 // Simulate the following master_preferences: | 1262 // Simulate the following master_preferences: |
1264 // { | 1263 // { |
1265 // "first_run_tabs" : [ | 1264 // "first_run_tabs" : [ |
1266 // "files/title1.html" | 1265 // "files/title1.html" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1339 ASSERT_EQ(1, tab_strip->count()); | 1338 ASSERT_EQ(1, tab_strip->count()); |
1340 EXPECT_EQ("title1.html", | 1339 EXPECT_EQ("title1.html", |
1341 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); | 1340 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); |
1342 } | 1341 } |
1343 #endif // defined(ENABLE_CONFIGURATION_POLICY) | 1342 #endif // defined(ENABLE_CONFIGURATION_POLICY) |
1344 | 1343 |
1345 #endif // !defined(OS_LINUX) || !defined(GOOGLE_CHROME_BUILD) || | 1344 #endif // !defined(OS_LINUX) || !defined(GOOGLE_CHROME_BUILD) || |
1346 // defined(ENABLE_CONFIGURATION_POLICY) | 1345 // defined(ENABLE_CONFIGURATION_POLICY) |
1347 | 1346 |
1348 #endif // !defined(OS_CHROMEOS) | 1347 #endif // !defined(OS_CHROMEOS) |
OLD | NEW |