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 // This entire test suite relies on the translate infobar which has been removed | 5 // This entire test suite relies on the translate infobar which has been removed |
6 // from Aura. The file should be ported to use the bubble. | 6 // from Aura. The file should be ported to use the bubble. |
7 #if !defined(USE_AURA) | 7 #if !defined(USE_AURA) |
8 | 8 |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 | 10 |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 ASSERT_TRUE(fetcher); | 257 ASSERT_TRUE(fetcher); |
258 fetcher->set_status(net::URLRequestStatus()); | 258 fetcher->set_status(net::URLRequestStatus()); |
259 fetcher->set_url(fetcher->GetOriginalURL()); | 259 fetcher->set_url(fetcher->GetOriginalURL()); |
260 fetcher->set_response_code(net::HTTP_OK); | 260 fetcher->set_response_code(net::HTTP_OK); |
261 fetcher->SetResponseString(element_js); | 261 fetcher->SetResponseString(element_js); |
262 fetcher->delegate()->OnURLFetchComplete(fetcher); | 262 fetcher->delegate()->OnURLFetchComplete(fetcher); |
263 | 263 |
264 // Wait for the page title is changed after the test finished. | 264 // Wait for the page title is changed after the test finished. |
265 const base::string16 result = watcher.WaitAndGetTitle(); | 265 const base::string16 result = watcher.WaitAndGetTitle(); |
266 EXPECT_EQ("PASS", base::UTF16ToASCII(result)); | 266 EXPECT_EQ("PASS", base::UTF16ToASCII(result)); |
| 267 SetExpectCSPErrorMessages(true); |
267 } | 268 } |
268 | 269 |
269 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, BasicTranslation) { | 270 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, BasicTranslation) { |
270 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI(kBasicFrenchTestPath, true)); | 271 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI(kBasicFrenchTestPath, true)); |
271 } | 272 } |
272 | 273 |
273 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, IgnoreRefreshMetaTag) { | 274 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, IgnoreRefreshMetaTag) { |
274 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI( | 275 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI( |
275 kRefreshMetaTagTestPath, false)); | 276 kRefreshMetaTagTestPath, false)); |
276 } | 277 } |
(...skipping 17 matching lines...) Expand all Loading... |
294 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, UpdateLocation) { | 295 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, UpdateLocation) { |
295 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI( | 296 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI( |
296 kUpdateLocationTestPath, false)); | 297 kUpdateLocationTestPath, false)); |
297 } | 298 } |
298 | 299 |
299 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, UpdateLocationAtOnload) { | 300 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, UpdateLocationAtOnload) { |
300 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI( | 301 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI( |
301 kUpdateLocationAtOnloadTestPath, false)); | 302 kUpdateLocationAtOnloadTestPath, false)); |
302 } | 303 } |
303 #endif // !defined(USE_AURA) | 304 #endif // !defined(USE_AURA) |
OLD | NEW |