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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura_browsertest.cc

Issue 184903003: Window ownership -> WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/browser/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 315
316 // Make sure the page has both back/forward history. 316 // Make sure the page has both back/forward history.
317 ExecuteSyncJSFunction(view_host, "navigate_next()"); 317 ExecuteSyncJSFunction(view_host, "navigate_next()");
318 EXPECT_EQ(1, GetCurrentIndex()); 318 EXPECT_EQ(1, GetCurrentIndex());
319 ExecuteSyncJSFunction(view_host, "navigate_next()"); 319 ExecuteSyncJSFunction(view_host, "navigate_next()");
320 EXPECT_EQ(2, GetCurrentIndex()); 320 EXPECT_EQ(2, GetCurrentIndex());
321 web_contents->GetController().GoBack(); 321 web_contents->GetController().GoBack();
322 EXPECT_EQ(1, GetCurrentIndex()); 322 EXPECT_EQ(1, GetCurrentIndex());
323 323
324 aura::Window* content = web_contents->GetView()->GetContentNativeView(); 324 aura::Window* content = web_contents->GetView()->GetContentNativeView();
325 aura::WindowEventDispatcher* dispatcher = content->GetDispatcher(); 325 aura::WindowEventDispatcher* dispatcher = content->GetHost()->dispatcher();
326 gfx::Rect bounds = content->GetBoundsInRootWindow(); 326 gfx::Rect bounds = content->GetBoundsInRootWindow();
327 327
328 base::TimeDelta timestamp; 328 base::TimeDelta timestamp;
329 ui::TouchEvent press(ui::ET_TOUCH_PRESSED, 329 ui::TouchEvent press(ui::ET_TOUCH_PRESSED,
330 gfx::Point(bounds.x() + bounds.width() / 2, bounds.y() + 5), 330 gfx::Point(bounds.x() + bounds.width() / 2, bounds.y() + 5),
331 0, timestamp); 331 0, timestamp);
332 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&press); 332 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&press);
333 ASSERT_FALSE(details.dispatcher_destroyed); 333 ASSERT_FALSE(details.dispatcher_destroyed);
334 EXPECT_EQ(1, GetCurrentIndex()); 334 EXPECT_EQ(1, GetCurrentIndex());
335 335
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 10); 658 10);
659 base::string16 actual_title = title_watcher.WaitAndGetTitle(); 659 base::string16 actual_title = title_watcher.WaitAndGetTitle();
660 EXPECT_EQ(expected_title, actual_title); 660 EXPECT_EQ(expected_title, actual_title);
661 661
662 EXPECT_EQ(2, GetCurrentIndex()); 662 EXPECT_EQ(2, GetCurrentIndex());
663 EXPECT_TRUE(controller.CanGoBack()); 663 EXPECT_TRUE(controller.CanGoBack());
664 EXPECT_FALSE(controller.CanGoForward()); 664 EXPECT_FALSE(controller.CanGoForward());
665 } 665 }
666 666
667 } // namespace content 667 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | content/shell/browser/shell_download_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698