| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 FilePath path; | 60 FilePath path; |
| 61 PathService::Get(chrome::DIR_TEST_DATA, &path); | 61 PathService::Get(chrome::DIR_TEST_DATA, &path); |
| 62 path = path.AppendASCII("npapi").AppendASCII("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 scoped_refptr<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 | |
| 75 delete tab; | |
| 76 } | 74 } |
| OLD | NEW |