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 | |
255 ContentBrowserTest::SetUp(); | 250 ContentBrowserTest::SetUp(); |
256 } | 251 } |
257 virtual void TearDown() OVERRIDE { | 252 virtual void TearDown() OVERRIDE { |
258 content::BrowserPluginEmbedder::set_factory_for_testing(NULL); | 253 content::BrowserPluginEmbedder::set_factory_for_testing(NULL); |
259 content::BrowserPluginGuest::set_factory_for_testing(NULL); | 254 content::BrowserPluginGuest::set_factory_for_testing(NULL); |
260 | 255 |
261 ContentBrowserTest::TearDown(); | 256 ContentBrowserTest::TearDown(); |
262 } | 257 } |
263 | 258 |
264 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 259 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
935 // in the guest. | 930 // in the guest. |
936 IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, VerifyInputMethodActive) { | 931 IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, VerifyInputMethodActive) { |
937 const char* kEmbedderURL = "/browser_plugin_embedder.html"; | 932 const char* kEmbedderURL = "/browser_plugin_embedder.html"; |
938 StartBrowserPluginTest(kEmbedderURL, kHTMLForGuest, true, std::string()); | 933 StartBrowserPluginTest(kEmbedderURL, kHTMLForGuest, true, std::string()); |
939 RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>( | 934 RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>( |
940 test_guest()->web_contents()->GetRenderViewHost()); | 935 test_guest()->web_contents()->GetRenderViewHost()); |
941 EXPECT_TRUE(rvh->input_method_active()); | 936 EXPECT_TRUE(rvh->input_method_active()); |
942 } | 937 } |
943 | 938 |
944 } // namespace content | 939 } // namespace content |
OLD | NEW |