OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.h" | 9 #include "base/message_loop.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 : public webkit_glue::WebKitPlatformSupportImpl { | 93 : public webkit_glue::WebKitPlatformSupportImpl { |
94 public: | 94 public: |
95 TestWebKitPlatformSupport() : mock_monotonically_increasing_time_(0) { | 95 TestWebKitPlatformSupport() : mock_monotonically_increasing_time_(0) { |
96 } | 96 } |
97 | 97 |
98 // WebKitPlatformSupportImpl implementation | 98 // WebKitPlatformSupportImpl implementation |
99 virtual string16 GetLocalizedString(int) OVERRIDE { | 99 virtual string16 GetLocalizedString(int) OVERRIDE { |
100 return string16(); | 100 return string16(); |
101 } | 101 } |
102 | 102 |
103 virtual base::StringPiece GetDataResource(int) OVERRIDE { | 103 virtual base::StringPiece GetDataResource(int, ui::ScaleFactor) OVERRIDE { |
104 return base::StringPiece(); | 104 return base::StringPiece(); |
105 } | 105 } |
106 | 106 |
107 virtual base::StringPiece GetImageResource(int resource_id, | |
108 float scale_factor) OVERRIDE { | |
109 return base::StringPiece(); | |
110 } | |
111 | |
112 virtual void GetPlugins(bool, | 107 virtual void GetPlugins(bool, |
113 std::vector<webkit::WebPluginInfo, | 108 std::vector<webkit::WebPluginInfo, |
114 std::allocator<webkit::WebPluginInfo> >*) OVERRIDE { | 109 std::allocator<webkit::WebPluginInfo> >*) OVERRIDE { |
115 } | 110 } |
116 | 111 |
117 virtual webkit_glue::ResourceLoaderBridge* CreateResourceLoader( | 112 virtual webkit_glue::ResourceLoaderBridge* CreateResourceLoader( |
118 const webkit_glue::ResourceLoaderBridge::RequestInfo&) OVERRIDE { | 113 const webkit_glue::ResourceLoaderBridge::RequestInfo&) OVERRIDE { |
119 return NULL; | 114 return NULL; |
120 } | 115 } |
121 | 116 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 // Set a mock time after 1 second to simulate timers suspended for 1 second. | 158 // Set a mock time after 1 second to simulate timers suspended for 1 second. |
164 double new_time = base::Time::Now().ToDoubleT() + 1; | 159 double new_time = base::Time::Now().ToDoubleT() + 1; |
165 platform_support.set_mock_monotonically_increasing_time(new_time); | 160 platform_support.set_mock_monotonically_increasing_time(new_time); |
166 // Resume timers so that the timer set above will be set again to fire | 161 // Resume timers so that the timer set above will be set again to fire |
167 // immediately. | 162 // immediately. |
168 platform_support.ResumeSharedTimer(); | 163 platform_support.ResumeSharedTimer(); |
169 EXPECT_TRUE(base::TimeDelta() == platform_support.shared_timer_delay()); | 164 EXPECT_TRUE(base::TimeDelta() == platform_support.shared_timer_delay()); |
170 } | 165 } |
171 | 166 |
172 } // namespace | 167 } // namespace |
OLD | NEW |