OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/prefs/pref_service.h" | 5 #include "base/prefs/pref_service.h" |
6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/search/search.h" | 8 #include "chrome/browser/search/search.h" |
9 #include "chrome/browser/ui/search/instant_test_utils.h" | 9 #include "chrome/browser/ui/search/instant_test_utils.h" |
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
11 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
12 #include "chrome/common/url_constants.h" | 12 #include "chrome/common/url_constants.h" |
13 #include "chrome/test/base/in_process_browser_test.h" | 13 #include "chrome/test/base/in_process_browser_test.h" |
14 #include "chrome/test/base/ui_test_utils.h" | 14 #include "chrome/test/base/ui_test_utils.h" |
15 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
16 #include "ui/base/resource/resource_bundle.h" | 16 #include "ui/base/resource/resource_bundle.h" |
17 | 17 |
18 class LocalNTPTest : public InProcessBrowserTest, | 18 class LocalNTPTest : public InProcessBrowserTest, |
19 public InstantTestBase { | 19 public InstantTestBase { |
20 public: | 20 public: |
21 LocalNTPTest() {} | 21 LocalNTPTest() {} |
22 | 22 |
23 protected: | 23 protected: |
24 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 24 virtual void SetUpInProcessBrowserTestFixture() override { |
25 ASSERT_TRUE(https_test_server().Start()); | 25 ASSERT_TRUE(https_test_server().Start()); |
26 GURL instant_url = https_test_server().GetURL( | 26 GURL instant_url = https_test_server().GetURL( |
27 "files/instant_extended.html?strk=1&"); | 27 "files/instant_extended.html?strk=1&"); |
28 GURL ntp_url = https_test_server().GetURL( | 28 GURL ntp_url = https_test_server().GetURL( |
29 "files/local_ntp_browsertest.html?strk=1&"); | 29 "files/local_ntp_browsertest.html?strk=1&"); |
30 InstantTestBase::Init(instant_url, ntp_url, false); | 30 InstantTestBase::Init(instant_url, ntp_url, false); |
31 } | 31 } |
32 }; | 32 }; |
33 | 33 |
34 IN_PROC_BROWSER_TEST_F(LocalNTPTest, LocalNTPJavascriptTest) { | 34 IN_PROC_BROWSER_TEST_F(LocalNTPTest, LocalNTPJavascriptTest) { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 GURL(chrome::kChromeUINewTabURL), | 79 GURL(chrome::kChromeUINewTabURL), |
80 NEW_FOREGROUND_TAB, | 80 NEW_FOREGROUND_TAB, |
81 ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB | | 81 ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB | |
82 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); | 82 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); |
83 | 83 |
84 // Verify that the NTP is in French. | 84 // Verify that the NTP is in French. |
85 content::WebContents* active_tab = | 85 content::WebContents* active_tab = |
86 browser()->tab_strip_model()->GetActiveWebContents(); | 86 browser()->tab_strip_model()->GetActiveWebContents(); |
87 EXPECT_EQ(base::ASCIIToUTF16("Nouvel onglet"), active_tab->GetTitle()); | 87 EXPECT_EQ(base::ASCIIToUTF16("Nouvel onglet"), active_tab->GetTitle()); |
88 } | 88 } |
OLD | NEW |