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

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

Issue 1124293003: Fix ProxyResolverV8Test after 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 // TODO: replace expected value with 5 after V8 roll 286 EXPECT_EQ(5, bindings->errors_line_number[0]);
287 // EXPECT_EQ(0, bindings->errors_line_number[0]);
288 } 287 }
289 288
290 // Run a PAC script several times, which has side-effects. 289 // Run a PAC script several times, which has side-effects.
291 TEST(ProxyResolverV8Test, SideEffects) { 290 TEST(ProxyResolverV8Test, SideEffects) {
292 ProxyResolverV8WithMockBindings resolver; 291 ProxyResolverV8WithMockBindings resolver;
293 int result = resolver.SetPacScriptFromDisk("side_effects.js"); 292 int result = resolver.SetPacScriptFromDisk("side_effects.js");
294 293
295 // The PAC script increments a counter each time we invoke it. 294 // The PAC script increments a counter each time we invoke it.
296 for (int i = 0; i < 3; ++i) { 295 for (int i = 0; i < 3; ++i) {
297 ProxyInfo proxy_info; 296 ProxyInfo proxy_info;
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 GURL("http://kittens/"), &proxy_info, 664 GURL("http://kittens/"), &proxy_info,
666 CompletionCallback(), NULL, BoundNetLog()); 665 CompletionCallback(), NULL, BoundNetLog());
667 666
668 EXPECT_EQ(OK, result); 667 EXPECT_EQ(OK, result);
669 EXPECT_EQ(0u, bindings->errors.size()); 668 EXPECT_EQ(0u, bindings->errors.size());
670 EXPECT_EQ("kittens:88", proxy_info.proxy_server().ToURI()); 669 EXPECT_EQ("kittens:88", proxy_info.proxy_server().ToURI());
671 } 670 }
672 671
673 } // namespace 672 } // namespace
674 } // namespace net 673 } // 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