| OLD | NEW |
| 1 // Copyright 2008, Google Inc. | 1 // Copyright 2008, Google Inc. |
| 2 // All rights reserved. | 2 // All rights reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
| 9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
| 10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 std::wstring plugins_directory = browser_directory_; | 50 std::wstring plugins_directory = browser_directory_; |
| 51 plugins_directory += L"\\plugins"; | 51 plugins_directory += L"\\plugins"; |
| 52 std::wstring plugin_src = browser_directory_; | 52 std::wstring plugin_src = browser_directory_; |
| 53 plugin_src += L"\\npapi_layout_test_plugin.dll"; | 53 plugin_src += L"\\npapi_layout_test_plugin.dll"; |
| 54 std::wstring plugin_dest = plugins_directory; | 54 std::wstring plugin_dest = plugins_directory; |
| 55 plugin_dest += L"\\npapi_layout_test_plugin.dll"; | 55 plugin_dest += L"\\npapi_layout_test_plugin.dll"; |
| 56 | 56 |
| 57 CreateDirectory(plugins_directory.c_str(), NULL); | 57 CreateDirectory(plugins_directory.c_str(), NULL); |
| 58 CopyFile(plugin_src.c_str(), plugin_dest.c_str(), true /* overwrite */); | 58 CopyFile(plugin_src.c_str(), plugin_dest.c_str(), true /* overwrite */); |
| 59 | 59 |
| 60 std::wstring path; | 60 FilePath path; |
| 61 PathService::Get(chrome::DIR_TEST_DATA, &path); | 61 PathService::Get(chrome::DIR_TEST_DATA, &path); |
| 62 file_util::AppendToPath(&path, L"npapi/layout_test_plugin.html"); | 62 path = path.AppendASCII("npapi").AppendASCII("layout_test_plugin.html"); |
| 63 NavigateToURL(net::FilePathToFileURL(path)); | 63 NavigateToURL(net::FilePathToFileURL(path)); |
| 64 | 64 |
| 65 std::wstring title; | 65 std::wstring title; |
| 66 TabProxy* tab = GetActiveTab(); | 66 TabProxy* tab = GetActiveTab(); |
| 67 ASSERT_TRUE(tab); | 67 ASSERT_TRUE(tab); |
| 68 EXPECT_TRUE(tab->GetTabTitle(&title)); | 68 EXPECT_TRUE(tab->GetTabTitle(&title)); |
| 69 EXPECT_EQ(L"Layout Test Plugin Test", title); | 69 EXPECT_EQ(L"Layout Test Plugin Test", title); |
| 70 | 70 |
| 71 ASSERT_TRUE(tab->GoBack()); | 71 ASSERT_TRUE(tab->GoBack()); |
| 72 EXPECT_TRUE(tab->GetTabTitle(&title)); | 72 EXPECT_TRUE(tab->GetTabTitle(&title)); |
| 73 EXPECT_EQ(L"", title); | 73 EXPECT_EQ(L"", title); |
| 74 | 74 |
| 75 delete tab; | 75 delete tab; |
| 76 } | 76 } |
| OLD | NEW |