Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(658)

Side by Side Diff: chrome/test/ui/layout_plugin_uitest.cpp

Issue 40226: Fix files with lines > 80 cols. Part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/testing_browser_process.h ('k') | chrome/test/ui/omnibox_uitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 29 matching lines...) Expand all
40 class LayoutPluginTester : public UITest { 40 class LayoutPluginTester : public UITest {
41 }; 41 };
42 42
43 } // namespace 43 } // namespace
44 44
45 // Make sure that navigating away from a plugin referenced by JS doesn't 45 // Make sure that navigating away from a plugin referenced by JS doesn't
46 // crash. 46 // crash.
47 TEST_F(LayoutPluginTester, UnloadNoCrash) { 47 TEST_F(LayoutPluginTester, UnloadNoCrash) {
48 // We need to copy our test-plugin into the plugins directory so that 48 // We need to copy our test-plugin into the plugins directory so that
49 // the browser can load it. 49 // the browser can load it.
50 std::wstring plugins_directory = browser_directory_ + L"\\plugins"; 50 std::wstring plugins_directory = browser_directory_;
51 std::wstring plugin_src = browser_directory_ + L"\\npapi_layout_test_plugin.dl l"; 51 plugins_directory += L"\\plugins";
52 std::wstring plugin_dest = plugins_directory + L"\\npapi_layout_test_plugin.dl l"; 52 std::wstring plugin_src = browser_directory_;
53 plugin_src += L"\\npapi_layout_test_plugin.dll";
54 std::wstring plugin_dest = plugins_directory;
55 plugin_dest += L"\\npapi_layout_test_plugin.dll";
53 56
54 CreateDirectory(plugins_directory.c_str(), NULL); 57 CreateDirectory(plugins_directory.c_str(), NULL);
55 CopyFile(plugin_src.c_str(), plugin_dest.c_str(), true /* overwrite */); 58 CopyFile(plugin_src.c_str(), plugin_dest.c_str(), true /* overwrite */);
56 59
57 std::wstring path; 60 std::wstring path;
58 PathService::Get(chrome::DIR_TEST_DATA, &path); 61 PathService::Get(chrome::DIR_TEST_DATA, &path);
59 file_util::AppendToPath(&path, L"npapi/layout_test_plugin.html"); 62 file_util::AppendToPath(&path, L"npapi/layout_test_plugin.html");
60 NavigateToURL(net::FilePathToFileURL(path)); 63 NavigateToURL(net::FilePathToFileURL(path));
61 64
62 std::wstring title; 65 std::wstring title;
63 TabProxy* tab = GetActiveTab(); 66 TabProxy* tab = GetActiveTab();
64 ASSERT_TRUE(tab); 67 ASSERT_TRUE(tab);
65 EXPECT_TRUE(tab->GetTabTitle(&title)); 68 EXPECT_TRUE(tab->GetTabTitle(&title));
66 EXPECT_EQ(L"Layout Test Plugin Test", title); 69 EXPECT_EQ(L"Layout Test Plugin Test", title);
67 70
68 ASSERT_TRUE(tab->GoBack()); 71 ASSERT_TRUE(tab->GoBack());
69 EXPECT_TRUE(tab->GetTabTitle(&title)); 72 EXPECT_TRUE(tab->GetTabTitle(&title));
70 EXPECT_EQ(L"", title); 73 EXPECT_EQ(L"", title);
71 74
72 delete tab; 75 delete tab;
73 } 76 }
OLDNEW
« no previous file with comments | « chrome/test/testing_browser_process.h ('k') | chrome/test/ui/omnibox_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698