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

Side by Side Diff: webkit/glue/webkit_glue_unittest.cc

Issue 20003004: reland crrev.com/212927 Move webkitplatformsupport_impl and related from glue to child (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & allocator dep for components_unittests in shared_library2 Created 7 years, 5 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
« no previous file with comments | « webkit/glue/webkit_glue_common.gyp ('k') | webkit/glue/webkitplatformsupport_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "webkit/glue/webkit_glue.h" 5 #include "webkit/glue/webkit_glue.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "webkit/glue/webkitplatformsupport_impl.h" 12 #include "webkit/child/webkitplatformsupport_impl.h"
13 13
14 namespace { 14 namespace {
15 15
16 // Derives WebKitPlatformSupportImpl for testing shared timers. 16 // Derives WebKitPlatformSupportImpl for testing shared timers.
17 class TestWebKitPlatformSupport 17 class TestWebKitPlatformSupport
18 : public webkit_glue::WebKitPlatformSupportImpl { 18 : public webkit_glue::WebKitPlatformSupportImpl {
19 public: 19 public:
20 TestWebKitPlatformSupport() : mock_monotonically_increasing_time_(0) { 20 TestWebKitPlatformSupport() : mock_monotonically_increasing_time_(0) {
21 } 21 }
22 22
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // Set a mock time after 1 second to simulate timers suspended for 1 second. 79 // Set a mock time after 1 second to simulate timers suspended for 1 second.
80 double new_time = base::Time::Now().ToDoubleT() + 1; 80 double new_time = base::Time::Now().ToDoubleT() + 1;
81 platform_support.set_mock_monotonically_increasing_time(new_time); 81 platform_support.set_mock_monotonically_increasing_time(new_time);
82 // Resume timers so that the timer set above will be set again to fire 82 // Resume timers so that the timer set above will be set again to fire
83 // immediately. 83 // immediately.
84 platform_support.ResumeSharedTimer(); 84 platform_support.ResumeSharedTimer();
85 EXPECT_TRUE(base::TimeDelta() == platform_support.shared_timer_delay()); 85 EXPECT_TRUE(base::TimeDelta() == platform_support.shared_timer_delay());
86 } 86 }
87 87
88 } // namespace 88 } // namespace
OLDNEW
« no previous file with comments | « webkit/glue/webkit_glue_common.gyp ('k') | webkit/glue/webkitplatformsupport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698