| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/memory/singleton.h" | 6 #include "base/memory/singleton.h" |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/strings/string_split.h" | 8 #include "base/strings/string_split.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 240 |
| 241 virtual void SetUp() OVERRIDE { | 241 virtual void SetUp() OVERRIDE { |
| 242 // Override factory to create tests instances of BrowserPlugin*. | 242 // Override factory to create tests instances of BrowserPlugin*. |
| 243 content::BrowserPluginEmbedder::set_factory_for_testing( | 243 content::BrowserPluginEmbedder::set_factory_for_testing( |
| 244 TestBrowserPluginHostFactory::GetInstance()); | 244 TestBrowserPluginHostFactory::GetInstance()); |
| 245 content::BrowserPluginGuest::set_factory_for_testing( | 245 content::BrowserPluginGuest::set_factory_for_testing( |
| 246 TestBrowserPluginHostFactory::GetInstance()); | 246 TestBrowserPluginHostFactory::GetInstance()); |
| 247 content::BrowserPluginGuestManager::set_factory_for_testing( | 247 content::BrowserPluginGuestManager::set_factory_for_testing( |
| 248 TestBrowserPluginHostFactory::GetInstance()); | 248 TestBrowserPluginHostFactory::GetInstance()); |
| 249 | 249 |
| 250 // On legacy windows, the AcceptDragEvents test needs this to pass. |
| 251 #if defined(OS_WIN) && !defined(USE_AURA) |
| 252 UseRealGLBindings(); |
| 253 #endif |
| 254 |
| 250 ContentBrowserTest::SetUp(); | 255 ContentBrowserTest::SetUp(); |
| 251 } | 256 } |
| 252 virtual void TearDown() OVERRIDE { | 257 virtual void TearDown() OVERRIDE { |
| 253 content::BrowserPluginEmbedder::set_factory_for_testing(NULL); | 258 content::BrowserPluginEmbedder::set_factory_for_testing(NULL); |
| 254 content::BrowserPluginGuest::set_factory_for_testing(NULL); | 259 content::BrowserPluginGuest::set_factory_for_testing(NULL); |
| 255 | 260 |
| 256 ContentBrowserTest::TearDown(); | 261 ContentBrowserTest::TearDown(); |
| 257 } | 262 } |
| 258 | 263 |
| 259 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 264 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 // in the guest. | 935 // in the guest. |
| 931 IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, VerifyInputMethodActive) { | 936 IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, VerifyInputMethodActive) { |
| 932 const char* kEmbedderURL = "/browser_plugin_embedder.html"; | 937 const char* kEmbedderURL = "/browser_plugin_embedder.html"; |
| 933 StartBrowserPluginTest(kEmbedderURL, kHTMLForGuest, true, std::string()); | 938 StartBrowserPluginTest(kEmbedderURL, kHTMLForGuest, true, std::string()); |
| 934 RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>( | 939 RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>( |
| 935 test_guest()->web_contents()->GetRenderViewHost()); | 940 test_guest()->web_contents()->GetRenderViewHost()); |
| 936 EXPECT_TRUE(rvh->input_method_active()); | 941 EXPECT_TRUE(rvh->input_method_active()); |
| 937 } | 942 } |
| 938 | 943 |
| 939 } // namespace content | 944 } // namespace content |
| OLD | NEW |