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

Side by Side Diff: net/proxy/proxy_resolver_v8_unittest.cc

Issue 1118743003: Removed line_number check from ProxyResolverV8Test before V8 roll (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | 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 (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 "base/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "base/files/file_util.h" 6 #include "base/files/file_util.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 EXPECT_EQ(ERR_FAILED, result); 276 EXPECT_EQ(ERR_FAILED, result);
277 277
278 MockJSBindings* bindings = resolver.mock_js_bindings(); 278 MockJSBindings* bindings = resolver.mock_js_bindings();
279 EXPECT_EQ(0U, bindings->alerts.size()); 279 EXPECT_EQ(0U, bindings->alerts.size());
280 280
281 // We get one error during compilation. 281 // We get one error during compilation.
282 ASSERT_EQ(1U, bindings->errors.size()); 282 ASSERT_EQ(1U, bindings->errors.size());
283 283
284 EXPECT_EQ("Uncaught SyntaxError: Unexpected end of input", 284 EXPECT_EQ("Uncaught SyntaxError: Unexpected end of input",
285 bindings->errors[0]); 285 bindings->errors[0]);
286 EXPECT_EQ(0, bindings->errors_line_number[0]); 286 // TODO: replace expected value with 5 after V8 roll
287 // EXPECT_EQ(0, bindings->errors_line_number[0]);
287 } 288 }
288 289
289 // Run a PAC script several times, which has side-effects. 290 // Run a PAC script several times, which has side-effects.
290 TEST(ProxyResolverV8Test, SideEffects) { 291 TEST(ProxyResolverV8Test, SideEffects) {
291 ProxyResolverV8WithMockBindings resolver; 292 ProxyResolverV8WithMockBindings resolver;
292 int result = resolver.SetPacScriptFromDisk("side_effects.js"); 293 int result = resolver.SetPacScriptFromDisk("side_effects.js");
293 294
294 // The PAC script increments a counter each time we invoke it. 295 // The PAC script increments a counter each time we invoke it.
295 for (int i = 0; i < 3; ++i) { 296 for (int i = 0; i < 3; ++i) {
296 ProxyInfo proxy_info; 297 ProxyInfo proxy_info;
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 GURL("http://kittens/"), &proxy_info, 665 GURL("http://kittens/"), &proxy_info,
665 CompletionCallback(), NULL, BoundNetLog()); 666 CompletionCallback(), NULL, BoundNetLog());
666 667
667 EXPECT_EQ(OK, result); 668 EXPECT_EQ(OK, result);
668 EXPECT_EQ(0u, bindings->errors.size()); 669 EXPECT_EQ(0u, bindings->errors.size());
669 EXPECT_EQ("kittens:88", proxy_info.proxy_server().ToURI()); 670 EXPECT_EQ("kittens:88", proxy_info.proxy_server().ToURI());
670 } 671 }
671 672
672 } // namespace 673 } // namespace
673 } // namespace net 674 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698