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

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

Issue 22815034: Introduce webkit_glue bridges for the new WebSocket Implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 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
« no previous file with comments | « webkit/child/websocketstreamhandle_impl.cc ('k') | no next file » | 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/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 16 matching lines...) Expand all
27 27
28 virtual base::StringPiece GetDataResource(int, ui::ScaleFactor) OVERRIDE { 28 virtual base::StringPiece GetDataResource(int, ui::ScaleFactor) OVERRIDE {
29 return base::StringPiece(); 29 return base::StringPiece();
30 } 30 }
31 31
32 virtual webkit_glue::ResourceLoaderBridge* CreateResourceLoader( 32 virtual webkit_glue::ResourceLoaderBridge* CreateResourceLoader(
33 const webkit_glue::ResourceLoaderBridge::RequestInfo&) OVERRIDE { 33 const webkit_glue::ResourceLoaderBridge::RequestInfo&) OVERRIDE {
34 return NULL; 34 return NULL;
35 } 35 }
36 36
37 virtual webkit_glue::WebSocketStreamHandleBridge* CreateWebSocketBridge( 37 virtual webkit_glue::WebSocketStreamHandleBridge* CreateWebSocketStreamBridge(
38 WebKit::WebSocketStreamHandle*, 38 WebKit::WebSocketStreamHandle*,
39 webkit_glue::WebSocketStreamHandleDelegate*) OVERRIDE { 39 webkit_glue::WebSocketStreamHandleDelegate*) OVERRIDE {
40 return NULL; 40 return NULL;
41 } 41 }
42 42
43 // Returns mock time when enabled. 43 // Returns mock time when enabled.
44 virtual double monotonicallyIncreasingTime() OVERRIDE { 44 virtual double monotonicallyIncreasingTime() OVERRIDE {
45 if (mock_monotonically_increasing_time_ > 0.0) 45 if (mock_monotonically_increasing_time_ > 0.0)
46 return mock_monotonically_increasing_time_; 46 return mock_monotonically_increasing_time_;
47 return webkit_glue::WebKitPlatformSupportImpl:: 47 return webkit_glue::WebKitPlatformSupportImpl::
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Set a mock time after 1 second to simulate timers suspended for 1 second. 80 // Set a mock time after 1 second to simulate timers suspended for 1 second.
81 double new_time = base::Time::Now().ToDoubleT() + 1; 81 double new_time = base::Time::Now().ToDoubleT() + 1;
82 platform_support.set_mock_monotonically_increasing_time(new_time); 82 platform_support.set_mock_monotonically_increasing_time(new_time);
83 // Resume timers so that the timer set above will be set again to fire 83 // Resume timers so that the timer set above will be set again to fire
84 // immediately. 84 // immediately.
85 platform_support.ResumeSharedTimer(); 85 platform_support.ResumeSharedTimer();
86 EXPECT_TRUE(base::TimeDelta() == platform_support.shared_timer_delay()); 86 EXPECT_TRUE(base::TimeDelta() == platform_support.shared_timer_delay());
87 } 87 }
88 88
89 } // namespace 89 } // namespace
OLDNEW
« no previous file with comments | « webkit/child/websocketstreamhandle_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698