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

Side by Side Diff: content/renderer/render_frame_impl_browsertest.cc

Issue 2228253002: NQE: Remove Broadband from the list of ECT enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/leak_annotations.h" 8 #include "base/debug/leak_annotations.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/common/frame_messages.h" 10 #include "content/common/frame_messages.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 TEST_F(RenderFrameImplTest, EffectiveConnectionType) { 240 TEST_F(RenderFrameImplTest, EffectiveConnectionType) {
241 EXPECT_EQ(blink::WebEffectiveConnectionType::TypeUnknown, 241 EXPECT_EQ(blink::WebEffectiveConnectionType::TypeUnknown,
242 frame()->getEffectiveConnectionType()); 242 frame()->getEffectiveConnectionType());
243 EXPECT_EQ(blink::WebEffectiveConnectionType::TypeUnknown, 243 EXPECT_EQ(blink::WebEffectiveConnectionType::TypeUnknown,
244 GetMainRenderFrame()->getEffectiveConnectionType()); 244 GetMainRenderFrame()->getEffectiveConnectionType());
245 245
246 const struct { 246 const struct {
247 blink::WebEffectiveConnectionType type; 247 blink::WebEffectiveConnectionType type;
248 } tests[] = {{blink::WebEffectiveConnectionType::TypeUnknown}, 248 } tests[] = {{blink::WebEffectiveConnectionType::TypeUnknown},
249 {blink::WebEffectiveConnectionType::Type2G}, 249 {blink::WebEffectiveConnectionType::Type2G},
250 {blink::WebEffectiveConnectionType::TypeBroadband}}; 250 {blink::WebEffectiveConnectionType::Type4G}};
251 251
252 for (size_t i = 0; i < arraysize(tests); ++i) { 252 for (size_t i = 0; i < arraysize(tests); ++i) {
253 SetEffectionConnectionType(GetMainRenderFrame(), tests[i].type); 253 SetEffectionConnectionType(GetMainRenderFrame(), tests[i].type);
254 SetEffectionConnectionType(frame(), tests[i].type); 254 SetEffectionConnectionType(frame(), tests[i].type);
255 255
256 EXPECT_EQ(tests[i].type, frame()->getEffectiveConnectionType()); 256 EXPECT_EQ(tests[i].type, frame()->getEffectiveConnectionType());
257 EXPECT_EQ(tests[i].type, 257 EXPECT_EQ(tests[i].type,
258 GetMainRenderFrame()->getEffectiveConnectionType()); 258 GetMainRenderFrame()->getEffectiveConnectionType());
259 259
260 blink::WebHistoryItem item; 260 blink::WebHistoryItem item;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 const std::string exceeded_data_url(1024 * 1024 * 20 + 1, 'd'); 337 const std::string exceeded_data_url(1024 * 1024 * 20 + 1, 'd');
338 338
339 frame()->saveImageFromDataURL(WebString::fromUTF8(exceeded_data_url)); 339 frame()->saveImageFromDataURL(WebString::fromUTF8(exceeded_data_url));
340 ProcessPendingMessages(); 340 ProcessPendingMessages();
341 const IPC::Message* msg4 = render_thread_->sink().GetFirstMessageMatching( 341 const IPC::Message* msg4 = render_thread_->sink().GetFirstMessageMatching(
342 FrameHostMsg_SaveImageFromDataURL::ID); 342 FrameHostMsg_SaveImageFromDataURL::ID);
343 EXPECT_FALSE(msg4); 343 EXPECT_FALSE(msg4);
344 } 344 }
345 345
346 } // namespace 346 } // namespace
OLDNEW
« no previous file with comments | « content/renderer/effective_connection_type_helper.cc ('k') | net/nqe/effective_connection_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698