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