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

Side by Side Diff: Source/web/tests/ViewportTest.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 19 matching lines...) Expand all
30 30
31 #include "config.h" 31 #include "config.h"
32 32
33 #include "core/frame/FrameView.h" 33 #include "core/frame/FrameView.h"
34 #include "core/frame/LocalFrame.h" 34 #include "core/frame/LocalFrame.h"
35 #include "core/frame/Settings.h" 35 #include "core/frame/Settings.h"
36 #include "core/page/InjectedStyleSheets.h" 36 #include "core/page/InjectedStyleSheets.h"
37 #include "core/page/Page.h" 37 #include "core/page/Page.h"
38 #include "core/page/PageScaleConstraints.h" 38 #include "core/page/PageScaleConstraints.h"
39 #include "core/testing/URLTestHelpers.h" 39 #include "core/testing/URLTestHelpers.h"
40 #include "core/testing/UnitTestHelpers.h"
40 #include "platform/Length.h" 41 #include "platform/Length.h"
41 #include "platform/geometry/IntPoint.h" 42 #include "platform/geometry/IntPoint.h"
42 #include "platform/geometry/IntRect.h" 43 #include "platform/geometry/IntRect.h"
43 #include "platform/geometry/IntSize.h" 44 #include "platform/geometry/IntSize.h"
44 #include "platform/scroll/ScrollbarTheme.h" 45 #include "platform/scroll/ScrollbarTheme.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/WebConsoleMessage.h" 48 #include "public/web/WebConsoleMessage.h"
48 #include "public/web/WebFrame.h" 49 #include "public/web/WebFrame.h"
49 #include "public/web/WebScriptSource.h" 50 #include "public/web/WebScriptSource.h"
50 #include "public/web/WebSettings.h" 51 #include "public/web/WebSettings.h"
51 #include "public/web/WebViewClient.h" 52 #include "public/web/WebViewClient.h"
52 #include "web/tests/FrameTestHelpers.h" 53 #include "web/tests/FrameTestHelpers.h"
53 #include <gmock/gmock.h>
54 #include <gtest/gtest.h> 54 #include <gtest/gtest.h>
55 55
56 #include <vector> 56 #include <vector>
57 57
58 namespace { 58 namespace {
59 59
60 using blink::FrameTestHelpers::runPendingTasks;
61 using blink::FrameTestHelpers::UseMockScrollbarSettings; 60 using blink::FrameTestHelpers::UseMockScrollbarSettings;
61 using blink::testing::runPendingTasks;
62 using namespace blink; 62 using namespace blink;
63 63
64 class ViewportTest : public testing::Test { 64 class ViewportTest : public ::testing::Test {
65 protected: 65 protected:
66 ViewportTest() 66 ViewportTest()
67 : m_baseURL("http://www.test.com/") 67 : m_baseURL("http://www.test.com/")
68 , m_chromeURL("chrome://") 68 , m_chromeURL("chrome://")
69 { 69 {
70 } 70 }
71 71
72 virtual ~ViewportTest() 72 virtual ~ViewportTest()
73 { 73 {
74 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); 74 Platform::current()->unitTestSupport()->unregisterAllMockedURLs();
(...skipping 3076 matching lines...) Expand 10 before | Expand all | Expand 10 after
3151 FrameTestHelpers::WebViewHelper webViewHelper; 3151 FrameTestHelpers::WebViewHelper webViewHelper;
3152 webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-warnings-7.ht ml", true, &webFrameClient, 0, setViewportSettings); 3152 webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-warnings-7.ht ml", true, &webFrameClient, 0, setViewportSettings);
3153 3153
3154 Page* page = webViewHelper.webViewImpl()->page(); 3154 Page* page = webViewHelper.webViewImpl()->page();
3155 runViewportTest(page, 320, 352); 3155 runViewportTest(page, 320, 352);
3156 3156
3157 EXPECT_EQ(0U, webFrameClient.messages.size()); 3157 EXPECT_EQ(0U, webFrameClient.messages.size());
3158 } 3158 }
3159 3159
3160 } // namespace 3160 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698