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

Side by Side Diff: third_party/WebKit/Source/web/tests/TouchActionTest.cpp

Issue 2837593002: Nuked WebFrameImplBase. (Closed)
Patch Set: Replaced non-null params with refs. Created 3 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "public/platform/WebTouchEvent.h" 47 #include "public/platform/WebTouchEvent.h"
48 #include "public/platform/WebURLLoaderMockFactory.h" 48 #include "public/platform/WebURLLoaderMockFactory.h"
49 #include "public/web/WebDocument.h" 49 #include "public/web/WebDocument.h"
50 #include "public/web/WebFrame.h" 50 #include "public/web/WebFrame.h"
51 #include "public/web/WebHitTestResult.h" 51 #include "public/web/WebHitTestResult.h"
52 #include "public/web/WebTouchAction.h" 52 #include "public/web/WebTouchAction.h"
53 #include "public/web/WebView.h" 53 #include "public/web/WebView.h"
54 #include "public/web/WebViewClient.h" 54 #include "public/web/WebViewClient.h"
55 #include "public/web/WebWidgetClient.h" 55 #include "public/web/WebWidgetClient.h"
56 #include "testing/gtest/include/gtest/gtest.h" 56 #include "testing/gtest/include/gtest/gtest.h"
57 #include "web/WebFrameImplBase.h"
58 #include "web/WebViewImpl.h" 57 #include "web/WebViewImpl.h"
59 #include "web/tests/FrameTestHelpers.h" 58 #include "web/tests/FrameTestHelpers.h"
60 59
61 using blink::testing::RunPendingTasks; 60 using blink::testing::RunPendingTasks;
62 61
63 namespace blink { 62 namespace blink {
64 63
65 class TouchActionTrackingWebWidgetClient 64 class TouchActionTrackingWebWidgetClient
66 : public FrameTestHelpers::TestWebWidgetClient { 65 : public FrameTestHelpers::TestWebWidgetClient {
67 public: 66 public:
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 FAIL() << "Invalid location index."; 292 FAIL() << "Invalid location index.";
294 } 293 }
295 294
296 IntPoint window_point = 295 IntPoint window_point =
297 root->GetDocument().GetFrame()->View()->ConvertToRootFrame( 296 root->GetDocument().GetFrame()->View()->ConvertToRootFrame(
298 frame_point); 297 frame_point);
299 context_stream << "=" << window_point.X() << "," << window_point.Y() 298 context_stream << "=" << window_point.X() << "," << window_point.Y()
300 << ")."; 299 << ").";
301 std::string failure_context_pos = context_stream.str(); 300 std::string failure_context_pos = context_stream.str();
302 301
303 LocalFrame* main_frame = static_cast<LocalFrame*>( 302 LocalFrame* main_frame =
304 web_view->MainFrame()->ToImplBase()->GetFrame()); 303 ToLocalFrame(WebFrame::ToCoreFrame(*web_view->MainFrame()));
305 FrameView* main_frame_view = main_frame->View(); 304 FrameView* main_frame_view = main_frame->View();
306 IntRect visible_rect = WindowClipRect(*main_frame_view); 305 IntRect visible_rect = WindowClipRect(*main_frame_view);
307 ASSERT_TRUE(visible_rect.Contains(window_point)) 306 ASSERT_TRUE(visible_rect.Contains(window_point))
308 << failure_context_pos 307 << failure_context_pos
309 << " Test point not contained in visible area: " << visible_rect.X() 308 << " Test point not contained in visible area: " << visible_rect.X()
310 << "," << visible_rect.Y() << "-" << visible_rect.MaxX() << "," 309 << "," << visible_rect.Y() << "-" << visible_rect.MaxX() << ","
311 << visible_rect.MaxY(); 310 << visible_rect.MaxY();
312 311
313 // First validate that a hit test at this point will really hit the 312 // First validate that a hit test at this point will really hit the
314 // element we intended. This is the easiest way for a test to be broken, 313 // element we intended. This is the easiest way for a test to be broken,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 416
418 TEST_F(TouchActionTest, ShadowDOM) { 417 TEST_F(TouchActionTest, ShadowDOM) {
419 RunShadowDOMTest("touch-action-shadow-dom.html"); 418 RunShadowDOMTest("touch-action-shadow-dom.html");
420 } 419 }
421 420
422 TEST_F(TouchActionTest, Pan) { 421 TEST_F(TouchActionTest, Pan) {
423 RunTouchActionTest("touch-action-pan.html"); 422 RunTouchActionTest("touch-action-pan.html");
424 } 423 }
425 424
426 } // namespace blink 425 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698