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

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

Issue 962053003: tests: Use runPendingTasks instead of WebThread::enterRunLoop()/exitRunLoop() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 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 /* 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 24 matching lines...) Expand all
35 #include "core/dom/Document.h" 35 #include "core/dom/Document.h"
36 #include "core/dom/Element.h" 36 #include "core/dom/Element.h"
37 #include "core/dom/StaticNodeList.h" 37 #include "core/dom/StaticNodeList.h"
38 #include "core/dom/shadow/ShadowRoot.h" 38 #include "core/dom/shadow/ShadowRoot.h"
39 #include "core/frame/FrameView.h" 39 #include "core/frame/FrameView.h"
40 #include "core/frame/LocalFrame.h" 40 #include "core/frame/LocalFrame.h"
41 #include "core/layout/HitTestResult.h" 41 #include "core/layout/HitTestResult.h"
42 #include "core/layout/LayoutTreeAsText.h" 42 #include "core/layout/LayoutTreeAsText.h"
43 #include "core/page/EventHandler.h" 43 #include "core/page/EventHandler.h"
44 #include "core/testing/URLTestHelpers.h" 44 #include "core/testing/URLTestHelpers.h"
45 #include "core/testing/UnitTestHelpers.h"
45 #include "public/platform/Platform.h" 46 #include "public/platform/Platform.h"
46 #include "public/platform/WebUnitTestSupport.h" 47 #include "public/platform/WebUnitTestSupport.h"
47 #include "public/web/WebDocument.h" 48 #include "public/web/WebDocument.h"
48 #include "public/web/WebFrame.h" 49 #include "public/web/WebFrame.h"
49 #include "public/web/WebHitTestResult.h" 50 #include "public/web/WebHitTestResult.h"
50 #include "public/web/WebInputEvent.h" 51 #include "public/web/WebInputEvent.h"
51 #include "public/web/WebTouchAction.h" 52 #include "public/web/WebTouchAction.h"
52 #include "public/web/WebView.h" 53 #include "public/web/WebView.h"
53 #include "public/web/WebViewClient.h" 54 #include "public/web/WebViewClient.h"
54 #include "public/web/WebWidgetClient.h" 55 #include "public/web/WebWidgetClient.h"
55 #include "web/WebViewImpl.h" 56 #include "web/WebViewImpl.h"
56 #include "web/tests/FrameTestHelpers.h" 57 #include "web/tests/FrameTestHelpers.h"
57 58
58 #include <gtest/gtest.h> 59 #include <gtest/gtest.h>
59 60
60 using namespace blink; 61 using namespace blink;
61 using blink::FrameTestHelpers::runPendingTasks; 62 using blink::testing::runPendingTasks;
62 63
63 namespace { 64 namespace {
64 65
65 class TouchActionTrackingWebViewClient : public FrameTestHelpers::TestWebViewCli ent { 66 class TouchActionTrackingWebViewClient : public FrameTestHelpers::TestWebViewCli ent {
66 public: 67 public:
67 TouchActionTrackingWebViewClient() : 68 TouchActionTrackingWebViewClient() :
68 m_actionSetCount(0), 69 m_actionSetCount(0),
69 m_action(WebTouchActionAuto) 70 m_action(WebTouchActionAuto)
70 { 71 {
71 } 72 }
(...skipping 22 matching lines...) Expand all
94 return m_action; 95 return m_action;
95 } 96 }
96 97
97 private: 98 private:
98 int m_actionSetCount; 99 int m_actionSetCount;
99 WebTouchAction m_action; 100 WebTouchAction m_action;
100 }; 101 };
101 102
102 const int kfakeTouchId = 7; 103 const int kfakeTouchId = 7;
103 104
104 class TouchActionTest : public testing::Test { 105 class TouchActionTest : public ::testing::Test {
105 public: 106 public:
106 TouchActionTest() 107 TouchActionTest()
107 : m_baseURL("http://www.test.com/") 108 : m_baseURL("http://www.test.com/")
108 { 109 {
109 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU RL), "touch-action-tests.css"); 110 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU RL), "touch-action-tests.css");
110 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU RL), "touch-action-tests.js"); 111 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU RL), "touch-action-tests.js");
111 } 112 }
112 113
113 virtual void TearDown() 114 virtual void TearDown()
114 { 115 {
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 { 340 {
340 runShadowDOMTest("touch-action-shadow-dom.html"); 341 runShadowDOMTest("touch-action-shadow-dom.html");
341 } 342 }
342 343
343 TEST_F(TouchActionTest, Pan) 344 TEST_F(TouchActionTest, Pan)
344 { 345 {
345 runTouchActionTest("touch-action-pan.html"); 346 runTouchActionTest("touch-action-pan.html");
346 } 347 }
347 348
348 } 349 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698