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

Side by Side Diff: ui/views/controls/webview/webview_interactive_uitest.cc

Issue 387353004: Create only a single LegacyRenderWidgetHostHWND per WebContentsViewAura. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@render_frame_ax_3
Patch Set: Oops, forgot to upload delegate in new file Created 6 years, 1 month 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
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/views/controls/webview/webview.h" 5 #include "ui/views/controls/webview/webview.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/public/browser/web_contents.h" 9 #include "content/public/browser/web_contents.h"
10 #include "content/public/test/test_browser_context.h" 10 #include "content/public/test/test_browser_context.h"
11 #include "content/public/test/test_browser_thread.h" 11 #include "content/public/test/test_browser_thread.h"
12 #include "ui/base/ime/text_input_focus_manager.h" 12 #include "ui/base/ime/text_input_focus_manager.h"
13 #include "ui/base/ui_base_switches.h" 13 #include "ui/base/ui_base_switches.h"
14 #include "ui/gl/gl_surface.h" 14 #include "ui/gl/gl_surface.h"
15 #include "ui/views/test/webview_test_helper.h" 15 #include "ui/views/test/webview_test_helper.h"
16 #include "ui/views/test/widget_test.h" 16 #include "ui/views/test/widget_test.h"
17 17
18 #if defined(OS_WIN)
19 #include "ui/gfx/win/dpi.h"
20 #endif
21
18 namespace { 22 namespace {
19 23
20 class WebViewInteractiveUiTest : public views::test::WidgetTest { 24 class WebViewInteractiveUiTest : public views::test::WidgetTest {
21 public: 25 public:
22 WebViewInteractiveUiTest() 26 WebViewInteractiveUiTest()
23 : ui_thread_(content::BrowserThread::UI, base::MessageLoop::current()) {} 27 : ui_thread_(content::BrowserThread::UI, base::MessageLoop::current()) {}
24 28
25 void SetUp() override { 29 void SetUp() override {
26 gfx::GLSurface::InitializeOneOffForTests(); 30 gfx::GLSurface::InitializeOneOffForTests();
27 WidgetTest::SetUp(); 31 WidgetTest::SetUp();
32 #if defined(OS_WIN)
33 gfx::InitDeviceScaleFactor(1.0f);
34 #endif
28 } 35 }
29 36
30 protected: 37 protected:
31 content::BrowserContext* browser_context() { return &browser_context_; } 38 content::BrowserContext* browser_context() { return &browser_context_; }
32 39
33 private: 40 private:
34 content::TestBrowserContext browser_context_; 41 content::TestBrowserContext browser_context_;
35 views::WebViewTestHelper webview_test_helper_; 42 views::WebViewTestHelper webview_test_helper_;
36 content::TestBrowserThread ui_thread_; 43 content::TestBrowserThread ui_thread_;
37 44
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 ui::TextInputClient* client2 = webview->GetTextInputClient(); 80 ui::TextInputClient* client2 = webview->GetTextInputClient();
74 EXPECT_NE(null_text_input_client, client2); 81 EXPECT_NE(null_text_input_client, client2);
75 EXPECT_EQ(text_input_focus_manager->GetFocusedTextInputClient(), client2); 82 EXPECT_EQ(text_input_focus_manager->GetFocusedTextInputClient(), client2);
76 EXPECT_NE(client1, client2); 83 EXPECT_NE(client1, client2);
77 84
78 widget->Close(); 85 widget->Close();
79 RunPendingMessages(); 86 RunPendingMessages();
80 } 87 }
81 88
82 } // namespace 89 } // namespace
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698