| 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 "base/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| 11 #include "chrome/common/extensions/extension.h" | 11 #include "chrome/common/extensions/extension.h" |
| 12 #include "chrome/test/base/ui_test_utils.h" | 12 #include "chrome/test/base/ui_test_utils.h" |
| 13 #include "net/test/spawned_test_server.h" | 13 #include "net/test/spawned_test_server/spawned_test_server.h" |
| 14 | 14 |
| 15 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, I18N) { | 15 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, I18N) { |
| 16 ASSERT_TRUE(StartTestServer()); | 16 ASSERT_TRUE(StartTestServer()); |
| 17 ASSERT_TRUE(RunExtensionTest("i18n")) << message_; | 17 ASSERT_TRUE(RunExtensionTest("i18n")) << message_; |
| 18 } | 18 } |
| 19 | 19 |
| 20 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, I18NUpdate) { | 20 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, I18NUpdate) { |
| 21 ASSERT_TRUE(StartTestServer()); | 21 ASSERT_TRUE(StartTestServer()); |
| 22 // Create an Extension whose messages.json file will be updated. | 22 // Create an Extension whose messages.json file will be updated. |
| 23 base::ScopedTempDir extension_dir; | 23 base::ScopedTempDir extension_dir; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 ReloadExtension(extension->id()); | 57 ReloadExtension(extension->id()); |
| 58 | 58 |
| 59 // Check that the i18n message is also changed. | 59 // Check that the i18n message is also changed. |
| 60 ui_test_utils::NavigateToURL( | 60 ui_test_utils::NavigateToURL( |
| 61 browser(), test_server()->GetURL("file/extensions/test_file.html")); | 61 browser(), test_server()->GetURL("file/extensions/test_file.html")); |
| 62 EXPECT_TRUE(catcher.GetNextResult()); | 62 EXPECT_TRUE(catcher.GetNextResult()); |
| 63 | 63 |
| 64 ui_test_utils::GetCurrentTabTitle(browser(), &title); | 64 ui_test_utils::GetCurrentTabTitle(browser(), &title); |
| 65 EXPECT_EQ(std::string("SECONDMESSAGE"), UTF16ToUTF8(title)); | 65 EXPECT_EQ(std::string("SECONDMESSAGE"), UTF16ToUTF8(title)); |
| 66 } | 66 } |
| OLD | NEW |