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

Side by Side Diff: chrome/browser/devtools/device/port_forwarding_browsertest.cc

Issue 285263003: DevTools: Fixed suspected bug in port forwarding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed recv and immediate close scenario on Windows Created 6 years, 7 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 | « no previous file | chrome/browser/devtools/device/port_forwarding_controller.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "chrome/browser/devtools/browser_list_tabcontents_provider.h" 9 #include "chrome/browser/devtools/browser_list_tabcontents_provider.h"
10 #include "chrome/browser/devtools/device/port_forwarding_controller.h" 10 #include "chrome/browser/devtools/device/port_forwarding_controller.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 base::MessageLoop::current()->PostTask( 54 base::MessageLoop::current()->PostTask(
55 FROM_HERE, base::MessageLoop::QuitClosure()); 55 FROM_HERE, base::MessageLoop::QuitClosure());
56 } 56 }
57 57
58 private: 58 private:
59 Profile* profile_; 59 Profile* profile_;
60 }; 60 };
61 }; 61 };
62 62
63 IN_PROC_BROWSER_TEST_F(PortForwardingTest, 63 IN_PROC_BROWSER_TEST_F(PortForwardingTest,
64 DISABLED_LoadPageWithStyleAnsScript) { 64 LoadPageWithStyleAnsScript) {
65 Profile* profile = browser()->profile(); 65 Profile* profile = browser()->profile();
66 66
67 AndroidDeviceManager::DeviceProviders device_providers; 67 AndroidDeviceManager::DeviceProviders device_providers;
68 device_providers.push_back(new SelfAsDeviceProvider(kDefaultDebuggingPort)); 68 device_providers.push_back(new SelfAsDeviceProvider(kDefaultDebuggingPort));
69 DevToolsAndroidBridge::Factory::GetForProfile(profile)-> 69 DevToolsAndroidBridge::Factory::GetForProfile(profile)->
70 set_device_providers_for_test(device_providers); 70 set_device_providers_for_test(device_providers);
71 71
72 ASSERT_TRUE(test_server()->Start()); 72 ASSERT_TRUE(test_server()->Start());
73 GURL original_url = test_server()->GetURL(kPortForwardingTestPage); 73 GURL original_url = test_server()->GetURL(kPortForwardingTestPage);
74 74
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 &result)); 109 &result));
110 ASSERT_EQ("content", result) << "Javascript has not loaded."; 110 ASSERT_EQ("content", result) << "Javascript has not loaded.";
111 111
112 ASSERT_TRUE( 112 ASSERT_TRUE(
113 content::ExecuteScriptAndExtractString( 113 content::ExecuteScriptAndExtractString(
114 rvh, 114 rvh,
115 "window.domAutomationController.send(getBodyMarginLeft())", 115 "window.domAutomationController.send(getBodyMarginLeft())",
116 &result)); 116 &result));
117 ASSERT_EQ("100px", result) << "CSS has not loaded."; 117 ASSERT_EQ("100px", result) << "CSS has not loaded.";
118 } 118 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/devtools/device/port_forwarding_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698